Index: kernel/test/debug/mips1.c
===================================================================
--- kernel/test/debug/mips1.c	(revision 96348adc5fd6e05c187a0b5ada4b3c219815b609)
+++ kernel/test/debug/mips1.c	(revision 7e13972376409556e7702732a07422be7d7fe16f)
@@ -31,5 +31,4 @@
 #include <print.h>
 #include <debug.h>
-#include <panic.h>
 
 #include <test.h>
Index: kernel/test/fault/fault1.c
===================================================================
--- kernel/test/fault/fault1.c	(revision 96348adc5fd6e05c187a0b5ada4b3c219815b609)
+++ kernel/test/fault/fault1.c	(revision 7e13972376409556e7702732a07422be7d7fe16f)
@@ -30,5 +30,4 @@
 #include <print.h>
 #include <debug.h>
-#include <panic.h>
 
 #include <test.h>
Index: kernel/test/fpu/fpu1.c
===================================================================
--- kernel/test/fpu/fpu1.c	(revision 96348adc5fd6e05c187a0b5ada4b3c219815b609)
+++ kernel/test/fpu/fpu1.c	(revision 7e13972376409556e7702732a07422be7d7fe16f)
@@ -32,5 +32,4 @@
 #include <print.h>
 #include <debug.h>
-#include <panic.h>
 
 #include <test.h>
Index: kernel/test/fpu/mips2.c
===================================================================
--- kernel/test/fpu/mips2.c	(revision 96348adc5fd6e05c187a0b5ada4b3c219815b609)
+++ kernel/test/fpu/mips2.c	(revision 7e13972376409556e7702732a07422be7d7fe16f)
@@ -31,5 +31,4 @@
 #include <print.h>
 #include <debug.h>
-#include <panic.h>
 
 #include <test.h>
@@ -103,5 +102,5 @@
 		
 		if (arg != after_arg) {
-			panic("General reg tid%d: arg(%d) != %d\n", THREAD->tid, arg, after_arg);
+			printf("General reg tid%d: arg(%d) != %d\n", THREAD->tid, arg, after_arg);
 			atomic_inc(&threads_fault);
 			break;
Index: kernel/test/fpu/sse1.c
===================================================================
--- kernel/test/fpu/sse1.c	(revision 96348adc5fd6e05c187a0b5ada4b3c219815b609)
+++ kernel/test/fpu/sse1.c	(revision 7e13972376409556e7702732a07422be7d7fe16f)
@@ -31,5 +31,4 @@
 #include <print.h>
 #include <debug.h>
-#include <panic.h>
 
 #include <test.h>
Index: kernel/test/mm/falloc1.c
===================================================================
--- kernel/test/mm/falloc1.c	(revision 96348adc5fd6e05c187a0b5ada4b3c219815b609)
+++ kernel/test/mm/falloc1.c	(revision 7e13972376409556e7702732a07422be7d7fe16f)
@@ -47,6 +47,8 @@
 	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";
Index: kernel/test/mm/mapping1.c
===================================================================
--- kernel/test/mm/mapping1.c	(revision 96348adc5fd6e05c187a0b5ada4b3c219815b609)
+++ kernel/test/mm/mapping1.c	(revision 7e13972376409556e7702732a07422be7d7fe16f)
@@ -63,6 +63,8 @@
 	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);
@@ -77,6 +79,8 @@
 	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;	
Index: kernel/test/mm/slab1.c
===================================================================
--- kernel/test/mm/slab1.c	(revision 96348adc5fd6e05c187a0b5ada4b3c219815b609)
+++ kernel/test/mm/slab1.c	(revision 7e13972376409556e7702732a07422be7d7fe16f)
@@ -32,5 +32,4 @@
 #include <proc/thread.h>
 #include <arch.h>
-#include <panic.h>
 #include <memstr.h>
 
Index: kernel/test/mm/slab2.c
===================================================================
--- kernel/test/mm/slab2.c	(revision 96348adc5fd6e05c187a0b5ada4b3c219815b609)
+++ kernel/test/mm/slab2.c	(revision 7e13972376409556e7702732a07422be7d7fe16f)
@@ -32,5 +32,4 @@
 #include <proc/thread.h>
 #include <arch.h>
-#include <panic.h>
 #include <mm/frame.h>
 #include <memstr.h>
@@ -89,5 +88,6 @@
 		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);
Index: kernel/test/synch/rwlock4.c
===================================================================
--- kernel/test/synch/rwlock4.c	(revision 96348adc5fd6e05c187a0b5ada4b3c219815b609)
+++ kernel/test/synch/rwlock4.c	(revision 7e13972376409556e7702732a07422be7d7fe16f)
@@ -35,5 +35,4 @@
 #include <arch/context.h>
 #include <context.h>
-#include <panic.h>
 
 #include <synch/waitq.h>
@@ -46,4 +45,5 @@
 
 static rwlock_t rwlock;
+static atomic_t threads_fault;
 
 SPINLOCK_INITIALIZE(rw_lock);
@@ -79,7 +79,15 @@
 	printf("cpu%d, tid %d w=\n", CPU->id, THREAD->tid);
 
-	if (rwlock.readers_in) panic("Oops.");
+	if (rwlock.readers_in) {
+		printf("Oops.");
+		atomic_inc(&threads_fault);
+		return;
+	}
 	thread_usleep(random(1000000));
-	if (rwlock.readers_in) panic("Oops.");	
+	if (rwlock.readers_in) {
+		printf("Oops.");	
+		atomic_inc(&threads_fault);
+		return;
+	}
 
 	rwlock_write_unlock(&rwlock);
@@ -113,4 +121,5 @@
 	waitq_initialize(&can_start);
 	rwlock_initialize(&rwlock);
+	atomic_set(&threads_fault, 0);
 	
 	thread_t *thrd;
@@ -131,5 +140,5 @@
 	k = random(5) + 1;
 	printf("Creating %d writers\n", k);
-	for (i=0; i<k; i++) {
+	for (i = 0; i < k; i++) {
 		thrd = thread_create(writer, NULL, TASK, 0, "writer");
 		if (thrd)
@@ -142,4 +151,7 @@
 	waitq_wakeup(&can_start, WAKEUP_ALL);
 	
-	return NULL;
+	if (atomic_get(&threads_fault) == 0)
+		return NULL;
+	
+	return "Test failed";
 }
Index: kernel/test/sysinfo/sysinfo1.c
===================================================================
--- kernel/test/sysinfo/sysinfo1.c	(revision 96348adc5fd6e05c187a0b5ada4b3c219815b609)
+++ kernel/test/sysinfo/sysinfo1.c	(revision 7e13972376409556e7702732a07422be7d7fe16f)
@@ -29,5 +29,4 @@
 #include <print.h>
 #include <debug.h>
-#include <panic.h>
 
 #include <test.h>
Index: kernel/test/thread/thread1.c
===================================================================
--- kernel/test/thread/thread1.c	(revision 96348adc5fd6e05c187a0b5ada4b3c219815b609)
+++ kernel/test/thread/thread1.c	(revision 7e13972376409556e7702732a07422be7d7fe16f)
@@ -30,5 +30,4 @@
 #include <print.h>
 #include <debug.h>
-#include <panic.h>
 
 #include <test.h>
