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.
This commit is contained in:
Scott Haseley 2016-03-30 16:09:24 -04:00
parent 78265c6da4
commit eede850f54

View File

@ -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);
}
}
}