Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/breakpoints: change test to use ksft framework

Change breakpoints test to use kselftest framework to report
test results.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>

+6 -4
+6 -4
tools/testing/selftests/breakpoints/breakpoint_test.c
··· 17 17 #include <sys/types.h> 18 18 #include <sys/wait.h> 19 19 20 + #include "../kselftest.h" 21 + 20 22 21 23 /* Breakpoint access modes */ 22 24 enum { ··· 44 42 offsetof(struct user, u_debugreg[n]), addr); 45 43 if (ret) { 46 44 perror("Can't set breakpoint addr\n"); 47 - exit(-1); 45 + ksft_exit_fail(); 48 46 } 49 47 } 50 48 ··· 107 105 offsetof(struct user, u_debugreg[7]), dr7); 108 106 if (ret) { 109 107 perror("Can't set dr7"); 110 - exit(-1); 108 + ksft_exit_fail(); 111 109 } 112 110 } 113 111 ··· 277 275 msg2 = "Ok"; 278 276 if (ptrace(PTRACE_POKEDATA, child_pid, &trapped, 1)) { 279 277 perror("Can't poke\n"); 280 - exit(-1); 278 + ksft_exit_fail(); 281 279 } 282 280 } 283 281 ··· 392 390 393 391 wait(NULL); 394 392 395 - return 0; 393 + return ksft_exit_pass(); 396 394 }