]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - tools/testing/selftests/powerpc/tm/tm-resched-dscr.c
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
[karo-tx-linux.git] / tools / testing / selftests / powerpc / tm / tm-resched-dscr.c
index ee98e3886af200e423a05ab134c1c5423f380407..42d4c8caad813f19143b4237c497d9f64015fbb7 100644 (file)
@@ -28,6 +28,8 @@
 #include <assert.h>
 #include <asm/tm.h>
 
+#include "utils.h"
+
 #define TBEGIN          ".long 0x7C00051D ;"
 #define TEND            ".long 0x7C00055D ;"
 #define TCHECK          ".long 0x7C00059C ;"
@@ -36,7 +38,8 @@
 #define SPRN_TEXASR     0x82
 #define SPRN_DSCR       0x03
 
-int main(void) {
+int test_body(void)
+{
        uint64_t rv, dscr1 = 1, dscr2, texasr;
 
        printf("Check DSCR TM context switch: ");
@@ -81,10 +84,15 @@ int main(void) {
                }
                if (dscr2 != dscr1) {
                        printf(" FAIL\n");
-                       exit(EXIT_FAILURE);
+                       return 1;
                } else {
                        printf(" OK\n");
-                       exit(EXIT_SUCCESS);
+                       return 0;
                }
        }
 }
+
+int main(void)
+{
+       return test_harness(test_body, "tm_resched_dscr");
+}