From 4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 27 Mar 2012 11:51:08 +0200 Subject: reorganize file structure to match the upstream requirements --- pintos-progos/tests/vm/page-linear.c | 44 ------------------------------------ 1 file changed, 44 deletions(-) delete mode 100644 pintos-progos/tests/vm/page-linear.c (limited to 'pintos-progos/tests/vm/page-linear.c') diff --git a/pintos-progos/tests/vm/page-linear.c b/pintos-progos/tests/vm/page-linear.c deleted file mode 100644 index 652a47b..0000000 --- a/pintos-progos/tests/vm/page-linear.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Encrypts, then decrypts, 2 MB of memory and verifies that the - values are as they should be. */ - -#include -#include "tests/arc4.h" -#include "tests/lib.h" -#include "tests/main.h" - -#define SIZE (2 * 1024 * 1024) - -static char buf[SIZE]; - -void -test_main (void) -{ - struct arc4 arc4; - size_t i; - - /* Initialize to 0x5a. */ - msg ("initialize"); - memset (buf, 0x5a, sizeof buf); - - /* Check that it's all 0x5a. */ - msg ("read pass"); - for (i = 0; i < SIZE; i++) - if (buf[i] != 0x5a) - fail ("byte %zu != 0x5a", i); - - /* Encrypt zeros. */ - msg ("read/modify/write pass one"); - arc4_init (&arc4, "foobar", 6); - arc4_crypt (&arc4, buf, SIZE); - - /* Decrypt back to zeros. */ - msg ("read/modify/write pass two"); - arc4_init (&arc4, "foobar", 6); - arc4_crypt (&arc4, buf, SIZE); - - /* Check that it's all 0x5a. */ - msg ("read pass"); - for (i = 0; i < SIZE; i++) - if (buf[i] != 0x5a) - fail ("byte %zu != 0x5a", i); -} -- cgit v1.2.3