From d9b9484b4af2a21c3f5dea6ec10a3128e7304d07 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 7 Jul 2020 19:08:29 +0200 Subject: Fix test due to display change in ls (coreutils 8.32) The test runs ls on the opened fds and greps the result for 'root root' which is how ls (<= 8.30) used to report user and group for these. Now that Debian contains 8.32 it reports user and group of the process owning them (supposedly). grepping for both unbreaks the test. lr-x------ 1 root root 64 Jul 7 19:07 0 -> 'pipe:[10458045]' lrwx------ 1 root root 64 Jul 7 19:07 1 -> /dev/pts/12 lrwx------ 1 root root 64 Jul 7 19:07 2 -> /dev/pts/12 lr-x------ 1 root root 64 Jul 7 19:07 3 -> /proc/1266484/fd vs (assuming user:group is david:david) lr-x------ 1 david david 64 Jul 7 19:07 0 -> 'pipe:[10458045]' lrwx------ 1 david david 64 Jul 7 19:07 1 -> /dev/pts/12 lrwx------ 1 david david 64 Jul 7 19:07 2 -> /dev/pts/12 lr-x------ 1 david david 64 Jul 7 19:07 3 -> /proc/1266484/fd --- test/integration/test-no-fds-leaked-to-maintainer-scripts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/integration/test-no-fds-leaked-to-maintainer-scripts b/test/integration/test-no-fds-leaked-to-maintainer-scripts index 85b3d0ee1..4606408fc 100755 --- a/test/integration/test-no-fds-leaked-to-maintainer-scripts +++ b/test/integration/test-no-fds-leaked-to-maintainer-scripts @@ -40,7 +40,7 @@ testsuccess aptget install -y fdleaks -qq < /dev/null checkfdleak() { msgtest 'Check if fds were not' "leaked: expect $1" - if [ "$(grep 'root root' rootdir/tmp/testsuccess.output | wc -l)" = "$1" ]; then + if [ "$(grep -e 'root root' -e "$(id -un) $(id -gn)" rootdir/tmp/testsuccess.output | wc -l)" = "$1" ]; then msgpass else echo -- cgit v1.2.3-18-g5258