Skip to content

Commit cdc4bd3

Browse files
committed
test(snapshot): verify entropy source after cross-kernel restore
Check that /dev/hwrng is functional after restoring a snapshot on a different host kernel version. Signed-off-by: Jack Thomson <jackabt@amazon.com>
1 parent 565d4b6 commit cdc4bd3

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

tests/integration_tests/functional/test_snapshot_phase1.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ def test_snapshot_phase1(
5858
configure_mmds(vm, ["eth3"], version="V2")
5959
# Add a memory balloon.
6060
vm.api.balloon.put(amount_mib=0, deflate_on_oom=True, stats_polling_interval_s=1)
61+
# Add an entropy device.
62+
vm.api.entropy.put()
6163

6264
vm.start()
6365

tests/integration_tests/functional/test_snapshot_restore_cross_kernel.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
from framework.defs import FC_WORKSPACE_DIR
1313
from framework.utils import (
14+
check_entropy,
1415
generate_mmds_get_request,
1516
generate_mmds_session_token,
1617
guest_run_fio_iteration,
@@ -125,4 +126,7 @@ def test_snap_restore_from_artifacts(
125126
logger.info("Testing block device via fio...")
126127
guest_run_fio_iteration(vm.ssh, 0)
127128

129+
logger.info("Testing entropy...")
130+
check_entropy(vm.ssh)
131+
128132
vm.kill()

0 commit comments

Comments
 (0)