From eede850f544ccfdf54a5d8599919f82f4620bbae Mon Sep 17 00:00:00 2001 From: Scott Haseley Date: Wed, 30 Mar 2016 16:09:24 -0400 Subject: [PATCH] The km4 thread was checking the correct magic value, but printing the one on the first page. The test result is correct, but might look like it is failing when it shouldn't. --- kern/test/kmalloctest.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kern/test/kmalloctest.c b/kern/test/kmalloctest.c index d016149..a9601d6 100644 --- a/kern/test/kmalloctest.c +++ b/kern/test/kmalloctest.c @@ -356,9 +356,10 @@ kmalloctest4thread(void *sm, unsigned long num) for (j = 0; j < ITERATIONS; j++) { random_yielder(4); for (k = 0; k < sizes[p]; k++) { - if (*((uint32_t *)ptrs[p] + k*PAGE_SIZE/sizeof(uint32_t)) != magic) { + uint32_t actual = *((uint32_t *)ptrs[p] + k*PAGE_SIZE/sizeof(uint32_t)); + if (actual != magic) { panic("km4: expected %u got %u. Your VM is broken!", - magic, (*(uint32_t *)ptrs[p])); + magic, actual); } } }