]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-execute: make find invocation a bit more efficent, increase timeout 8575/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 11 Apr 2018 14:50:48 +0000 (16:50 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 16 Apr 2018 14:09:46 +0000 (16:09 +0200)
We go through the whole file system, so this test can take arbitrary time.  But
this test is still quite useful, so let's at least try to make it more efficent
by not descending at all into the directories we would filter out later on
anyway.

Also increase the timeout, in case the previous step doesn't help enough.

src/test/meson.build
test/test-execute/exec-dynamicuser-statedir.service

index 205a09d62a5ac2d62997ed578fd1f98a2c75954c..3b1201f3e940e4d1225be604bbe167c78e9b81d4 100644 (file)
@@ -566,7 +566,8 @@ tests += [
           libseccomp,
           libselinux,
           libmount,
-          libblkid]],
+          libblkid],
+         '', 'timeout=360'],
 
         [['src/test/test-siphash24.c'],
          [],
index c771717904c82de2d22c854cfee9f29f8a1d6ed4..f459f3c1eb9a7af7866b98f455eeb0ad410e3d9a 100644 (file)
@@ -12,7 +12,7 @@ ExecStart=test -f /var/lib/private/waldo/yay
 ExecStart=test -f /var/lib/private/quux/pief/yayyay
 
 # Make sure that /var/lib/private/waldo is really the only writable directory besides the obvious candidates
-ExecStart=sh -x -c 'test $$(find / -type d -writable 2> /dev/null | egrep -v -e \'^(/var/tmp$$|/tmp$$|/proc/|/dev/mqueue$$|/dev/shm$$|/sys/fs/bpf$$)\' | sort -u | tr -d '\\\\n') = /var/lib/private/quux/pief/var/lib/private/waldo'
+ExecStart=sh -x -c 'test $$(find / \( -path /var/tmp -o -path /tmp -o -path /proc -o -path /dev/mqueue -o -path /dev/shm -o -path /sys/fs/bpf \) -prune -o -type d -writable -print 2>/dev/null | sort -u | tr -d '\\\\n') = /var/lib/private/quux/pief/var/lib/private/waldo'
 
 Type=oneshot
 DynamicUser=yes