Comment 2 for bug 1182489

Revision history for this message
Zygmunt Krynicki (zyga) wrote : Re: [Bug 1182489] [NEW] optical_drive test command works, but is incorrect

We should drop wodim and use udisks for that
21 maj 2013 16:10, "Jeff Lane" <email address hidden> napisał(a):

> Public bug reported:
>
> this is the command for optical_drive in the resources.txt.in file:
>
> name: optical_drive
> plugin: resource
> command: for media in CD DVD; do wodim -prcap 2>/dev/null | grep -q -i
> "Does write $media" && echo "$media: writable" || echo "$media: readonly";
> done
> requires: package.name == "wodim"
> description: Create resource info for supported optical actions
>
> This is the output of that command on an ARM server:
> ubuntu@c18:~$ for media in CD DVD; do wodim -prcap 2>/dev/null | grep -q
> -i "Does write $media" && echo "$media: writable" || echo "$media:
> readonly"; done
> CD: readonly
> DVD: readonly
>
> I get the same output on my laptop. The problem is that neither system
> has an optical drive.
>
> Here is the basic wodim -prcap output:
> ubuntu@c18:~$ wodim -prcap
> wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK
> limits.
> Device was not specified. Trying to find an appropriate drive...
> wodim: No such file or directory.
> Cannot open SCSI driver!
> For possible targets try 'wodim --devices' or 'wodim -scanbus'.
> For possible transport specifiers try 'wodim dev=help'.
> For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from
> the wodim documentation.
>
> I don't know that this actually affects any testing as the optical tests
> only run if there's a drive found, however, it seems wrong to have this
> script telling me that my drive is readonly when it doesn't actually
> exist.
>
> ** Affects: checkbox
> Importance: Undecided
> Status: New
>
>
> ** Tags: scripts
>
> --
> You received this bug notification because you are a member of Checkbox
> Bug Wranglers, which is subscribed to checkbox.
> https://bugs.launchpad.net/bugs/1182489
>
> Title:
> optical_drive test command works, but is incorrect
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/checkbox/+bug/1182489/+subscriptions
>