/trunk/kernel/test/mm/falloc1.c |
---|
46,8 → 46,10 |
int i, order, run; |
int allocated; |
ASSERT(TEST_RUNS > 1); |
if (TEST_RUNS < 2) |
return "Test is compiled with TEST_RUNS < 2"; |
if (frames == NULL) |
return "Unable to allocate frames"; |
/trunk/kernel/test/mm/slab1.c |
---|
31,7 → 31,6 |
#include <print.h> |
#include <proc/thread.h> |
#include <arch.h> |
#include <panic.h> |
#include <memstr.h> |
#define VAL_COUNT 1024 |
/trunk/kernel/test/mm/slab2.c |
---|
31,7 → 31,6 |
#include <print.h> |
#include <proc/thread.h> |
#include <arch.h> |
#include <panic.h> |
#include <mm/frame.h> |
#include <memstr.h> |
#include <synch/condvar.h> |
88,7 → 87,8 |
for (i=0; i<30; i++) { |
data1 = slab_alloc(cache1, FRAME_ATOMIC); |
if (!data1) { |
panic("Incorrect memory size - use another test."); |
printf("Incorrect memory size - use another test."); |
return; |
} |
memsetb((uintptr_t)data1, ITEM_SIZE, 0); |
*((void **)data1) = olddata1; |
/trunk/kernel/test/mm/mapping1.c |
---|
62,8 → 62,10 |
printf("Value at virtual address %p is %#x.\n", PAGE0, v0 = *((uint32_t *) PAGE0)); |
printf("Value at virtual address %p is %#x.\n", PAGE1, v1 = *((uint32_t *) PAGE1)); |
ASSERT(v0 == VALUE0); |
ASSERT(v1 == VALUE1); |
if (v0 != VALUE0) |
return "Value at v0 not equal to VALUE0"; |
if (v1 != VALUE1) |
return "Value at v1 not equal to VALUE1"; |
printf("Writing %#x to virtual address %p.\n", 0, PAGE0); |
*((uint32_t *) PAGE0) = 0; |
76,8 → 78,10 |
printf("Value at virtual address %p is %#x.\n", PAGE0, *((uint32_t *) PAGE0)); |
printf("Value at virtual address %p is %#x.\n", PAGE1, *((uint32_t *) PAGE1)); |
ASSERT(v0 == 0); |
ASSERT(v1 == 0); |
if (v0 != 0) |
return "Value at v0 not equal to 0"; |
if (v1 != 0) |
return "Value at v1 not equal to 0"; |
return NULL; |
} |