summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-10-07 19:54:39 +0200
committerChristian Breunig <christian@breunig.cc>2026-10-31 10:51:12 +0100
commit2f6360740d95430786e4bb981a404e6b63018864 (patch)
tree1eabcf30dd30844e54b333e46a8633c289407eda /scripts
parent28e8e014642653c730eeda678547c3a821b9962f (diff)
downloadvyos-build-2f6360740d95430786e4bb981a404e6b63018864.tar.gz
vyos-build-2f6360740d95430786e4bb981a404e6b63018864.zip
Testsuite: T3871: dump the interface mapping store on every testrun
Interface names are resolved from this store, so its contents are what makes a naming failure reproducible after the fact. Print it as part of the shared basic CLI tests, which every testcase runs, and show the error when the file is absent rather than an empty result - a missing store is itself a finding.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/check-qemu-install9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install
index 6c592841..c0793224 100755
--- a/scripts/check-qemu-install
+++ b/scripts/check-qemu-install
@@ -55,6 +55,10 @@ import pexpect
EXCEPTION = 0
DISK_IMAGE_EXTENSION = '.raw'
+# T3871: interface names are resolved from this store, so dump it on every
+# testrun - it is what makes a naming failure reproducible after the fact
+IFNAME_MAPPING_FILE = '/config/interface-mapping.json'
+
# Nested installer-ISO QEMU test: mkisofs payload (see --nested-installer-iso-test)
NESTED_ISO_DATA_DIR = 'nested_iso_data'
NESTED_INSTALLER_PAYLOAD_ISO = 'nested_installer_payload.iso'
@@ -677,6 +681,9 @@ def basic_cli_tests(c):
c.expect(op_mode_prompt)
c.sendline('show interfaces')
c.expect(op_mode_prompt)
+ # 2>&1 so a missing store is visible rather than an empty result
+ c.sendline(f'cat {IFNAME_MAPPING_FILE} 2>&1 || true')
+ c.expect(op_mode_prompt)
# c.sendline('systemd-detect-virt')
# c.expect('kvm')
# c.expect(op_mode_prompt)
@@ -1458,7 +1465,7 @@ try:
# The NICs are pinned to ascending PCI slots with ascending MACs, so
# eth0..eth7 must map to macbase:00..07 whenever naming is re-derived.
log.info('Running interface naming persistence tests')
- mapping_file = '/config/interface-mapping.json'
+ mapping_file = IFNAME_MAPPING_FILE
log.info('Verify the mapping store was created on first boot')
c.sendline(f'cat {mapping_file}')