712866
From d2fd423a8de2cc4fa0325f5a371582f429c05a26 Mon Sep 17 00:00:00 2001
712866
From: Harald Hoyer <harald@redhat.com>
712866
Date: Thu, 10 Nov 2016 14:57:05 +0100
712866
Subject: [PATCH] test: remove sudo calls
712866
712866
rather run:
712866
712866
$ sudo make check
712866
---
712866
 test/TEST-01-BASIC/test.sh              |  4 ++--
712866
 test/TEST-02-SYSTEMD/test.sh            |  4 ++--
712866
 test/TEST-03-USR-MOUNT/test.sh          |  4 ++--
712866
 test/TEST-04-FULL-SYSTEMD/test.sh       |  2 +-
712866
 test/TEST-10-RAID/test.sh               |  4 ++--
712866
 test/TEST-11-LVM/test.sh                |  4 ++--
712866
 test/TEST-12-RAID-DEG/test.sh           |  4 ++--
712866
 test/TEST-13-ENC-RAID-LVM/test.sh       |  4 ++--
712866
 test/TEST-14-IMSM/test.sh               |  4 ++--
712866
 test/TEST-15-BTRFSRAID/test.sh          |  4 ++--
712866
 test/TEST-16-DMSQUASH/test.sh           |  4 ++--
712866
 test/TEST-17-LVM-THIN/test.sh           |  4 ++--
712866
 test/TEST-20-NFS/test.sh                | 16 ++++++++--------
712866
 test/TEST-30-ISCSI/test.sh              | 16 ++++++++--------
712866
 test/TEST-40-NBD/test.sh                | 24 ++++++++++++------------
712866
 test/TEST-50-MULTINIC/test.sh           | 12 ++++++------
712866
 test/TEST-60-MTUMAC/test.sh             | 10 +++++-----
712866
 test/TEST-70-BONDBRIDGETEAMVLAN/test.sh | 10 +++++-----
712866
 test/run-qemu                           |  2 +-
712866
 19 files changed, 68 insertions(+), 68 deletions(-)
712866
712866
diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh
5c6c2a
index aef07373..97e8017e 100755
712866
--- a/test/TEST-01-BASIC/test.sh
712866
+++ b/test/TEST-01-BASIC/test.sh
712866
@@ -45,7 +45,7 @@ test_setup() {
712866
 	find_binary plymouth >/dev/null && inst_multiple plymouth
712866
 	(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
712866
 	cp -a /etc/ld.so.conf* $initdir/etc
712866
-	sudo ldconfig -r "$initdir"
712866
+	ldconfig -r "$initdir"
712866
     )
712866
 
712866
     # second, install the files needed to make the root filesystem
712866
@@ -85,7 +85,7 @@ test_setup() {
712866
 	inst_hook emergency 000 ./hard-off.sh
712866
 	inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
712866
     )
712866
-    sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
+    $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
 	-a "debug watchdog" \
712866
         -o "plymouth" \
712866
 	-d "piix ide-gd_mod ata_piix ext3 sd_mod i6300esb ib700wdt" \
712866
diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh
5c6c2a
index 6f33181c..2a077b04 100755
712866
--- a/test/TEST-02-SYSTEMD/test.sh
712866
+++ b/test/TEST-02-SYSTEMD/test.sh
712866
@@ -45,7 +45,7 @@ test_setup() {
712866
 	find_binary plymouth >/dev/null && inst_multiple plymouth
712866
 	(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
712866
 	cp -a /etc/ld.so.conf* $initdir/etc
712866
-	sudo ldconfig -r "$initdir"
712866
+	ldconfig -r "$initdir"
712866
     )
712866
 
712866
     # second, install the files needed to make the root filesystem
712866
@@ -85,7 +85,7 @@ test_setup() {
712866
 	inst_hook emergency 000 ./hard-off.sh
712866
 	inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
712866
     )
712866
-    sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
+    $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
 	-a "debug systemd" \
712866
 	-o "network plymouth" \
712866
 	-d "piix ide-gd_mod ata_piix ext3 sd_mod" \
712866
diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh
5c6c2a
index 363f8b04..c3f810ab 100755
712866
--- a/test/TEST-03-USR-MOUNT/test.sh
712866
+++ b/test/TEST-03-USR-MOUNT/test.sh
712866
@@ -72,7 +72,7 @@ test_setup() {
712866
 	find_binary plymouth >/dev/null && inst_multiple plymouth
712866
 	(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
712866
 	cp -a /etc/ld.so.conf* $initdir/etc
712866
-	sudo ldconfig -r "$initdir"
712866
+	ldconfig -r "$initdir"
712866
     )
712866
 
712866
     # second, install the files needed to make the root filesystem
712866
@@ -119,7 +119,7 @@ test_setup() {
712866
 	inst_hook emergency 000 ./hard-off.sh
712866
 	inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
712866
     )
712866
-    sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
+    $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
 	-a "debug" \
712866
         -o "network plymouth" \
712866
 	-d "piix ide-gd_mod ata_piix btrfs sd_mod i6300esb ib700wdt" \
712866
diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh
5c6c2a
index 93c33890..1adb34e9 100755
712866
--- a/test/TEST-04-FULL-SYSTEMD/test.sh
712866
+++ b/test/TEST-04-FULL-SYSTEMD/test.sh
712866
@@ -263,7 +263,7 @@ EOF
712866
 	inst_hook emergency 000 ./hard-off.sh
712866
 	inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
712866
     )
712866
-    sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
+    $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
 	-a "debug systemd" \
712866
 	-I "/etc/machine-id /etc/hostname" \
712866
         -o "network plymouth lvm mdraid resume crypt i18n caps dm terminfo usrmount" \
712866
diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh
5c6c2a
index 45edda2c..7f99c0e0 100755
712866
--- a/test/TEST-10-RAID/test.sh
712866
+++ b/test/TEST-10-RAID/test.sh
712866
@@ -43,7 +43,7 @@ test_setup() {
712866
 	inst_multiple -o /lib/systemd/systemd-shutdown
712866
 	find_binary plymouth >/dev/null && inst_multiple plymouth
712866
 	cp -a /etc/ld.so.conf* $initdir/etc
712866
-	sudo ldconfig -r "$initdir"
712866
+	ldconfig -r "$initdir"
712866
     )
712866
 
712866
     # second, install the files needed to make the root filesystem
712866
@@ -88,7 +88,7 @@ test_setup() {
712866
 	inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
712866
     )
712866
 
712866
-    sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
+    $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
 	-o "plymouth network" \
712866
 	-a "debug" \
712866
 	-d "piix ide-gd_mod ata_piix ext2 sd_mod" \
712866
diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh
5c6c2a
index dd1f8ead..a4ee86da 100755
712866
--- a/test/TEST-11-LVM/test.sh
712866
+++ b/test/TEST-11-LVM/test.sh
712866
@@ -40,7 +40,7 @@ test_setup() {
712866
 	(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
712866
 	cp -a /etc/ld.so.conf* $initdir/etc
712866
 	mkdir $initdir/run
712866
-	sudo ldconfig -r "$initdir"
712866
+	ldconfig -r "$initdir"
712866
     )
712866
 
712866
     # second, install the files needed to make the root filesystem
712866
@@ -74,7 +74,7 @@ test_setup() {
712866
 	inst_hook emergency 000 ./hard-off.sh
712866
 	inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
712866
     )
712866
-    sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
+    $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
 	-o "plymouth network" \
712866
 	-a "debug" \
712866
 	-d "piix ide-gd_mod ata_piix ext2 sd_mod" \
712866
diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh
5c6c2a
index 5f9cfc56..aae5e8b4 100755
712866
--- a/test/TEST-12-RAID-DEG/test.sh
712866
+++ b/test/TEST-12-RAID-DEG/test.sh
712866
@@ -81,7 +81,7 @@ test_setup() {
712866
 	find_binary plymouth >/dev/null && inst_multiple plymouth
712866
 	(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
712866
 	cp -a /etc/ld.so.conf* $initdir/etc
712866
-	sudo ldconfig -r "$initdir"
712866
+	ldconfig -r "$initdir"
712866
     )
712866
 
712866
     # second, install the files needed to make the root filesystem
712866
@@ -131,7 +131,7 @@ test_setup() {
712866
         echo -n test > $initdir/etc/key
712866
     )
712866
 
712866
-    sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
+    $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
 	-o "plymouth network" \
712866
 	-a "debug" \
712866
 	-d "piix ide-gd_mod ata_piix ext2 sd_mod" \
712866
diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh
5c6c2a
index 94801e47..8194166b 100755
712866
--- a/test/TEST-13-ENC-RAID-LVM/test.sh
712866
+++ b/test/TEST-13-ENC-RAID-LVM/test.sh
712866
@@ -77,7 +77,7 @@ test_setup() {
712866
 	find_binary plymouth >/dev/null && inst_multiple plymouth
712866
 	(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
712866
 	cp -a /etc/ld.so.conf* $initdir/etc
712866
-	sudo ldconfig -r "$initdir"
712866
+	ldconfig -r "$initdir"
712866
     )
712866
 
712866
     # second, install the files needed to make the root filesystem
712866
@@ -127,7 +127,7 @@ test_setup() {
712866
         done > $initdir/etc/crypttab
712866
         echo -n test > $initdir/etc/key
712866
     )
712866
-    sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
+    $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
 	-o "plymouth network" \
712866
 	-a "debug" \
712866
 	-d "piix ide-gd_mod ata_piix ext2 sd_mod" \
712866
diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh
5c6c2a
index 8e99b1f6..783ec4a5 100755
712866
--- a/test/TEST-14-IMSM/test.sh
712866
+++ b/test/TEST-14-IMSM/test.sh
712866
@@ -70,7 +70,7 @@ test_setup() {
712866
 	(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
712866
 	cp -a /etc/ld.so.conf* $initdir/etc
712866
 	mkdir $initdir/run
712866
-	sudo ldconfig -r "$initdir"
712866
+	ldconfig -r "$initdir"
712866
     )
712866
 
712866
     # second, install the files needed to make the root filesystem
712866
@@ -109,7 +109,7 @@ test_setup() {
712866
 	inst_hook emergency 000 ./hard-off.sh
712866
 	inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
712866
     )
712866
-    sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
+    $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
 	-o "plymouth network" \
712866
 	-a "debug" \
712866
 	-d "piix ide-gd_mod ata_piix ext2 sd_mod" \
712866
diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh
5c6c2a
index c086677f..1e3e18c1 100755
712866
--- a/test/TEST-15-BTRFSRAID/test.sh
712866
+++ b/test/TEST-15-BTRFSRAID/test.sh
712866
@@ -41,7 +41,7 @@ test_setup() {
712866
 	find_binary plymouth >/dev/null && inst_multiple plymouth
712866
 	(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
712866
 	cp -a /etc/ld.so.conf* $initdir/etc
712866
-	sudo ldconfig -r "$initdir"
712866
+	ldconfig -r "$initdir"
712866
     )
712866
 
712866
     # second, install the files needed to make the root filesystem
712866
@@ -82,7 +82,7 @@ test_setup() {
712866
 	inst_hook emergency 000 ./hard-off.sh
712866
 	inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
712866
     )
712866
-    sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
+    $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
 	-o "plymouth network" \
712866
 	-a "debug" \
712866
 	-d "piix ide-gd_mod ata_piix btrfs sd_mod" \
712866
diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh
5c6c2a
index e80ec5c2..6daa35e7 100755
712866
--- a/test/TEST-16-DMSQUASH/test.sh
712866
+++ b/test/TEST-16-DMSQUASH/test.sh
712866
@@ -38,7 +38,7 @@ test_setup() {
712866
 
712866
     dd if=/dev/zero of="$TESTDIR"/root.img count=100
712866
 
712866
-    sudo $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \
712866
+    $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \
712866
 	-a "debug dmsquash-live" \
712866
 	-d "piix ide-gd_mod ata_piix ext3 sd_mod sr_mod" \
712866
 	-f "$TESTDIR"/initramfs.testing "$KVERSION" || return 1
712866
@@ -69,7 +69,7 @@ test_setup() {
712866
 	find_binary plymouth >/dev/null && inst_multiple plymouth
712866
 	(cd "$initdir"; mkdir -p -- dev sys proc etc var/run tmp )
712866
 	cp -a -- /etc/ld.so.conf* "$initdir"/etc
712866
-	sudo ldconfig -r "$initdir"
712866
+	ldconfig -r "$initdir"
712866
     )
712866
     python create.py -d -c livecd-fedora-minimal.ks
712866
     return 0
712866
diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh
5c6c2a
index dc6e5885..f15e1a3d 100755
712866
--- a/test/TEST-17-LVM-THIN/test.sh
712866
+++ b/test/TEST-17-LVM-THIN/test.sh
712866
@@ -40,7 +40,7 @@ test_setup() {
712866
 	(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
712866
 	cp -a /etc/ld.so.conf* $initdir/etc
712866
 	mkdir $initdir/run
712866
-	sudo ldconfig -r "$initdir"
712866
+	ldconfig -r "$initdir"
712866
     )
712866
 
712866
     # second, install the files needed to make the root filesystem
712866
@@ -74,7 +74,7 @@ test_setup() {
712866
 	inst_hook emergency 000 ./hard-off.sh
712866
 	inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
712866
     )
712866
-    sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
+    $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
 	-o "plymouth network" \
712866
 	-a "debug" -I lvs \
712866
 	-d "piix ide-gd_mod ata_piix ext2 sd_mod" \
712866
diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh
5c6c2a
index 49dbc10e..64fc5501 100755
712866
--- a/test/TEST-20-NFS/test.sh
712866
+++ b/test/TEST-20-NFS/test.sh
712866
@@ -26,7 +26,7 @@ run_server() {
712866
         -append "rd.debug loglevel=77 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \
712866
         -initrd $TESTDIR/initramfs.server \
712866
         -pidfile $TESTDIR/server.pid -daemonize || return 1
712866
-    sudo chmod 644 $TESTDIR/server.pid || return 1
712866
+    chmod 644 $TESTDIR/server.pid || return 1
712866
 
712866
     # Cleanup the terminal if we have one
712866
     tty -s && stty sane
712866
@@ -185,7 +185,7 @@ test_nfsv4() {
712866
 
712866
 test_run() {
712866
     if [[ -s server.pid ]]; then
712866
-        sudo kill -TERM $(cat $TESTDIR/server.pid)
712866
+        kill -TERM $(cat $TESTDIR/server.pid)
712866
         rm -f -- $TESTDIR/server.pid
712866
     fi
712866
 
712866
@@ -200,7 +200,7 @@ test_run() {
712866
     ret=$?
712866
 
712866
     if [[ -s $TESTDIR/server.pid ]]; then
712866
-        sudo kill -TERM $(cat $TESTDIR/server.pid)
712866
+        kill -TERM $(cat $TESTDIR/server.pid)
712866
         rm -f -- $TESTDIR/server.pid
712866
     fi
712866
 
712866
@@ -212,7 +212,7 @@ test_setup() {
712866
     dd if=/dev/null of=$TESTDIR/server.ext3 bs=1M seek=60
712866
     mke2fs -j -F $TESTDIR/server.ext3
712866
     mkdir $TESTDIR/mnt
712866
-    sudo mount -o loop $TESTDIR/server.ext3 $TESTDIR/mnt
712866
+    mount -o loop $TESTDIR/server.ext3 $TESTDIR/mnt
712866
 
712866
 
712866
     export kernel=$KVERSION
712866
@@ -279,7 +279,7 @@ test_setup() {
712866
         inst /etc/group /etc/group
712866
 
712866
         cp -a /etc/ld.so.conf* $initdir/etc
712866
-        sudo ldconfig -r "$initdir"
712866
+        ldconfig -r "$initdir"
712866
         dracut_kernel_post
712866
     )
712866
 
712866
@@ -318,14 +318,14 @@ test_setup() {
712866
         inst_libdir_file -n "$_nsslibs" 'libnss_*.so*'
712866
 
712866
         cp -a /etc/ld.so.conf* $initdir/etc
712866
-        sudo ldconfig -r "$initdir"
712866
+        ldconfig -r "$initdir"
712866
     )
712866
 
712866
     mkdir -p $TESTDIR/mnt/nfs/nfs3-5
712866
     mkdir -p $TESTDIR/mnt/nfs/ip/192.168.50.101
712866
     mkdir -p $TESTDIR/mnt/nfs/tftpboot/nfs4-5
712866
 
712866
-    sudo umount $TESTDIR/mnt
712866
+    umount $TESTDIR/mnt
712866
     rm -fr -- $TESTDIR/mnt
712866
 
712866
     # Make an overlay with needed tools for the test harness
712866
@@ -354,7 +354,7 @@ test_setup() {
712866
 
712866
 test_cleanup() {
712866
     if [[ -s $TESTDIR/server.pid ]]; then
712866
-        sudo kill -TERM $(cat $TESTDIR/server.pid)
712866
+        kill -TERM $(cat $TESTDIR/server.pid)
712866
         rm -f -- $TESTDIR/server.pid
712866
     fi
712866
 }
712866
diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh
5c6c2a
index 5e59f0a8..62bef9cc 100755
712866
--- a/test/TEST-30-ISCSI/test.sh
712866
+++ b/test/TEST-30-ISCSI/test.sh
712866
@@ -28,7 +28,7 @@ run_server() {
712866
         -append "root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \
712866
         -initrd $TESTDIR/initramfs.server \
712866
         -pidfile $TESTDIR/server.pid -daemonize || return 1
712866
-    sudo chmod 644 $TESTDIR/server.pid || return 1
712866
+    chmod 644 $TESTDIR/server.pid || return 1
712866
 
712866
     # Cleanup the terminal if we have one
712866
     tty -s && stty sane
712866
@@ -129,7 +129,7 @@ test_run() {
712866
     do_test_run
712866
     ret=$?
712866
     if [[ -s $TESTDIR/server.pid ]]; then
712866
-        sudo kill -TERM $(cat $TESTDIR/server.pid)
712866
+        kill -TERM $(cat $TESTDIR/server.pid)
712866
         rm -f -- $TESTDIR/server.pid
712866
     fi
712866
     return $ret
712866
@@ -169,7 +169,7 @@ test_setup() {
712866
         inst_simple /etc/os-release
712866
         inst ./client-init.sh /sbin/init
712866
         cp -a /etc/ld.so.conf* $initdir/etc
712866
-        sudo ldconfig -r "$initdir"
712866
+        ldconfig -r "$initdir"
712866
     )
712866
 
712866
     # second, install the files needed to make the root filesystem
712866
@@ -216,7 +216,7 @@ test_setup() {
712866
         inst_hook emergency 000 ./hard-off.sh
712866
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
712866
     )
712866
-    sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
+    $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
         -o "plymouth dmraid nfs" \
712866
         -a "debug" \
712866
         -d "af_packet piix ide-gd_mod ata_piix ext3 sd_mod" \
712866
@@ -227,7 +227,7 @@ test_setup() {
712866
     dd if=/dev/null of=$TESTDIR/server.ext3 bs=1M seek=60
712866
     mkfs.ext3 -j -F $TESTDIR/server.ext3
712866
     mkdir $TESTDIR/mnt
712866
-    sudo mount -o loop $TESTDIR/server.ext3 $TESTDIR/mnt
712866
+    mount -o loop $TESTDIR/server.ext3 $TESTDIR/mnt
712866
 
712866
     kernel=$KVERSION
712866
     (
712866
@@ -259,11 +259,11 @@ test_setup() {
712866
         inst /etc/group /etc/group
712866
 
712866
         cp -a /etc/ld.so.conf* $initdir/etc
712866
-        sudo ldconfig -r "$initdir"
712866
+        ldconfig -r "$initdir"
712866
         dracut_kernel_post
712866
     )
712866
 
712866
-    sudo umount $TESTDIR/mnt
712866
+    umount $TESTDIR/mnt
712866
     rm -fr -- $TESTDIR/mnt
712866
 
712866
     # Make server's dracut image
712866
@@ -277,7 +277,7 @@ test_setup() {
712866
 
712866
 test_cleanup() {
712866
     if [[ -s $TESTDIR/server.pid ]]; then
712866
-        sudo kill -TERM $(cat $TESTDIR/server.pid)
712866
+        kill -TERM $(cat $TESTDIR/server.pid)
712866
         rm -f -- $TESTDIR/server.pid
712866
     fi
712866
 }
712866
diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh
5c6c2a
index 848a103f..73123c22 100755
712866
--- a/test/TEST-40-NBD/test.sh
712866
+++ b/test/TEST-40-NBD/test.sh
712866
@@ -26,7 +26,7 @@ run_server() {
712866
         -kernel /boot/vmlinuz-$KVERSION \
712866
         -append "root=/dev/sda rootfstype=ext2 rw quiet console=ttyS0,115200n81 selinux=0" \
712866
         -initrd $TESTDIR/initramfs.server -pidfile $TESTDIR/server.pid -daemonize || return 1
712866
-    sudo chmod 644 $TESTDIR/server.pid || return 1
712866
+    chmod 644 $TESTDIR/server.pid || return 1
712866
 
712866
     # Cleanup the terminal if we have one
712866
     tty -s && stty sane
712866
@@ -179,7 +179,7 @@ client_run() {
712866
         "root=LABEL=dracut rd.luks.uuid=$ID_FS_UUID rd.lv.vg=dracut netroot=dhcp" || return 1
712866
 
712866
     if [[ -s server.pid ]]; then
712866
-        sudo kill -TERM $(cat $TESTDIR/server.pid)
712866
+        kill -TERM $(cat $TESTDIR/server.pid)
712866
         rm -f -- $TESTDIR/server.pid
712866
     fi
712866
 
712866
@@ -207,7 +207,7 @@ make_encrypted_root() {
712866
         inst_simple /etc/os-release
712866
         find_binary plymouth >/dev/null && inst_multiple plymouth
712866
         cp -a /etc/ld.so.conf* $initdir/etc
712866
-        sudo ldconfig -r "$initdir"
712866
+        ldconfig -r "$initdir"
712866
     )
712866
 
712866
     # second, install the files needed to make the root filesystem
712866
@@ -247,7 +247,7 @@ make_client_root() {
712866
     dd if=/dev/null of=$TESTDIR/nbd.ext2 bs=1M seek=30
712866
     mke2fs -F -j $TESTDIR/nbd.ext2
712866
     mkdir $TESTDIR/mnt
712866
-    sudo mount -o loop $TESTDIR/nbd.ext2 $TESTDIR/mnt
712866
+    mount -o loop $TESTDIR/nbd.ext2 $TESTDIR/mnt
712866
 
712866
     kernel=$KVERSION
712866
     (
712866
@@ -271,10 +271,10 @@ make_client_root() {
712866
             inst $i
712866
         done
712866
         cp -a /etc/ld.so.conf* $initdir/etc
712866
-        sudo ldconfig -r "$initdir"
712866
+        ldconfig -r "$initdir"
712866
     )
712866
 
712866
-    sudo umount $TESTDIR/mnt
712866
+    umount $TESTDIR/mnt
712866
     rm -fr -- $TESTDIR/mnt
712866
 }
712866
 
712866
@@ -282,7 +282,7 @@ make_server_root() {
712866
     dd if=/dev/null of=$TESTDIR/server.ext2 bs=1M seek=30
712866
     mke2fs -F $TESTDIR/server.ext2
712866
     mkdir $TESTDIR/mnt
712866
-    sudo mount -o loop $TESTDIR/server.ext2 $TESTDIR/mnt
712866
+    mount -o loop $TESTDIR/server.ext2 $TESTDIR/mnt
712866
 
712866
     kernel=$KVERSION
712866
     (
712866
@@ -316,10 +316,10 @@ make_server_root() {
712866
         done
712866
 
712866
         cp -a /etc/ld.so.conf* $initdir/etc
712866
-        sudo ldconfig -r "$initdir"
712866
+        ldconfig -r "$initdir"
712866
     )
712866
 
712866
-    sudo umount $TESTDIR/mnt
712866
+    umount $TESTDIR/mnt
712866
     rm -fr -- $TESTDIR/mnt
712866
 }
712866
 
712866
@@ -347,12 +347,12 @@ test_setup() {
712866
         echo -n test > $initdir/etc/key
712866
     )
712866
 
712866
-    sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
+    $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
         -m "udev-rules rootfs-block fs-lib base debug kernel-modules" \
712866
         -d "af_packet piix ide-gd_mod ata_piix ext2 ext3 sd_mod e1000" \
712866
         -f $TESTDIR/initramfs.server $KVERSION || return 1
712866
 
712866
-    sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
+    $basedir/dracut.sh -l -i $TESTDIR/overlay / \
712866
         -o "plymouth" \
712866
         -a "debug watchdog" \
712866
         -d "af_packet piix ide-gd_mod ata_piix ext2 ext3 sd_mod e1000 i6300esb ib700wdt" \
712866
@@ -361,7 +361,7 @@ test_setup() {
712866
 
712866
 kill_server() {
712866
     if [[ -s $TESTDIR/server.pid ]]; then
712866
-        sudo kill -TERM $(cat $TESTDIR/server.pid)
712866
+        kill -TERM $(cat $TESTDIR/server.pid)
712866
         rm -f -- $TESTDIR/server.pid
712866
     fi
712866
 }
712866
diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh
5c6c2a
index 05273be7..642a7486 100755
712866
--- a/test/TEST-50-MULTINIC/test.sh
712866
+++ b/test/TEST-50-MULTINIC/test.sh
712866
@@ -26,7 +26,7 @@ run_server() {
712866
         -append "loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \
712866
         -initrd "$TESTDIR"/initramfs.server \
712866
         -pidfile "$TESTDIR"/server.pid -daemonize || return 1
712866
-    sudo chmod 644 -- "$TESTDIR"/server.pid || return 1
712866
+    chmod 644 -- "$TESTDIR"/server.pid || return 1
712866
 
712866
     # Cleanup the terminal if we have one
712866
     tty -s && stty sane
712866
@@ -159,7 +159,7 @@ test_setup() {
712866
     dd if=/dev/null of="$TESTDIR"/server.ext3 bs=1M seek=60
712866
     mke2fs -j -F -- "$TESTDIR"/server.ext3
712866
     mkdir -- "$TESTDIR"/mnt
712866
-    sudo mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt
712866
+    mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt
712866
 
712866
     (
712866
         export initdir="$TESTDIR"/mnt
712866
@@ -222,7 +222,7 @@ test_setup() {
712866
         inst /etc/group /etc/group
712866
 
712866
         cp -a -- /etc/ld.so.conf* "$initdir"/etc
712866
-        sudo ldconfig -r "$initdir"
712866
+        ldconfig -r "$initdir"
712866
         dracut_kernel_post
712866
     )
712866
 
712866
@@ -260,10 +260,10 @@ test_setup() {
712866
         inst_libdir_file -n "$_nsslibs" 'libnss_*.so*'
712866
 
712866
         cp -a -- /etc/ld.so.conf* "$initdir"/etc
712866
-        sudo ldconfig -r "$initdir"
712866
+        ldconfig -r "$initdir"
712866
     )
712866
 
712866
-    sudo umount "$TESTDIR"/mnt
712866
+    umount "$TESTDIR"/mnt
712866
     rm -fr -- "$TESTDIR"/mnt
712866
 
712866
     # Make an overlay with needed tools for the test harness
712866
@@ -291,7 +291,7 @@ test_setup() {
712866
 
712866
 kill_server() {
712866
     if [[ -s "$TESTDIR"/server.pid ]]; then
712866
-        sudo kill -TERM -- $(cat "$TESTDIR"/server.pid)
712866
+        kill -TERM -- $(cat "$TESTDIR"/server.pid)
712866
         rm -f -- "$TESTDIR"/server.pid
712866
     fi
712866
 }
712866
diff --git a/test/TEST-60-MTUMAC/test.sh b/test/TEST-60-MTUMAC/test.sh
5c6c2a
index 7633ac13..b70e3161 100755
712866
--- a/test/TEST-60-MTUMAC/test.sh
712866
+++ b/test/TEST-60-MTUMAC/test.sh
712866
@@ -25,7 +25,7 @@ run_server() {
712866
         -append "loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \
712866
         -initrd "$TESTDIR"/initramfs.server \
712866
         -pidfile "$TESTDIR"/server.pid -daemonize || return 1
712866
-    sudo chmod 644 -- "$TESTDIR"/server.pid || return 1
712866
+    chmod 644 -- "$TESTDIR"/server.pid || return 1
712866
 
712866
     # Cleanup the terminal if we have one
712866
     tty -s && stty sane
712866
@@ -136,7 +136,7 @@ test_setup() {
712866
     dd if=/dev/null of="$TESTDIR"/server.ext3 bs=1M seek=60
712866
     mke2fs -j -F -- "$TESTDIR"/server.ext3
712866
     mkdir -- "$TESTDIR"/mnt
712866
-    sudo mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt
712866
+    mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt
712866
 
712866
     (
712866
         export initdir="$TESTDIR"/mnt
712866
@@ -237,10 +237,10 @@ test_setup() {
712866
         inst_libdir_file -n "$_nsslibs" 'libnss_*.so*'
712866
 
712866
         cp -a -- /etc/ld.so.conf* "$initdir"/etc
712866
-        sudo ldconfig -r "$initdir"
712866
+        ldconfig -r "$initdir"
712866
     )
712866
 
712866
-    sudo umount "$TESTDIR"/mnt
712866
+    umount "$TESTDIR"/mnt
712866
     rm -fr -- "$TESTDIR"/mnt
712866
 
712866
     # Make an overlay with needed tools for the test harness
712866
@@ -270,7 +270,7 @@ test_setup() {
712866
 
712866
 kill_server() {
712866
     if [[ -s "$TESTDIR"/server.pid ]]; then
712866
-        sudo kill -TERM -- $(cat "$TESTDIR"/server.pid)
712866
+        kill -TERM -- $(cat "$TESTDIR"/server.pid)
712866
         rm -f -- "$TESTDIR"/server.pid
712866
     fi
712866
 }
712866
diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh
5c6c2a
index 54ceb9e1..dcf9d5cf 100755
712866
--- a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh
712866
+++ b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh
712866
@@ -32,7 +32,7 @@ run_server() {
712866
         -append "loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \
712866
         -initrd "$TESTDIR"/initramfs.server \
712866
         -pidfile "$TESTDIR"/server.pid -daemonize || return 1
712866
-    sudo chmod 644 -- "$TESTDIR"/server.pid || return 1
712866
+    chmod 644 -- "$TESTDIR"/server.pid || return 1
712866
 
712866
     # Cleanup the terminal if we have one
712866
     tty -s && stty sane
712866
@@ -162,7 +162,7 @@ test_setup() {
712866
     dd if=/dev/null of="$TESTDIR"/server.ext3 bs=1M seek=60
712866
     mke2fs -j -F -- "$TESTDIR"/server.ext3
712866
     mkdir -- "$TESTDIR"/mnt
712866
-    sudo mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt
712866
+    mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt
712866
 
712866
     (
712866
         export initdir="$TESTDIR"/mnt
712866
@@ -263,10 +263,10 @@ test_setup() {
712866
         inst_libdir_file -n "$_nsslibs" 'libnss_*.so*'
712866
 
712866
         cp -a -- /etc/ld.so.conf* "$initdir"/etc
712866
-        sudo ldconfig -r "$initdir"
712866
+        ldconfig -r "$initdir"
712866
     )
712866
 
712866
-    sudo umount "$TESTDIR"/mnt
712866
+    umount "$TESTDIR"/mnt
712866
     rm -fr -- "$TESTDIR"/mnt
712866
 
712866
     # Make an overlay with needed tools for the test harness
712866
@@ -296,7 +296,7 @@ test_setup() {
712866
 
712866
 kill_server() {
712866
     if [[ -s "$TESTDIR"/server.pid ]]; then
712866
-        sudo kill -TERM -- $(cat "$TESTDIR"/server.pid)
712866
+        kill -TERM -- $(cat "$TESTDIR"/server.pid)
712866
         rm -f -- "$TESTDIR"/server.pid
712866
     fi
712866
 }
712866
diff --git a/test/run-qemu b/test/run-qemu
5c6c2a
index 00c2f6a8..07ce4a59 100755
712866
--- a/test/run-qemu
712866
+++ b/test/run-qemu
712866
@@ -25,4 +25,4 @@ else
712866
     VMLINUZ="/boot/vmlinuz-${KVERSION}"
712866
 fi
712866
 
712866
-exec sudo $BIN $ARGS -kernel $VMLINUZ "$@"
712866
+exec $BIN $ARGS -kernel $VMLINUZ "$@"