Package: fcoe-utils Version: 1.0.31+git20160622.5dfd3e4-4 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu cosmic ubuntu-patch
In Ubuntu, the attached patch was applied to achieve the following: * Filter non-error message about PCI capability support from stderr in our autopkgtests for qemu platforms where we find a PCI bridge without caps. On the Ubuntu autopkgtest VMs, we discovered that sometimes fcoeadm discovers a PCI bridge, and sometimes it doesn't. For instance, on amd64, it currently does not, but on i386 and arm64, it does. When it discovers a bridge, it then helpfully yells at us that PCI caps aren't supported, and does said yelling to stderr, which autopkgtest then interprets as a test failure. There are three ways of dealing with this: 1) Patch the upstream code to output that to stdout, not stderr, it doesn't really seem like an ERROR, per se, more informative. 2) Filter that message out of stderr for the tests (this is what I do here) 3) Ignore stderr in autopkgtest, but I think that's a silly idea, as we may well care about OTHER things on stderr and want to treat that as a fail. So, yeah. As mentioned, this patch went for the middle option as the path of least obvious ick. I had to change the test script to /bin/bash to make use of silly subshell redirection tricks, but it fixes the problem for us, and the tests now pass[1] on arm64 and i386. ... Adam [1] http://autopkgtest.ubuntu.com/packages/fcoe-utils -- System Information: Debian Release: buster/sid APT prefers cosmic APT policy: (500, 'cosmic') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.17.0-7-lowlatency (SMP w/4 CPU cores; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_CA:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
diff -Nru fcoe-utils-1.0.31+git20160622.5dfd3e4/debian/tests/fcoemon fcoe-utils-1.0.31+git20160622.5dfd3e4/debian/tests/fcoemon --- fcoe-utils-1.0.31+git20160622.5dfd3e4/debian/tests/fcoemon 2018-07-18 22:01:35.000000000 -0600 +++ fcoe-utils-1.0.31+git20160622.5dfd3e4/debian/tests/fcoemon 2018-08-27 15:36:07.000000000 -0600 @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e @@ -14,7 +14,7 @@ run fcoeadm --create $IFACE run fcoeadm --reset $IFACE run fcoeadm --Scan $IFACE -run fcoeadm --interface +run fcoeadm --interface 2> >(grep -v "^PCI capabilities are not supported$" >&2) run fcoeadm --fcf run fcoeadm --target run fcoeadm --lun