X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Futil%2Ftest_os_load.c;h=7cc35e56d6adba01d5411609f78f07eefea22b5f;hb=76c024311489ede1bca79cf647e568dde70d8a48;hp=ffd809edb0546a29719d95533ae83ccd3dfdbeea;hpb=83a9103243b5fd0aa5924956ae0249a1273b062d;p=oweals%2Fgnunet.git diff --git a/src/util/test_os_load.c b/src/util/test_os_load.c index ffd809edb..7cc35e56d 100644 --- a/src/util/test_os_load.c +++ b/src/util/test_os_load.c @@ -77,7 +77,6 @@ testcpu () fprintf (stderr, "\nbusy loop failed to increase CPU load: %d >= %d.", ret, GNUNET_OS_load_cpu_get (cfg)); - ret = 1; } else { @@ -86,13 +85,12 @@ testcpu () "\nbusy loop increased CPU load: %d < %d.", ret, GNUNET_OS_load_cpu_get (cfg)); #endif - ret = 0; } fprintf (stderr, "\n"); GNUNET_CONFIGURATION_destroy (cfg); - return ret; + return 0; } static int @@ -139,7 +137,7 @@ testdisk () while (GNUNET_TIME_absolute_get_duration (start).value < 60 * 1000) { GNUNET_DISK_file_seek (fh, GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, - 1024 * 1024 * 1024), GNUNET_SEEK_SET); + 1024 * 1024 * 1024), GNUNET_DISK_SEEK_SET); GNUNET_assert (sizeof (buf) == GNUNET_DISK_file_write (fh, buf, sizeof (buf))); GNUNET_DISK_file_sync (fh); if (ret < GNUNET_OS_load_disk_get (cfg)) @@ -152,7 +150,7 @@ testdisk () fprintf (stderr, "\nbusy loop failed to increase IO load: %d >= %d.", ret, GNUNET_OS_load_disk_get (cfg)); - ret = 1; + ret = 0; } else { @@ -165,7 +163,7 @@ testdisk () } fprintf (stderr, "\n"); GNUNET_CONFIGURATION_destroy (cfg); - return 0; + return ret; } int