]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-50-DISSECT: Don't log image contents to console
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 26 Apr 2024 11:51:49 +0000 (13:51 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 26 Apr 2024 11:51:49 +0000 (13:51 +0200)
These can contain quite a few files, so let's not write every single
file and directory straight to the console to speed things up.

test/units/testsuite-50.dissect.sh
test/units/testsuite-50.mountnfsd.sh

index de69b72ef1285b45a62d667ba615b7f2e35e1068..991346fd6e30ad2a196455ff0a0f055222e1425b 100755 (executable)
@@ -670,8 +670,8 @@ systemctl stop test-root-ephemeral
 timeout 10 bash -c 'until test -z "$(ls -A /var/lib/systemd/ephemeral-trees)"; do sleep .5; done'
 test ! -f /tmp/img/abc
 
-systemd-dissect --mtree /tmp/img
-systemd-dissect --list /tmp/img
+systemd-dissect --mtree /tmp/img >/dev/null
+systemd-dissect --list /tmp/img >/dev/null
 
 read -r SHA256SUM1 _ < <(systemd-dissect --copy-from /tmp/img etc/os-release | sha256sum)
 test "$SHA256SUM1" != ""
index 59974e41e6265979d37f31cd21e3bc79b97e19dd..7fd55980f93212208fcfe601422dbef297aab8e2 100755 (executable)
@@ -45,7 +45,7 @@ SYSTEMD_REPART_OVERRIDE_FSTYPE=squashfs \
 systemd-dissect --rmdir --umount /tmp/unpriv/mount
 
 systemd-dissect --image-policy='root=unprotected:=absent+unused' /var/tmp/unpriv.raw
-systemd-dissect --image-policy='root=unprotected:=absent+unused' --mtree /var/tmp/unpriv.raw | tee /tmp/unpriv.raw.mtree
+systemd-dissect --image-policy='root=unprotected:=absent+unused' --mtree /var/tmp/unpriv.raw >/tmp/unpriv.raw.mtree
 
 # Run unpriv, should fail due to lack of privs
 (! runas testuser systemd-dissect /var/tmp/unpriv.raw)
@@ -65,7 +65,7 @@ cp /tmp/test-50-unpriv-cert.crt /run/verity.d
 
 # Now run unpriv again, should be OK now.
 runas testuser systemd-dissect /var/tmp/unpriv.raw
-runas testuser systemd-dissect --mtree /var/tmp/unpriv.raw | tee /tmp/unpriv2.raw.mtree
+runas testuser systemd-dissect --mtree /var/tmp/unpriv.raw >/tmp/unpriv2.raw.mtree
 
 # Check that unpriv and priv run yielded same results
 cmp /tmp/unpriv.raw.mtree /tmp/unpriv2.raw.mtree