Blame SOURCES/0466-test-remove-sudo-calls.patch

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
712866
index aef0737..97e8017 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
712866
index 6f33181..2a077b0 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
712866
index 363f8b0..c3f810a 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
712866
index 93c3389..1adb34e 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
712866
index 45edda2..7f99c0e 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
712866
index dd1f8ea..a4ee86d 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
712866
index 5f9cfc5..aae5e8b 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
712866
index 94801e4..8194166 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
712866
index 8e99b1f..783ec4a 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
712866
index c086677..1e3e18c 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
712866
index e80ec5c..6daa35e 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
712866
index dc6e588..f15e1a3 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
712866
index 49dbc10..64fc550 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
712866
index 5e59f0a..62bef9c 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
712866
index 848a103..73123c2 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
712866
index 05273be..642a748 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
712866
index 7633ac1..b70e316 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
712866
index 54ceb9e..dcf9d5c 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
712866
index 00c2f6a..07ce4a5 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 "$@"