]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: timers: clocksource-switch: fix passing errors from child
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Wed, 13 Jul 2022 20:46:17 +0000 (22:46 +0200)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 14 Jul 2022 20:36:24 +0000 (14:36 -0600)
commit20590c8d8f3358374c66716343d0a826fac48263
tree28c786d296f297eb13f9dd182ad6ecf1659eeabc
parent03a4647df3046319c4b5d7a16acd7da170561b9b
selftests: timers: clocksource-switch: fix passing errors from child

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: a7ffacd44428 ("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>
tools/testing/selftests/timers/clocksource-switch.c