[Tux3] [PATCH] Random test which hits an assert due to grouplim = 7 causing split of 1 entry group
Shapor Naghibzadeh
shapor at gmail.com
Fri Aug 8 11:26:30 PDT 2008
# HG changeset patch
# User shapor at yzf.shapor.com
# Date 1218219979 25200
# Node ID b1ae25c62680c487e1f93c75890fa02526c6d4df
# Parent f7889cc1c980f619b9b98aa919300755a08ab083
Random test which hits an assert due to grouplim = 7 causing split of 1 entry group
Realistically wouldn't happen since versions limited to grouplim (for now)
diff -r f7889cc1c980 -r b1ae25c62680 user/test/test_fleaf.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/user/test/test_fleaf.c Fri Aug 08 11:26:19 2008 -0700
@@ -0,0 +1,19 @@
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#define main notmain
+#include "fleaf.c"
+#undef main
+
+int main(int argc, char *argv[])
+{
+ u64 count = 0;
+ struct fleaf *leaf = leaf_create();
+ int fd = open("/dev/urandom", O_RDONLY);
+ while(!leaf_insert(leaf, count << 42, (struct extent){ .block = count })) {
+ leaf_dump(leaf);
+ read(fd, &count, 8);
+ }
+ free(leaf);
+ return 0;
+}
_______________________________________________
Tux3 mailing list
Tux3 at tux3.org
http://tux3.org/cgi-bin/mailman/listinfo/tux3
More information about the Tux3
mailing list