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)
commit4d8f52ac5fa9eede7b7aa2f2d67c841d9eeb655f
tree28c786d296f297eb13f9dd182ad6ecf1659eeabc
parent04fd937eb652fd9b908f885a373960ebad5cd72b
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: 7290ce1423c3 ("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