From 7b741e2c96e1be38289a62f81821c8606de7be48 Mon Sep 17 00:00:00 2001 From: Kamil Gierszewski Date: Wed, 30 Oct 2024 00:50:50 +0100 Subject: [PATCH] test-framework: Parallelize SATA plug_all command Signed-off-by: Kamil Gierszewski --- storage_devices/disk.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage_devices/disk.py b/storage_devices/disk.py index 8e2cbbc..00bd486 100644 --- a/storage_devices/disk.py +++ b/storage_devices/disk.py @@ -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