selftests/resctrl: Use correct exit code when tests fail
authorPeter Newman <peternewman@google.com>
Thu, 9 Mar 2023 14:57:57 +0000 (15:57 +0100)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 13 Apr 2023 17:33:00 +0000 (11:33 -0600)
commitc2b1790747a518f81071b44f31375d668e5b4b03
treed060a8693afe4d6d91f7b8c750b82cf12188d491
parent266679ffd867cb247c36717ea4d7998e9304823b
selftests/resctrl: Use correct exit code when tests fail

Use ksft_finished() after running tests so that resctrl_tests doesn't
return exit code 0 when tests fail.

Consequently, report the MBA and MBM tests as skipped when running on
non-Intel hardware, otherwise resctrl_tests will exit with a failure
code.

Signed-off-by: Peter Newman <peternewman@google.com>
Reviewed-by: Shaopeng Tan <tan.shaopeng@fujitsu.com>
Tested-by: Shaopeng Tan <tan.shaopeng@fujitsu.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/resctrl/resctrl_tests.c