[29609] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit [krb5-1.14]: Test btree unaligned byte swapping

daemon@ATHENA.MIT.EDU (Tom Yu)
Fri Sep 2 17:04:45 2016

Date: Fri, 2 Sep 2016 17:04:38 -0400
From: Tom Yu <tlyu@mit.edu>
Message-Id: <201609022104.u82L4csd024114@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/e4f49abec3ec96d13d0388bdc8628942179da4ea
commit e4f49abec3ec96d13d0388bdc8628942179da4ea
Author: Tom Yu <tlyu@mit.edu>
Date:   Fri Aug 26 12:47:00 2016 -0400

    Test btree unaligned byte swapping
    
    Add a regression test for unaligned accesses during btree byte
    swapping.
    
    (back ported from commit eaa03649fb5a3d983d48afe0124b15ad12b7bead)
    
    ticket: 8484
    version_fixed: 1.14.4

 src/plugins/kdb/db2/libdb2/test/run.test |   36 ++++++++++++++++++++++++++++-
 1 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/src/plugins/kdb/db2/libdb2/test/run.test b/src/plugins/kdb/db2/libdb2/test/run.test
index d99b42d..6f5d589 100644
--- a/src/plugins/kdb/db2/libdb2/test/run.test
+++ b/src/plugins/kdb/db2/libdb2/test/run.test
@@ -36,7 +36,7 @@ main()
 	find $bindir -type f -exec test -r {} \; -print | head -100 > $BINFILES
 
 	if [ $# -eq 0 ]; then
-		for t in 1 2 3 4 5 6 7 8 9 10 11 12 13 20 40 41; do
+		for t in 1 2 3 4 5 6 7 8 9 10 11 12 13 20 40 41 60 61; do
 			test$t
 		done
 	else
@@ -47,7 +47,7 @@ main()
 			[0-9]*)
 				test$1;;
 			btree)
-				for t in 1 2 3 7 8 9 10 12 13 40 41; do
+				for t in 1 2 3 7 8 9 10 12 13 40 41 60 61; do
 					test$t
 				done;;
 			hash)
@@ -915,4 +915,36 @@ EOF
 	fi
 }
 
+test60 () {
+	echo "Test 60: btree: big key, small data, byteswap unaligned access"
+	# 488 = 512 - 20 (header) - 3 ("foo") - 1 (newline)
+	(echo foo; echo bar) |
+	awk '{
+		s = $0
+		for (i = 0; i < 488; i++) {
+			s = s "x";
+		}
+		printf("p\nk%s\ndx\n", s);
+	}' > $TMP2
+	for order in 1234 4321; do
+		$PROG -o $TMP3 -i psize=512,lorder=$order btree $TMP2
+	done
+}
+
+test61 () {
+	echo "Test 61: btree: small key, big data, byteswap unaligned access"
+	# 484 = 512 - 20 (header) - 7 ("foo1234") - 1 (newline)
+	(echo foo1234; echo bar1234) |
+	awk '{
+		s = $0
+		for (i = 0; i < 484; i++) {
+			s = s "x";
+		}
+		printf("p\nk%s\nd%s\n", $0, s);
+	}' > $TMP2
+	for order in 1234 4321; do
+		$PROG -o $TMP3 -i psize=512,lorder=$order btree $TMP2
+	done
+}
+
 main $*
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post