]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:30 +0000 (14:23 +0200)
commit7bda43818faa1a1761656d1f5845f7f66881b1e5
tree8856051e772094f54289fa30c7567115ef861851
parent6fd4e88232adffa977153f9a85b2191a8270db48
selftests: timers: clocksource-switch: fix passing errors from child

[ Upstream commit 20590c8d8f3358374c66716343d0a826fac48263 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/timers/clocksource-switch.c