From b5f0874cd96ee2a62aabc645b9626c2749cb6a01 Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 26 Mar 2012 12:54:45 +0200 Subject: initial pintos checkin --- pintos-progos/tests/filesys/base/seq-random.inc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 pintos-progos/tests/filesys/base/seq-random.inc (limited to 'pintos-progos/tests/filesys/base/seq-random.inc') diff --git a/pintos-progos/tests/filesys/base/seq-random.inc b/pintos-progos/tests/filesys/base/seq-random.inc new file mode 100644 index 0000000..a4da4c5 --- /dev/null +++ b/pintos-progos/tests/filesys/base/seq-random.inc @@ -0,0 +1,22 @@ +/* -*- c -*- */ + +#include +#include "tests/filesys/seq-test.h" +#include "tests/main.h" + +static char buf[TEST_SIZE]; + +static size_t +return_random (void) +{ + return random_ulong () % 1031 + 1; +} + +void +test_main (void) +{ + random_init (-1); + seq_test ("nibble", + buf, sizeof buf, sizeof buf, + return_random, NULL); +} -- cgit v1.2.3