4 #include "tests/arc4.h"
5 #include "tests/cksum.h"
7 #include "tests/main.h"
9 #define SIZE (128 * 1024)
11 static char *buf = (char *) 0x10000000;
19 /* Create file, mmap. */
20 CHECK (create ("buffer", SIZE), "create \"buffer\"");
21 CHECK ((handle = open ("buffer")) > 1, "open \"buffer\"");
22 CHECK (mmap (handle, buf) != MAP_FAILED, "mmap \"buffer\"");
25 for (i = 0; i < SIZE; i++)
27 msg ("init: cksum=%lu", cksum (buf, SIZE));
29 /* Shuffle repeatedly. */
30 for (i = 0; i < 10; i++)
32 shuffle (buf, SIZE, 1);
33 msg ("shuffle %zu: cksum=%lu", i, cksum (buf, SIZE));