You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
selftests: timers: clocksource-switch: fix passing errors from child
[ Upstream commit4d8f52ac5f] The return value from system() is a waitpid-style integer. Do not return it directly because with the implicit masking in exit() it will always return 0. Access it with appropriate macros to really pass on errors. Fixes:7290ce1423("selftests/timers: Add clocksource-switch test from timetest suite") Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: John Stultz <jstultz@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ee3cc4c761
commit
990ca39e78
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user