]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: don't mount /sys & /proc if already mounted
authorFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 18 May 2023 13:52:43 +0000 (15:52 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 18 May 2023 14:50:24 +0000 (16:50 +0200)
test/test-functions

index bdbc9fdd7c85474168d01fee22114de1f5b0ae3b..f36c38e8f6e27a1171b2b491619590b739becf73 100644 (file)
@@ -884,8 +884,8 @@ INNER_EOF
 # Let's make one to prevent unexpected "<bin> not found" issues in the future
 export PATH="/sbin:/bin:/usr/sbin:/usr/bin"
 
-mount -t proc proc /proc
-mount -t sysfs sysfs /sys
+mountpoint -q /proc || mount -t proc proc /proc
+mountpoint -q /sys || mount -t sysfs sysfs /sys
 mount -o remount,rw /
 
 DEFAULT_ENVIRONMENT="\$DEFAULT_ENVIRONMENT ASAN_RT_PATH=$ASAN_RT_PATH"