summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/timers/clocksource-switch.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/timers/clocksource-switch.c')
-rw-r--r--tools/testing/selftests/timers/clocksource-switch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/testing/selftests/timers/clocksource-switch.c b/tools/testing/selftests/timers/clocksource-switch.c
index bfc974b45..c18313a5f 100644
--- a/tools/testing/selftests/timers/clocksource-switch.c
+++ b/tools/testing/selftests/timers/clocksource-switch.c
@@ -110,10 +110,10 @@ int run_tests(int secs)
sprintf(buf, "./inconsistency-check -t %i", secs);
ret = system(buf);
- if (ret)
- return ret;
+ if (WIFEXITED(ret) && WEXITSTATUS(ret))
+ return WEXITSTATUS(ret);
ret = system("./nanosleep");
- return ret;
+ return WIFEXITED(ret) ? WEXITSTATUS(ret) : 0;
}