Add a test program for reproducing bugs related to too many block extra data slots
authorXiao Jia <stfairy@gmail.com>
Thu, 3 Dec 2015 23:20:01 +0000 (15:20 -0800)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 8 Dec 2015 21:20:21 +0000 (16:20 -0500)
Signed-off-by: Xiao Jia <stfairy@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
tests/busywriter.c [new file with mode: 0644]

diff --git a/tests/busywriter.c b/tests/busywriter.c
new file mode 100644 (file)
index 0000000..1f622e2
--- /dev/null
@@ -0,0 +1,22 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+int main(int argc, char **argv)
+{
+       int outer, inner, i, j;
+
+       if (argc != 3) {
+               fprintf(stderr, "usage: %s outer inner\n", argv[0]);
+               return 1;
+       }
+
+       outer = atoi(argv[1]);
+       inner = atoi(argv[2]);
+
+       for (i = 0; i < outer; i++) {
+               for (j = 0; j < inner; j++)
+                       printf("%c", 'x');
+               fflush(stdout);
+       }
+       return 0;
+}