From: Daan De Meyer Date: Fri, 26 Apr 2024 11:51:49 +0000 (+0200) Subject: TEST-50-DISSECT: Don't log image contents to console X-Git-Tag: v256-rc2~192^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcbf0be1b7c70537a932377d553d356366642b7f;p=thirdparty%2Fsystemd.git TEST-50-DISSECT: Don't log image contents to console 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. --- diff --git a/test/units/testsuite-50.dissect.sh b/test/units/testsuite-50.dissect.sh index de69b72ef12..991346fd6e3 100755 --- a/test/units/testsuite-50.dissect.sh +++ b/test/units/testsuite-50.dissect.sh @@ -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" != "" diff --git a/test/units/testsuite-50.mountnfsd.sh b/test/units/testsuite-50.mountnfsd.sh index 59974e41e62..7fd55980f93 100755 --- a/test/units/testsuite-50.mountnfsd.sh +++ b/test/units/testsuite-50.mountnfsd.sh @@ -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