Index: kernel/test/atomic/atomic1.c
===================================================================
--- kernel/test/atomic/atomic1.c	(revision 50661ab8590db56556df35c9b7fe8dd1f940ea72)
+++ kernel/test/atomic/atomic1.c	(revision e9db6f9e50ba52202778e3452d8cdfe5176e84b6)
@@ -32,35 +32,32 @@
 #include <debug.h>
 
-#ifdef CONFIG_BENCH
-#include <arch/cycle.h>
-#endif
-
-void test_atomic1(void)
+char * test_atomic1(void)
 {
-#ifdef CONFIG_BENCH
-	uint64_t t0 = get_cycle();
-#endif
 	atomic_t a;
-
+	
 	atomic_set(&a, 10);
-	printf("Testing atomic_set() and atomic_get().\n");
-	ASSERT(atomic_get(&a) == 10);
-	printf("Testing atomic_postinc()\n");
-	ASSERT(atomic_postinc(&a) == 10);
-	ASSERT(atomic_get(&a) == 11);
-	printf("Testing atomic_postdec()\n");
-	ASSERT(atomic_postdec(&a) == 11);
-	ASSERT(atomic_get(&a) == 10);
-	printf("Testing atomic_preinc()\n");
-	ASSERT(atomic_preinc(&a) == 11);
-	ASSERT(atomic_get(&a) == 11);
-	printf("Testing atomic_predec()\n");
-	ASSERT(atomic_postdec(&a) == 11);
-	ASSERT(atomic_get(&a) == 10);
-
-	printf("Test passed.\n");
-#ifdef CONFIG_BENCH
-	uint64_t dt = get_cycle() - t0;
-	printf("Time: %.*d cycles\n", sizeof(dt) * 2, dt);
-#endif
+	if (atomic_get(&a) != 10)
+		return "Failed atomic_set()/atomic_get()";
+	
+	if (atomic_postinc(&a) != 10)
+		return "Failed atomic_postinc()";
+	if (atomic_get(&a) != 11)
+		return "Failed atomic_get() after atomic_postinc()";
+	
+	if (atomic_postdec(&a) != 11)
+		return "Failed atomic_postdec()";
+	if (atomic_get(&a) != 10)
+		return "Failed atomic_get() after atomic_postdec()";
+	
+	if (atomic_preinc(&a) != 11)
+		return "Failed atomic_preinc()";
+	if (atomic_get(&a) != 11)
+		return "Failed atomic_get() after atomic_preinc()";
+	
+	if (atomic_predec(&a) != 10)
+		return "Failed atomic_predec()";
+	if (atomic_get(&a) != 10)
+		return "Failed atomic_get() after atomic_predec()";
+	
+	return NULL;
 }
Index: kernel/test/atomic/atomic1.def
===================================================================
--- kernel/test/atomic/atomic1.def	(revision e9db6f9e50ba52202778e3452d8cdfe5176e84b6)
+++ kernel/test/atomic/atomic1.def	(revision e9db6f9e50ba52202778e3452d8cdfe5176e84b6)
@@ -0,0 +1,6 @@
+{
+	"atomic1",
+	"Test atomic operations",
+	&test_atomic1,
+	true
+},
