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.
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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 += {
|
||||
|
||||
Reference in New Issue
Block a user