]> mj.ucw.cz Git - libucw.git/blobdiff - lib/sorter/sort-test.c
Merge with git+ssh://git.ucw.cz/projects/sherlock/GIT/sherlock.git#dev-sorter
[libucw.git] / lib / sorter / sort-test.c
index be6fd511681ec5b12b0bc74fdcb1b0b43934ff52..5fcbbaf74e65c71de9a9d48cdd75e5c0de04fffe 100644 (file)
@@ -24,6 +24,7 @@
 /*** Time measurement ***/
 
 static timestamp_t timer;
+static uns test_id;
 
 static void
 start(void)
@@ -36,7 +37,7 @@ static void
 stop(void)
 {
   sync();
-  msg(L_INFO, "Test took %.3fs", get_timer(&timer) / 1000.);
+  msg(L_INFO, "Test %d took %.3fs", test_id, get_timer(&timer) / 1000.);
 }
 
 /*** Simple 4-byte integer keys ***/
@@ -137,7 +138,7 @@ test_counted(int mode, u64 size)
        die("Discrepancy: %u instead of %u", j, i);
       uns k = bgetl(f);
       if (k != 2*mult)
-       die("Discrepancy: %u has count %u instead of %u", j, k, mult);
+       die("Discrepancy: %u has count %u instead of %u", j, k, 2*mult);
     }
   bclose(f);
 }
@@ -606,6 +607,7 @@ test_int64(int mode, u64 size)
 static void
 run_test(uns i, u64 size)
 {
+  test_id = i;
   switch (i)
     {
     case 0: