** Description changed: While preparing a potential update of util-linux (LP#2142862) and doing a test build in PPA, I noticed that one test case fails (on all platforms). " 1 tests of 337 FAILED - setpriv/landlock + setpriv/landlock make[5]: *** [Makefile:19529: check-local-tests] Error 1 ... dh_auto_test: error: make -j1 check ... returned exit code 2 " The The failing sub-test is setpriv/landlock → partial-access-fail, and the "failure" is a string mismatch (stonking_s390x.txt:12227): The test case seems to expect cp output from GNU coreutils, since it works with it. It looks for: cp: cannot create regular file '/dev/zero': Permission denied But the coreutils-from-uutils cp produces in the same test case this: cp: '/dev/null' -> '/dev/zero': Permission denied Which leads to a failed test. - The chroot that is used while building in PPA for stonking has - coreutils-from-uutils 0.0.0~ubuntu27 (Rust). + The chroot that is used while building in PPA for stonking has coreutils-from-uutils 0.0.0~ubuntu27 (Rust). + https://launchpad.net/~fheimes/+archive/ubuntu/lp2142862 While rebuilding the stonking package again in PPA with -proposed disabled, the test is again successful. This is the PPA where -proposed is enabled and where the util-linux test case fails: - rust-coreutils amd64 0.8.0-0ubuntu4 [4219 kB] - coreutils all 9.5-1ubuntu2+0.0.0~ubuntu27 [3234 B] - coreutils-from-uutils all 0.0.0~ubuntu27 [7246 B] - gnu-coreutils amd64 9.7-3ubuntu2 [1340 kB] + rust-coreutils amd64 0.8.0-0ubuntu4 [4219 kB] + coreutils all 9.5-1ubuntu2+0.0.0~ubuntu27 [3234 B] + coreutils-from-uutils all 0.0.0~ubuntu27 [7246 B] + gnu-coreutils amd64 9.7-3ubuntu2 [1340 kB] This is the PPA where -proposed is NOT enabled and hwre the util-linux test case succeeds: - https://launchpad.net/~fheimes/+archive/ubuntu/lp2142862-non-proposed/+packages - coreutils all 9.5-1ubuntu2+0.0.0~ubuntu25 [3060 B] - coreutils-from-uutils all 0.0.0~ubuntu25 [7124 B] - gnu-coreutils amd64 9.7-3ubuntu2 [1340 kB] - rust-coreutils amd64 0.8.0-0ubuntu3 [4235 kB] + https://launchpad.net/~fheimes/+archive/ubuntu/lp2142862-non-proposed + coreutils all 9.5-1ubuntu2+0.0.0~ubuntu25 [3060 B] + coreutils-from-uutils all 0.0.0~ubuntu25 [7124 B] + gnu-coreutils amd64 9.7-3ubuntu2 [1340 kB] + rust-coreutils amd64 0.8.0-0ubuntu3 [4235 kB] /usr/bin/cp is from coreutils-from-uutils. So the suspicious package is therefore coreutils-from-uutils / rust- coreutils. - A potential patch for the test case itself could be: --- a/tests/ts/setpriv/landlock +++ b/tests/ts/setpriv/landlock @@ -38,6 +38,12 @@ - "$TS_CMD_SETPRIV" --landlock-access \ - fs:write cp /dev/null /dev/zero \ - &> "$TS_OUTPUT" + "$TS_CMD_SETPRIV" --landlock-access \ + fs:write cp /dev/null /dev/zero \ + &> "$TS_OUTPUT" +# GNU coreutils and uutils-coreutils word the cp(1) failure differently, e.g. +# GNU: cp: cannot create regular file '/dev/zero': Permission denied +# uutils: cp: '/dev/null' -> '/dev/zero': Permission denied +# Normalize so the test passes with either implementation, while still +# asserting that writing /dev/zero was denied by landlock. +sed -i "s|^cp:.*'/dev/zero'.*Permission denied\$|cp: '/dev/zero': Permission denied|" "$TS_OUTPUT" - ts_finalize_subtest - - ts_init_subtest "partial-access-success" + ts_finalize_subtest + + ts_init_subtest "partial-access-success" --- a/tests/expected/setpriv/landlock-partial-access-fail +++ b/tests/expected/setpriv/landlock-partial-access-fail @@ -1 +1 @@ -cp: cannot create regular file '/dev/zero': Permission denied +cp: '/dev/zero': Permission denied But since the new Rust coreutils is supposed to be a drop-in replacement, and since this works on the previous version (the one not in -proposed), this is a regression and sould be fixed in coreutils.
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2157011 Title: changes in behaviour of cp in coreutils-from-uutils break test case in util-linux To manage notifications about this bug go to: https://bugs.launchpad.net/rust-coreutils/+bug/2157011/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
