scsi_debug emulated CD does not implement READ_TOC
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Confirmed
|
Low
|
Unassigned |
Bug Description
cdrom_id does not like the emulated SCSI CD-ROM from scsi_debug. This is a stopper for writing automatic tests around CDs.
Reproducer:
sudo modprobe scsi_debug
sudo dd if=/tmp/test.iso of=/dev/sdc # check the device!
echo 5 | sudo tee /sys/bus/
echo 1 | sudo tee /sys/bus/
You will notice that blkid detects it just fine:
$ sudo blkid -p /dev/sr1
/dev/sr1: VERSION="Joliet Extension" LABEL="CDROM" TYPE="iso9660" USAGE="filesystem"
but there are no file system properties in udev for the device, because the udev rules only run blkid for CDs with a recognized medium (to avoid unintended side effects and hangs):
/lib/udev/
/lib/udev/
However, cdrom_id fails:
$ /lib/udev/cdrom_id --debug /dev/sr1
main: probing: '/dev/sr1'
cd_inquiry: INQUIRY: [Linux ][scsi_debug ][0004]
info_scsi_cmd_err: GET CONFIGURATION failed with SK=5h/ASC=
cd_profiles: drive is pre-MMC2 and does not support 46h get configuration command
cd_profiles: trying to work around the problem
info_scsi_cmd_err: READ DISC INFORMATION failed with SK=5h/ASC=
cd_profiles_
info_scsi_cmd_err: READ TOC failed with SK=5h/ASC=
info_scsi_cmd_err: READ DISC INFORMATION failed with SK=5h/ASC=
ID_CDROM=1
ID_CDROM_MEDIA=1
ID_CDROM_MEDIA_CD=1
tags: | added: bot-stop-nagging |
This is also the case with cdrom_id from current systemd git head.