From 2f6360740d95430786e4bb981a404e6b63018864 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Wed, 7 Oct 2026 19:54:39 +0200 Subject: 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. --- scripts/check-qemu-install | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'scripts') 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}') -- cgit v1.2.3