diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-12 23:11:38 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-12 23:11:38 -0400 |
| commit | b7c8c1945cfbcfb9d60f5be957b4339c6eee4201 (patch) | |
| tree | ef27f4b91fc98fcea70b8ef2b7d917c9814a0fbb /tools/testing | |
| parent | 88bbfb4a6267ff90a466ade9762d9a8fff2bb1bb (diff) | |
| parent | ad718622ab6d500c870772b1b8dda46fa2195e6d (diff) | |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull more powerpc updates from Ben Herrenschmidt:
"Here are the remaining bits I was mentioning earlier. Mostly bug
fixes and new selftests from Michael (yay !). He also removed the WSP
platform and A2 core support which were dead before release, so less
clutter.
One little "feature" I snuck in is the doorbell IPI support for
non-virtualized P8 which speeds up IPIs significantly between threads
of a core"
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (34 commits)
powerpc/book3s: Fix some ABIv2 issues in machine check code
powerpc/book3s: Fix guest MC delivery mechanism to avoid soft lockups in guest.
powerpc/book3s: Increment the mce counter during machine_check_early call.
powerpc/book3s: Add stack overflow check in machine check handler.
powerpc/book3s: Fix machine check handling for unhandled errors
powerpc/eeh: Dump PE location code
powerpc/powernv: Enable POWER8 doorbell IPIs
powerpc/cpuidle: Only clear LPCR decrementer wakeup bit on fast sleep entry
powerpc/powernv: Fix killed EEH event
powerpc: fix typo 'CONFIG_PMAC'
powerpc: fix typo 'CONFIG_PPC_CPU'
powerpc/powernv: Don't escalate non-existing frozen PE
powerpc/eeh: Report frozen parent PE prior to child PE
powerpc/eeh: Clear frozen state for child PE
powerpc/powernv: Reduce panic timeout from 180s to 10s
powerpc/xmon: avoid format string leaking to printk
selftests/powerpc: Add tests of PMU EBBs
selftests/powerpc: Add support for skipping tests
selftests/powerpc: Put the test in a separate process group
selftests/powerpc: Fix instruction loop for ABIv2 (LE)
...
Diffstat (limited to 'tools/testing')
41 files changed, 4083 insertions, 46 deletions
diff --git a/tools/testing/selftests/powerpc/Makefile b/tools/testing/selftests/powerpc/Makefile index b3dbe9ef1a40..54833a791a44 100644 --- a/tools/testing/selftests/powerpc/Makefile +++ b/tools/testing/selftests/powerpc/Makefile | |||
| @@ -13,7 +13,7 @@ CFLAGS := -Wall -O2 -flto -Wall -Werror -DGIT_VERSION='"$(GIT_VERSION)"' -I$(CUR | |||
| 13 | 13 | ||
| 14 | export CC CFLAGS | 14 | export CC CFLAGS |
| 15 | 15 | ||
| 16 | TARGETS = pmu copyloops mm | 16 | TARGETS = pmu copyloops mm tm |
| 17 | 17 | ||
| 18 | endif | 18 | endif |
| 19 | 19 | ||
diff --git a/tools/testing/selftests/powerpc/harness.c b/tools/testing/selftests/powerpc/harness.c index e80c42a584fe..8ebc58a09311 100644 --- a/tools/testing/selftests/powerpc/harness.c +++ b/tools/testing/selftests/powerpc/harness.c | |||
| @@ -30,12 +30,15 @@ int run_test(int (test_function)(void), char *name) | |||
| 30 | 30 | ||
| 31 | pid = fork(); | 31 | pid = fork(); |
| 32 | if (pid == 0) { | 32 | if (pid == 0) { |
| 33 | setpgid(0, 0); | ||
| 33 | exit(test_function()); | 34 | exit(test_function()); |
| 34 | } else if (pid == -1) { | 35 | } else if (pid == -1) { |
| 35 | perror("fork"); | 36 | perror("fork"); |
| 36 | return 1; | 37 | return 1; |
| 37 | } | 38 | } |
| 38 | 39 | ||
| 40 | setpgid(pid, pid); | ||
| 41 | |||
| 39 | /* Wake us up in timeout seconds */ | 42 | /* Wake us up in timeout seconds */ |
| 40 | alarm(TIMEOUT); | 43 | alarm(TIMEOUT); |
| 41 | terminated = false; | 44 | terminated = false; |
| @@ -50,17 +53,20 @@ wait: | |||
| 50 | 53 | ||
| 51 | if (terminated) { | 54 | if (terminated) { |
| 52 | printf("!! force killing %s\n", name); | 55 | printf("!! force killing %s\n", name); |
| 53 | kill(pid, SIGKILL); | 56 | kill(-pid, SIGKILL); |
| 54 | return 1; | 57 | return 1; |
| 55 | } else { | 58 | } else { |
| 56 | printf("!! killing %s\n", name); | 59 | printf("!! killing %s\n", name); |
| 57 | kill(pid, SIGTERM); | 60 | kill(-pid, SIGTERM); |
| 58 | terminated = true; | 61 | terminated = true; |
| 59 | alarm(KILL_TIMEOUT); | 62 | alarm(KILL_TIMEOUT); |
| 60 | goto wait; | 63 | goto wait; |
| 61 | } | 64 | } |
| 62 | } | 65 | } |
| 63 | 66 | ||
| 67 | /* Kill anything else in the process group that is still running */ | ||
| 68 | kill(-pid, SIGTERM); | ||
| 69 | |||
| 64 | if (WIFEXITED(status)) | 70 | if (WIFEXITED(status)) |
| 65 | status = WEXITSTATUS(status); | 71 | status = WEXITSTATUS(status); |
| 66 | else { | 72 | else { |
| @@ -99,7 +105,10 @@ int test_harness(int (test_function)(void), char *name) | |||
| 99 | 105 | ||
| 100 | rc = run_test(test_function, name); | 106 | rc = run_test(test_function, name); |
| 101 | 107 | ||
| 102 | test_finish(name, rc); | 108 | if (rc == MAGIC_SKIP_RETURN_VALUE) |
| 109 | test_skip(name); | ||
| 110 | else | ||
| 111 | test_finish(name, rc); | ||
| 103 | 112 | ||
| 104 | return rc; | 113 | return rc; |
| 105 | } | 114 | } |
diff --git a/tools/testing/selftests/powerpc/pmu/Makefile b/tools/testing/selftests/powerpc/pmu/Makefile index 7216f0091655..b9ff0db42c79 100644 --- a/tools/testing/selftests/powerpc/pmu/Makefile +++ b/tools/testing/selftests/powerpc/pmu/Makefile | |||
| @@ -4,7 +4,7 @@ noarg: | |||
| 4 | PROGS := count_instructions | 4 | PROGS := count_instructions |
| 5 | EXTRA_SOURCES := ../harness.c event.c | 5 | EXTRA_SOURCES := ../harness.c event.c |
| 6 | 6 | ||
| 7 | all: $(PROGS) | 7 | all: $(PROGS) sub_all |
| 8 | 8 | ||
| 9 | $(PROGS): $(EXTRA_SOURCES) | 9 | $(PROGS): $(EXTRA_SOURCES) |
| 10 | 10 | ||
| @@ -12,12 +12,30 @@ $(PROGS): $(EXTRA_SOURCES) | |||
| 12 | count_instructions: loop.S count_instructions.c $(EXTRA_SOURCES) | 12 | count_instructions: loop.S count_instructions.c $(EXTRA_SOURCES) |
| 13 | $(CC) $(CFLAGS) -m64 -o $@ $^ | 13 | $(CC) $(CFLAGS) -m64 -o $@ $^ |
| 14 | 14 | ||
| 15 | run_tests: all | 15 | run_tests: all sub_run_tests |
| 16 | @-for PROG in $(PROGS); do \ | 16 | @-for PROG in $(PROGS); do \ |
| 17 | ./$$PROG; \ | 17 | ./$$PROG; \ |
| 18 | done; | 18 | done; |
| 19 | 19 | ||
| 20 | clean: | 20 | clean: sub_clean |
| 21 | rm -f $(PROGS) loop.o | 21 | rm -f $(PROGS) loop.o |
