diff options
author | Shaopeng Tan <tan.shaopeng@jp.fujitsu.com> | 2023-04-13 10:22:58 +0300 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2023-04-13 20:34:23 +0300 |
commit | 73c55fa5ab5539d38561b0d816be1315c8bf6752 (patch) | |
tree | 7c21effb9720150f3512a7c9701e9b4be3e5481d /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 39e34ddc382b33c9b784805ca9d83927093eb4af (diff) | |
download | linux-73c55fa5ab5539d38561b0d816be1315c8bf6752.tar.xz |
selftests/resctrl: Commonize the signal handler register/unregister for all tests
After creating a child process with fork() in CAT test, if a signal such
as SIGINT is received, the parent process will be terminated immediately,
and therefore the child process will not be killed and also resctrlfs is
not unmounted.
There is a signal handler registered in CMT/MBM/MBA tests, which kills
child process, unmount resctrlfs, cleanups result files, etc., if a
signal such as SIGINT is received.
Commonize the signal handler registered for CMT/MBM/MBA tests and
reuse it in CAT.
To reuse the signal handler to kill child process use global bm_pid
instead of local bm_pid.
Also, since the MBA/MBA/CMT/CAT are run in order, unregister the signal
handler at the end of each test so that the signal handler cannot be
inherited by other tests.
Reviewed-by: Ilpo Jarvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions