Systems with a particular RAID controller generate tests which run an invalid command

Bug #942769 reported by Brendan Donegan
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Brendan Donegan
Fix Released

Bug Description

Some server systems contain a particular type of RAID controller which refers to itself as '/dev/cciss/c0d0' instead of e.g. /dev/sda. The Checkbox disk tests use the path of devices as stated by udevadm to work out what the name of the device is. For these devices this is something like:


Note the exclaimation mark towards the end. This causes problems in such job descriptions as:

plugin: local
name: disk/benchmarks
requires: device.category == 'DISK'
_description: Benchmark for each disk
 cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category=DISK"'
 plugin: shell
 name: disk/benchmark_`ls /sys$path/block`
 requires: device.path == "$path" and == 'linux'
 user: root
 command: hdparm -tT /dev/`ls /sys$path/block` | sed 's/:.*= */ = /' | grep -v "^$"
 description: This test runs hdparm timing tests as a benchmark for $path

For these devices, the generated command line will be:

hdparm -tT /dev/cciss!c0d0 | sed 's/:.*= */ = /' | grep -v "^$"

Bash doesn't appreciate the ! in the command and complains about an unknown event. Really what we want is an output like this:

hdparm -tT /dev/cciss/c0d0 | sed 's/:.*= */ = /' | grep -v "^$"

To achieve this we need to sed the ! for a / wherever it appears.

Related branches

Changed in checkbox:
status: New → Confirmed
status: Confirmed → In Progress
assignee: nobody → Brendan Donegan (brendan-donegan)
importance: Undecided → Critical
summary: - Systems with a particular RAID controller generated tests which run an
+ Systems with a particular RAID controller generate tests which run an
invalid command
Changed in checkbox:
status: In Progress → Fix Committed
Daniel Manrique (roadmr)
Changed in checkbox:
milestone: none → 0.13.4
Ara Pulido (ara)
Changed in checkbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers