Skip to content

Commit

Permalink
selftests/resctrl: Unmount resctrl FS if child fails to run benchmark
Browse files Browse the repository at this point in the history
[ Upstream commit f99e413 ]

A child calls PARENT_EXIT() when it fails to run a benchmark to kill
the parent process. PARENT_EXIT() lacks unmount for the resctrl FS and
the parent won't be there to unmount it either after it gets killed.

Add the resctrl FS unmount also to PARENT_EXIT().

Fixes: 591a6e8 ("selftests/resctrl: Add basic resctrl file system operations and data")
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Tested-by: Babu Moger <babu.moger@amd.com>
Tested-by: Shaopeng Tan (Fujitsu) <tan.shaopeng@fujitsu.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
ij-intel authored and gregkh committed Sep 13, 2023
1 parent d4b1f43 commit f046a88
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/testing/selftests/resctrl/resctrl.h
Expand Up @@ -43,6 +43,7 @@
do { \
perror(err_msg); \
kill(ppid, SIGKILL); \
umount_resctrlfs(); \
exit(EXIT_FAILURE); \
} while (0)

Expand Down

0 comments on commit f046a88

Please sign in to comment.