X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftests%2Fvm%2Fchild-sort.c;h=2b13b6725cf10574774b03d990db3a545cf8b029;hb=520ff4dd2a106a4d4a21468a72ba820c8ea7d242;hp=638a66de2a190192955364e2cbeba2675df9b1d7;hpb=615bf3b3d2a8573ed6fb9ddc0055745e163ac999;p=pintos-anon diff --git a/src/tests/vm/child-sort.c b/src/tests/vm/child-sort.c index 638a66d..2b13b67 100644 --- a/src/tests/vm/child-sort.c +++ b/src/tests/vm/child-sort.c @@ -1,10 +1,12 @@ +/* Reads a 128 kB file into static data and "sorts" the bytes in + it, using counting sort, a single-pass algorithm. The sorted + data is written back to the same file in-place. */ + #include #include #include "tests/lib.h" #include "tests/main.h" -const char *test_name = "child-sort"; - unsigned char buf[128 * 1024]; size_t histogram[256]; @@ -16,6 +18,7 @@ main (int argc UNUSED, char *argv[]) size_t size; size_t i; + test_name = "child-sort"; quiet = true; CHECK ((handle = open (argv[1])) > 1, "open \"%s\"", argv[1]);