From 20a4f117d99793f8b4f36ec735a1ffc94aaba1bc Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Wed, 26 Mar 2025 10:26:36 +0100 Subject: [PATCH] test: Make sure serial is always set explicitly for scsi-hd qemu devices Now that mkosi uses -blockdev instead -drive, the device_id property of scsi-hd devices is not populated automatically anymore so we have to make sure to always specify serial= to make sure /dev/disk/by-id is populated as expected in the test. --- test/TEST-24-CRYPTSETUP/meson.build | 2 +- test/TEST-64-UDEV-STORAGE/meson.build | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/TEST-24-CRYPTSETUP/meson.build b/test/TEST-24-CRYPTSETUP/meson.build index af41f161bfe..ccf6f1ede86 100644 --- a/test/TEST-24-CRYPTSETUP/meson.build +++ b/test/TEST-24-CRYPTSETUP/meson.build @@ -16,7 +16,7 @@ integration_tests += [ ], 'qemu-args' : [ '-drive', 'id=keydev,if=none,format=raw,cache=unsafe,file=@0@'.format(project_build_root / 'mkosi.output/keydev.raw'), - '-device', 'scsi-hd,drive=keydev', + '-device', 'scsi-hd,drive=keydev,serial=keydev', ], 'mkosi-args' : integration_test_template['mkosi-args'] + [ '--runtime-size=11G', diff --git a/test/TEST-64-UDEV-STORAGE/meson.build b/test/TEST-64-UDEV-STORAGE/meson.build index 6b4cc74fe56..acd6b191d0c 100644 --- a/test/TEST-64-UDEV-STORAGE/meson.build +++ b/test/TEST-64-UDEV-STORAGE/meson.build @@ -160,7 +160,7 @@ foreach i : range(128) cmdline += [f'--drive=@id@:1M::'] div = i / 32 mod = i % 32 - qemu_args += ['-device', f'scsi-hd,drive=@id@,bus=scsi@div@.0,channel=0,scsi-id=@mod@,lun=0'] + qemu_args += ['-device', f'scsi-hd,drive=@id@,serial=@id@,bus=scsi@div@.0,channel=0,scsi-id=@mod@,lun=0'] endforeach udev_storage_tests += { @@ -233,7 +233,7 @@ if qemu.found() foreach i : range(16) id = f'drive@i@' cmdline += [f'--drive=@id@:40M::'] - qemu_args += ['-device', f'scsi-hd,drive=@id@,bus=scsi0.0,channel=0,scsi-id=0,lun=@i@'] + qemu_args += ['-device', f'scsi-hd,drive=@id@,serial=@id@,bus=scsi0.0,channel=0,scsi-id=0,lun=@i@'] endforeach udev_storage_tests += { -- 2.47.3