From d35c332397d42f57d503d8af063ddc0467579be2 Mon Sep 17 00:00:00 2001 From: Robert Spalek Date: Fri, 2 Mar 2001 13:36:47 +0000 Subject: [PATCH] added --- lib/lfs-test.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 lib/lfs-test.c diff --git a/lib/lfs-test.c b/lib/lfs-test.c new file mode 100644 index 00000000..c30f29ba --- /dev/null +++ b/lib/lfs-test.c @@ -0,0 +1,63 @@ +/* Test for configuration parser */ + +#include "lib/lib.h" +#include "lib/fastbuf.h" + +#include +#include +#include +#include +#include + +#define BLOCK (1<<10) +#define COUNT (5<<20) +#define TESTS (1<<20) + +int main(void) +{ + struct fastbuf *b; + byte block[BLOCK]; + uns i; + + srand(time(NULL)); +#if 0 + b = bopen("/big/robert/large-file", O_CREAT | O_TRUNC | O_RDWR, 1<<20); + if (!b) + die("Cannot create large-file"); + + log(L_DEBUG, "Writing %d blocks of size %d", COUNT, BLOCK); + for (i=0; i