Package: nss-mdns Version: 0.14.1-1 Severity: minor Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu focal ubuntu-patch
Dear maintainers, In Ubuntu, we are in the process of moving the i386 architecture to a compatibility-only layer on amd64, and therefore we are also moving our autopkgtest infrastructure to test i386 binaries in a cross-environment. This requires changes to some tests so that they are cross-aware and can do the right thing. The nss-mdns tests /almost/ all pass in a cross environment, with the exception of the remove-reinstall test, which fails because it winds up acting on the amd64 package instead of the foreign-arch i386 package: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-focal/focal/i386/n/nss-mdns/20191205_172326_4b1c4@/log.gz The attached patch should be sufficient to let the test pass again, as should be seen here shortly: http://autopkgtest.ubuntu.com/packages/n/nss-mdns/focal/i386 Note that upstream autopkgtest doesn't currently set DEB_HOST_ARCH so this is a complete no-op in Debian for the moment. Support for cross-testing in autopkgtest is currently awaiting review at https://salsa.debian.org/ci-team/autopkgtest/merge_requests/69 and once landed, will still have no effect unless autopkgtest is invoked with a '-a' option. So this change should be safe to land in your package despite this not being upstream in autopkgtest. There are also several autopkgtests in your package which wind up testing the amd64 version of libnss-mdns instead of the i386 version, and giving a false positive test result. I haven't taken the time to fix these, since there are other tests that are at least minimally testing aspects of the i386 package, so it's useful to have the autopkgtests for this package as a whole passing rather than us ignoring the test failures unconditionally for i386. Thanks for considering, -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer https://www.debian.org/ slanga...@ubuntu.com vor...@debian.org
diff -Nru nss-mdns-0.14.1/debian/tests/remove-reinstall nss-mdns-0.14.1/debian/tests/remove-reinstall --- nss-mdns-0.14.1/debian/tests/remove-reinstall 2018-04-25 15:30:42.000000000 -0700 +++ nss-mdns-0.14.1/debian/tests/remove-reinstall 2019-12-05 13:58:02.000000000 -0800 @@ -11,26 +11,36 @@ assert_succeeds avahi-set-host-name "$distinctive_hostname" sleep 3 -assert_succeeds apt-get -y purge libnss-mdns +pkg=libnss-mdns +if [ -n "$DEB_HOST_ARCH" ]; then + pkg="$pkg:$DEB_HOST_ARCH" +fi +assert_succeeds apt-get -y purge "$pkg" assert_succeeds perl -i -pe 's/^hosts:.*/hosts: files dns/' /etc/nsswitch.conf -assert_succeeds apt-get -y install libnss-mdns +assert_succeeds apt-get -y install "$pkg" assert_hosts "hosts: files mdns4_minimal [NOTFOUND=return] dns" -assert_succeeds getent hosts "$distinctive_hostname.local" -assert_succeeds apt-get -y remove libnss-mdns +# This is going to fail on a cross-test because 'getent' is from the testbed arch +if [ -z "$DEB_HOST_ARCH" ]; then + assert_succeeds getent hosts "$distinctive_hostname.local" +fi + +assert_succeeds apt-get -y remove "$pkg" # No assertion about whether it's in nsswitch.conf: debian/tests/nss-behaviour # demonstrates that it doesn't actually matter assert_status 2 getent hosts "$distinctive_hostname.local" echo "# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=500478" echo "# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782282" -assert_succeeds apt-get -y install libnss-mdns +assert_succeeds apt-get -y install "$pkg" assert_hosts "hosts: files mdns4_minimal [NOTFOUND=return] dns" -assert_succeeds getent hosts "$distinctive_hostname.local" +if [ -z "$DEB_HOST_ARCH" ]; then + assert_succeeds getent hosts "$distinctive_hostname.local" +fi -assert_succeeds apt-get -y purge libnss-mdns +assert_succeeds apt-get -y purge "$pkg" assert_hosts "hosts: files dns" assert_status 2 getent hosts "$distinctive_hostname.local"