Broken test in fedora-minimal/install.d/99-ramdisk

Bug #1506692 reported by Martin André
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
diskimage-builder
Fix Released
High
Ian Wienand

Bug Description

dib-run-parts Fri Oct 16 00:42:22 UTC 2015 Running /tmp/in_target.d/install.d/99-ramdisk
+ set -eu
+ set -o pipefail
++ find /boot -name initrd
+ initrd=
++ rpm -qa
++ grep kernel
++ sort
++ head -n 1
++ cut -d - -f 2,3
+ kernel_version=4.1.10-200.fc22.x86_64
++ echo
++ wc -l
+ '[' 1 -eq 1 ']'
+ cp /boot/initrd-4.1.10-200.fc22.x86_64.img
cp: missing destination file operand after '/boot/initrd-4.1.10-200.fc22.x86_64.img'
Try 'cp --help' for more information.

wc doesn't play well with echo:

❯ echo '' | wc -l
1

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to diskimage-builder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/235705

Changed in diskimage-builder:
assignee: nobody → Martin André (mandre)
status: New → In Progress
Changed in diskimage-builder:
assignee: Martin André (mandre) → Ian Wienand (iwienand)
Ben Nemec (bnemec)
Changed in diskimage-builder:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to diskimage-builder (master)

Reviewed: https://review.openstack.org/235705
Committed: https://git.openstack.org/cgit/openstack/diskimage-builder/commit/?id=d8a0e13261f8df2b963f0f96085c8ceaad654309
Submitter: Jenkins
Branch: master

commit d8a0e13261f8df2b963f0f96085c8ceaad654309
Author: Martin André <email address hidden>
Date: Fri Oct 16 11:11:14 2015 +0900

    Fix uniqueness check of initrd in fedora-minimal

    The check suffered from various flaws.

    First, due to missing quotes around $initrd, 'wc -l' would always see
    1 line no matter how many results the find returned.

    Second, echo adds a line break making 'wc -l' count 1 even for empty
    string. We need to add a check for empty string.

    Change-Id: Ib2c67960f566dbdc471d9585a4cef1beb1cc38ab
    Closes-Bug: #1506692

Changed in diskimage-builder:
status: In Progress → Fix Committed
Changed in diskimage-builder:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.