From 1c8fb7381c2415baa3c34cb6c7028e95df0d41c7 Mon Sep 17 00:00:00 2001 From: ybduan Date: Mon, 2 Dec 2024 15:04:52 +0800 Subject: [PATCH] update_rng: Update rng device for all platform if needed Signed-off-by: ybduan --- qemu/tests/cfg/rng_bat.cfg | 4 +--- qemu/tests/cfg/rng_host_guest_read.cfg | 4 +--- qemu/tests/cfg/rng_hotplug.cfg | 3 +-- qemu/tests/cfg/rng_maxbytes_period.cfg | 4 +--- qemu/tests/cfg/rng_read_longtime.cfg | 4 +--- qemu/tests/cfg/rng_stress.cfg | 3 +-- qemu/tests/cfg/viorng_in_use.cfg | 4 +--- 7 files changed, 7 insertions(+), 19 deletions(-) diff --git a/qemu/tests/cfg/rng_bat.cfg b/qemu/tests/cfg/rng_bat.cfg index 5ee849a2bf..8fe0fedea4 100644 --- a/qemu/tests/cfg/rng_bat.cfg +++ b/qemu/tests/cfg/rng_bat.cfg @@ -23,6 +23,7 @@ session_cmd_timeout = 360 read_rng_cmd = "dd if=/dev/random bs=1 count=10 2>/dev/null|hexdump" driver_verifier_cmd = "cat /sys/devices/virtual/misc/hw_random/rng_current" + update_driver = "echo -n 'virtio_rng.0' > /sys/devices/virtual/misc/hw_random/rng_current" rng_data_rex = "\w+" driver_name = virtio_rng RHEL.7, RHEL.8.0, RHEL.8.1, RHEL8.2, RHEL.8.3: @@ -32,9 +33,6 @@ driver_name = virtio check_rngd_service = "service rngd status" start_rngd_service = "service rngd start" - s390x: - RHEL.9: - update_driver = "echo 'virtio_rng.0' > /sys/devices/virtual/misc/hw_random/rng_current" variants: - @default: - iommu_enabled: diff --git a/qemu/tests/cfg/rng_host_guest_read.cfg b/qemu/tests/cfg/rng_host_guest_read.cfg index affd555481..606756ae77 100644 --- a/qemu/tests/cfg/rng_host_guest_read.cfg +++ b/qemu/tests/cfg/rng_host_guest_read.cfg @@ -24,6 +24,7 @@ Linux: read_rng_cmd = "dd if=/dev/random bs=1 count=10 2>/dev/null|hexdump" driver_verifier_cmd = "cat /sys/devices/virtual/misc/hw_random/rng_current" + update_driver = "echo -n 'virtio_rng.0' > /sys/devices/virtual/misc/hw_random/rng_current" rng_data_rex = "\w+" driver_name = virtio_rng RHEL.7, RHEL.8.0, RHEL.8.1, RHEL8.2, RHEL.8.3: @@ -33,6 +34,3 @@ driver_name = virtio check_rngd_service = "service rngd status" start_rngd_service = "service rngd start" - s390x: - RHEL.9: - update_driver = "echo 'virtio_rng.0' > /sys/devices/virtual/misc/hw_random/rng_current" diff --git a/qemu/tests/cfg/rng_hotplug.cfg b/qemu/tests/cfg/rng_hotplug.cfg index 70fab14227..4604dcdefc 100644 --- a/qemu/tests/cfg/rng_hotplug.cfg +++ b/qemu/tests/cfg/rng_hotplug.cfg @@ -31,6 +31,7 @@ Linux: session_cmd_timeout = 360 driver_verifier_cmd = "cat /sys/devices/virtual/misc/hw_random/rng_current" + update_driver = "echo -n 'virtio_rng.0' > /sys/devices/virtual/misc/hw_random/rng_current" read_rng_cmd = "dd if=/dev/random bs=1 count=10 2>/dev/null|hexdump" rng_data_rex = "\w+" driver_name = virtio_rng @@ -47,8 +48,6 @@ start_rngd_service = "service rngd start" s390x: rng_driver = "virtio-rng-ccw" - RHEL.9: - update_driver = "echo 'virtio_rng.0' > /sys/devices/virtual/misc/hw_random/rng_current" variants: - multi_rngs: rng_num = 4 diff --git a/qemu/tests/cfg/rng_maxbytes_period.cfg b/qemu/tests/cfg/rng_maxbytes_period.cfg index 111846945f..222415bf69 100644 --- a/qemu/tests/cfg/rng_maxbytes_period.cfg +++ b/qemu/tests/cfg/rng_maxbytes_period.cfg @@ -4,6 +4,7 @@ virt_test_type = qemu no no_virtio_rng only Linux + update_driver = "echo -n 'virtio_rng.0' > /sys/devices/virtual/misc/hw_random/rng_current" read_rng_cmd = "dd if=/dev/hwrng of=/dev/null bs=1024 count=100" RHEL.7, RHEL.8.0, RHEL.8.1, RHEL8.2, RHEL.8.3: check_rngd_service = "systemctl status rngd" @@ -11,9 +12,6 @@ RHEL.6: check_rngd_service = "service rngd status" start_rngd_service = "service rngd start" - s390x: - RHEL.9: - update_driver = "echo 'virtio_rng.0' > /sys/devices/virtual/misc/hw_random/rng_current" variants: - positive_test: no rng_egd diff --git a/qemu/tests/cfg/rng_read_longtime.cfg b/qemu/tests/cfg/rng_read_longtime.cfg index c3cfd25f2d..1e127d1811 100644 --- a/qemu/tests/cfg/rng_read_longtime.cfg +++ b/qemu/tests/cfg/rng_read_longtime.cfg @@ -29,6 +29,7 @@ session_cmd_timeout = 360 read_rng_cmd = "dd if=/dev/random bs=4 count=1000 2>/dev/null|hexdump" driver_verifier_cmd = "cat /sys/devices/virtual/misc/hw_random/rng_current" + update_driver = "echo -n 'virtio_rng.0' > /sys/devices/virtual/misc/hw_random/rng_current" rng_data_rex = "\w+" driver_name = virtio_rng RHEL.7, RHEL.8.0, RHEL.8.1, RHEL8.2, RHEL.8.3: @@ -38,6 +39,3 @@ driver_name = virtio check_rngd_service = "service rngd status" start_rngd_service = "service rngd start" - s390x: - RHEL.9: - update_driver = "echo 'virtio_rng.0' > /sys/devices/virtual/misc/hw_random/rng_current" diff --git a/qemu/tests/cfg/rng_stress.cfg b/qemu/tests/cfg/rng_stress.cfg index 584ce7cec3..3f4ff92e58 100644 --- a/qemu/tests/cfg/rng_stress.cfg +++ b/qemu/tests/cfg/rng_stress.cfg @@ -24,6 +24,7 @@ read_rng_cmd = "dd if=/dev/random bs=1 count=10 2>/dev/null|hexdump" driver_verifier_cmd = "cat /sys/devices/virtual/misc/hw_random/rng_current" driver_available_cmd = "cat /sys/devices/virtual/misc/hw_random/rng_available" + update_driver = "echo -n 'virtio_rng.0' > /sys/devices/virtual/misc/hw_random/rng_current" rng_data_rex = "\w+" driver_name = virtio_rng RHEL.7, RHEL.8.0, RHEL.8.1, RHEL8.2, RHEL.8.3: @@ -35,8 +36,6 @@ start_rngd_service = "service rngd start" s390x: rng_driver = "virtio-rng-ccw" - RHEL.9: - update_driver = "echo 'virtio_rng.0' > /sys/devices/virtual/misc/hw_random/rng_current" variants: - two_device: no RHEL.6 diff --git a/qemu/tests/cfg/viorng_in_use.cfg b/qemu/tests/cfg/viorng_in_use.cfg index dae6cb8aa7..76c8c32cc1 100644 --- a/qemu/tests/cfg/viorng_in_use.cfg +++ b/qemu/tests/cfg/viorng_in_use.cfg @@ -31,6 +31,7 @@ Linux: read_rng_cmd = "dd if=/dev/random bs=10 count=10 2>/dev/null|hexdump" driver_verifier_cmd = "cat /sys/devices/virtual/misc/hw_random/rng_current" + update_driver = "echo -n 'virtio_rng.0' > /sys/devices/virtual/misc/hw_random/rng_current" target_process = dd rng_data_rex = "\w+" list_cmd = "ps aux | grep rngd | grep 'Rs\|Ds'" @@ -42,9 +43,6 @@ driver_name = virtio check_rngd_service = "service rngd status" start_rngd_service = "service rngd start" - s390x: - RHEL.9: - update_driver = "echo 'virtio_rng.0' > /sys/devices/virtual/misc/hw_random/rng_current" variants: - before_bg_test: run_bg_flag = "before_bg_test"