aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-13 18:26:47 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-13 18:26:47 -0400
commit9f48c89862e39b7f33b44123fc425cf901c89428 (patch)
tree373886606ada8c2e0c362afbcce490af27d21552 /tools/testing
parent2a211f320ee3d86835b40efd2948642482d3c933 (diff)
parent1795cd9b3a91d4b5473c97f491d63892442212ab (diff)
Merge 3.16-rc5 into char-misc-next
This resolves a number of merge issues with changes in this tree and Linus's tree at the same time. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/ipc/msgque.c5
-rw-r--r--tools/testing/selftests/powerpc/tm/Makefile2
-rw-r--r--tools/testing/selftests/powerpc/tm/tm-resched-dscr.c14
3 files changed, 17 insertions, 4 deletions
diff --git a/tools/testing/selftests/ipc/msgque.c b/tools/testing/selftests/ipc/msgque.c
index aa290c0de6f5..552f0810bffb 100644
--- a/tools/testing/selftests/ipc/msgque.c
+++ b/tools/testing/selftests/ipc/msgque.c
@@ -193,6 +193,11 @@ int main(int argc, char **argv)
193 int msg, pid, err; 193 int msg, pid, err;
194 struct msgque_data msgque; 194 struct msgque_data msgque;
195 195
196 if (getuid() != 0) {
197 printf("Please run the test as root - Exiting.\n");
198 exit(1);
199 }
200
196 msgque.key = ftok(argv[0], 822155650); 201 msgque.key = ftok(argv[0], 822155650);
197 if (msgque.key == -1) { 202 if (msgque.key == -1) {
198 printf("Can't make key\n"); 203 printf("Can't make key\n");
diff --git a/tools/testing/selftests/powerpc/tm/Makefile b/tools/testing/selftests/powerpc/tm/Makefile
index 51267f4184a6..2cede239a074 100644
--- a/tools/testing/selftests/powerpc/tm/Makefile
+++ b/tools/testing/selftests/powerpc/tm/Makefile
@@ -2,7 +2,7 @@ PROGS := tm-resched-dscr
2 2
3all: $(PROGS) 3all: $(PROGS)
4 4
5$(PROGS): 5$(PROGS): ../harness.c
6 6
7run_tests: all 7run_tests: all
8 @-for PROG in $(PROGS); do \ 8 @-for PROG in $(PROGS); do \
diff --git a/tools/testing/selftests/powerpc/tm/tm-resched-dscr.c b/tools/testing/selftests/powerpc/tm/tm-resched-dscr.c
index ee98e3886af2..42d4c8caad81 100644
--- a/tools/testing/selftests/powerpc/tm/tm-resched-dscr.c
+++ b/tools/testing/selftests/powerpc/tm/tm-resched-dscr.c
@@ -28,6 +28,8 @@
28#include <assert.h> 28#include <assert.h>
29#include <asm/tm.h> 29#include <asm/tm.h>
30 30
31#include "utils.h"
32
31#define TBEGIN ".long 0x7C00051D ;" 33#define TBEGIN ".long 0x7C00051D ;"
32#define TEND ".long 0x7C00055D ;" 34#define TEND ".long 0x7C00055D ;"
33#define TCHECK ".long 0x7C00059C ;" 35#define TCHECK ".long 0x7C00059C ;"
@@ -36,7 +38,8 @@
36#define SPRN_TEXASR 0x82 38#define SPRN_TEXASR 0x82
37#define SPRN_DSCR 0x03 39#define SPRN_DSCR 0x03
38 40
39int main(void) { 41int test_body(void)
42{
40 uint64_t rv, dscr1 = 1, dscr2, texasr; 43 uint64_t rv, dscr1 = 1, dscr2, texasr;
41 44
42 printf("Check DSCR TM context switch: "); 45 printf("Check DSCR TM context switch: ");
@@ -81,10 +84,15 @@ int main(void) {
81 } 84 }
82 if (dscr2 != dscr1) { 85 if (dscr2 != dscr1) {
83 printf(" FAIL\n"); 86 printf(" FAIL\n");
84 exit(EXIT_FAILURE); 87 return 1;
85 } else { 88 } else {
86 printf(" OK\n"); 89 printf(" OK\n");
87 exit(EXIT_SUCCESS); 90 return 0;
88 } 91 }
89 } 92 }
90} 93}
94
95int main(void)
96{
97 return test_harness(test_body, "tm_resched_dscr");
98}