test-framework: Parallelize SATA plug_all command

Signed-off-by: Kamil Gierszewski <kamil.gierszewski@huawei.com>
This commit is contained in:
Kamil Gierszewski 2024-10-30 00:50:50 +01:00
parent 5bbbf559fd
commit 7b741e2c96
No known key found for this signature in database

View File

@ -288,8 +288,8 @@ class SataDisk(Disk):
@classmethod
def plug_all(cls) -> Output:
cmd = (
f"for i in $(find -H /sys/devices/ -path '*/scsi_host/*/scan' -type f); do echo "
f"'- - -' > $i; done;"
"find -H /sys/devices/ -path '*/scsi_host/*/scan' -type f |"
" xargs -P20 -I % sh -c \"echo '- - -' | tee %\""
)
output = TestRun.executor.run_expect_success(cmd)
return output