test-framework: fix blktrace,file copy,trim support detection

Signed-off-by: Kamil Gierszewski <kamil.gierszewski@huawei.com>
This commit is contained in:
Kamil Gierszewski
2024-04-11 03:38:43 +02:00
parent db06ac9d3c
commit 0cd936ee72
4 changed files with 17 additions and 5 deletions

View File

@@ -1,8 +1,11 @@
#
# Copyright(c) 2019-2022 Intel Corporation
# Copyright(c) 2023-2024 Huawei Technologies Co., Ltd.
# SPDX-License-Identifier: BSD-3-Clause
#
import math
import time
from aenum import IntFlag, Enum
@@ -133,6 +136,10 @@ class BlkTrace:
drop_caches(DropCachesMode.ALL)
TestRun.executor.run_expect_success(f"kill -s SIGINT {self.blktrace_pid}")
time.sleep(3)
if TestRun.executor.check_if_process_exists(self.blktrace_pid):
TestRun.fail("blktrace monitoring for device is still active")
self.blktrace_pid = -1
# dummy command for swallowing output of killed command