X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=t%2Fstest.c;h=04df60dc42fa77f6df9de923c452a4f86a58a81c;hb=493dd6c153bc169e1b52757e496d64ea596f165d;hp=0da8f2cf8670aad2cef31de9b0abedd5e86f1f93;hpb=8e600258bad065fbdfd6a1b2856077d12cd521e5;p=fio.git diff --git a/t/stest.c b/t/stest.c index 0da8f2cf..04df60dc 100644 --- a/t/stest.c +++ b/t/stest.c @@ -4,10 +4,8 @@ #include "../smalloc.h" #include "../flist.h" - -FILE *f_err; -struct timeval *fio_tv = NULL; -unsigned int fio_debug = 0; +#include "../arch/arch.h" +#include "debug.h" #define MAGIC1 0xa9b1c8d2 #define MAGIC2 0xf0a1e9b3 @@ -33,7 +31,7 @@ static int do_rand_allocs(void) srand(MAGIC1); #endif nr = total = 0; - while (total < 128*1024*1024UL) { + while (total < 120*1024*1024UL) { size = 8 * sizeof(struct elem) + (int) (999.0 * (rand() / (RAND_MAX + 1.0))); e = smalloc(size); if (!e) { @@ -61,30 +59,14 @@ static int do_rand_allocs(void) return 0; } -static int do_specific_alloc(unsigned long size) -{ - void *ptr; - - ptr = smalloc(size); - sfree(ptr); - return 0; -} - int main(int argc, char *argv[]) { - f_err = stderr; - + arch_init(argv); sinit(); + debug_init(); do_rand_allocs(); - /* smalloc bug, commit 271067a6 */ - do_specific_alloc(671386584); - scleanup(); return 0; } - -void __dprint(int type, const char *str, ...) -{ -}