diff options
author | Ilpo Järvinen <[email protected]> | 2024-06-10 18:14:42 +0300 |
---|---|---|
committer | Shuah Khan <[email protected]> | 2024-07-11 11:23:53 -0600 |
commit | c44000b6535dc9806b9128d1aed403862b2adab9 (patch) | |
tree | f4218afa2058b598a8827ad5f8f4fae92dde3458 /tools/testing/selftests/bpf/prog_tests/autoload.c | |
parent | b47619a3a3f79f75edf774275798aad1a37609ad (diff) |
selftests/resctrl: Fix closing IMC fds on error and open-code R+W instead of loops
The imc perf fd close() calls are missing from all error paths. In
addition, get_mem_bw_imc() handles fds in a for loop but close() is
based on two fixed indexes READ and WRITE.
Open code inner for loops to READ+WRITE entries for clarity and add a
function to close() IMC fds properly in all cases.
Fixes: 7f4d257e3a2a ("selftests/resctrl: Add callback to start a benchmark")
Suggested-by: Reinette Chatre <[email protected]>
Signed-off-by: Ilpo Järvinen <[email protected]>
Tested-by: Babu Moger <[email protected]>
Reviewed-by: Reinette Chatre <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions