Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Tests/iaas/scs_0101_entropy/entropy_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@

TIMEOUT = 5 * 60 # timeout in seconds after which we no longer wait for the VM to complete the run
MARKER = '_scs-test-'
# NOTE we mask serial-getty@ttyS0.service because the login prompt messes up the console output that we want to parse
SERVER_USERDATA_GENERIC = """
#cloud-config
# apt-placeholder
packages:
- rng-tools5
bootcmd:
- systemctl mask serial-getty@ttyS0.service
runcmd:
- echo '_scs-test-entropy-avail'; cat /proc/sys/kernel/random/entropy_avail
- echo '_scs-test-fips-test'; cat /dev/random | rngtest -c 1000
Expand Down Expand Up @@ -337,6 +340,8 @@ def compute_canonical_image(all_images):
def _convert_to_collected(lines, marker=MARKER):
# parse lines from console output
# removing any "indent", stuff that looks like '[ 70.439502] cloud-init[513]: '
# NOTE this logic can fail when something (such as a login prompt) messes up the console output
# therefore we disable the corresponding service (see cloud-init)
section = None
indent = 0
collected = {}
Expand Down