Harald Hoyer 89b080
From 27fa604418517c8e8a8e771ce6a804d4886e9f2f Mon Sep 17 00:00:00 2001
Harald Hoyer 89b080
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 89b080
Date: Mon, 9 Jul 2012 15:30:15 +0200
Harald Hoyer 89b080
Subject: [PATCH] test: export initdir
Harald Hoyer 89b080
Harald Hoyer 89b080
---
Harald Hoyer 89b080
 test/TEST-01-BASIC/test.sh        |    6 +++---
Harald Hoyer 89b080
 test/TEST-02-SYSTEMD/test.sh      |    6 +++---
Harald Hoyer 89b080
 test/TEST-03-USR-MOUNT/test.sh    |    6 +++---
Harald Hoyer 89b080
 test/TEST-10-RAID/test.sh         |    6 +++---
Harald Hoyer 89b080
 test/TEST-11-LVM/test.sh          |    6 +++---
Harald Hoyer 89b080
 test/TEST-12-RAID-DEG/test.sh     |    6 +++---
Harald Hoyer 89b080
 test/TEST-13-ENC-RAID-LVM/test.sh |    6 +++---
Harald Hoyer 89b080
 test/TEST-15-BTRFSRAID/test.sh    |    6 +++---
Harald Hoyer 89b080
 test/TEST-16-DMSQUASH/test.sh     |    4 ++--
Harald Hoyer 89b080
 test/TEST-20-NFS/test.sh          |    6 +++---
Harald Hoyer 89b080
 test/TEST-30-ISCSI/test.sh        |    8 ++++----
Harald Hoyer 89b080
 test/TEST-40-NBD/test.sh          |   10 +++++-----
Harald Hoyer 89b080
 test/TEST-50-MULTINIC/test.sh     |    6 +++---
Harald Hoyer 89b080
 test/old.TEST-14-IMSM/test.sh     |    6 +++---
Harald Hoyer 89b080
 test/test-functions               |    2 +-
Harald Hoyer 89b080
 15 files changed, 45 insertions(+), 45 deletions(-)
Harald Hoyer 89b080
Harald Hoyer 89b080
diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh
Harald Hoyer 89b080
index 35e05bb..f8522e6 100755
Harald Hoyer 89b080
--- a/test/TEST-01-BASIC/test.sh
Harald Hoyer 89b080
+++ b/test/TEST-01-BASIC/test.sh
Harald Hoyer 89b080
@@ -27,7 +27,7 @@ test_setup() {
Harald Hoyer 89b080
     kernel=$KVERSION
Harald Hoyer 89b080
     # Create what will eventually be our root filesystem onto an overlay
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay/source
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay/source
Harald Hoyer 89b080
 	mkdir -p $initdir
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \
Harald Hoyer 89b080
@@ -49,7 +49,7 @@ test_setup() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     # second, install the files needed to make the root filesystem
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install sfdisk mkfs.ext3 poweroff cp umount sync
Harald Hoyer 89b080
 	inst_hook initqueue 01 ./create-root.sh
Harald Hoyer 89b080
@@ -77,7 +77,7 @@ test_setup() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install poweroff shutdown
Harald Hoyer 89b080
 	inst_hook emergency 000 ./hard-off.sh
Harald Hoyer 89b080
diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh
Harald Hoyer 89b080
index b535dbe..5a121c0 100755
Harald Hoyer 89b080
--- a/test/TEST-02-SYSTEMD/test.sh
Harald Hoyer 89b080
+++ b/test/TEST-02-SYSTEMD/test.sh
Harald Hoyer 89b080
@@ -23,7 +23,7 @@ test_setup() {
Harald Hoyer 89b080
     kernel=$KVERSION
Harald Hoyer 89b080
     # Create what will eventually be our root filesystem onto an overlay
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay/source
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay/source
Harald Hoyer 89b080
 	mkdir -p $initdir
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \
Harald Hoyer 89b080
@@ -45,7 +45,7 @@ test_setup() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     # second, install the files needed to make the root filesystem
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install sfdisk mkfs.ext3 poweroff cp umount
Harald Hoyer 89b080
 	inst_hook initqueue 01 ./create-root.sh
Harald Hoyer 89b080
@@ -73,7 +73,7 @@ test_setup() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install poweroff shutdown
Harald Hoyer 89b080
 	inst_hook emergency 000 ./hard-off.sh
Harald Hoyer 89b080
diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh
Harald Hoyer 89b080
index d966c3c..f3237d3 100755
Harald Hoyer 89b080
--- a/test/TEST-03-USR-MOUNT/test.sh
Harald Hoyer 89b080
+++ b/test/TEST-03-USR-MOUNT/test.sh
Harald Hoyer 89b080
@@ -54,7 +54,7 @@ test_setup() {
Harald Hoyer 89b080
     kernel=$KVERSION
Harald Hoyer 89b080
     # Create what will eventually be our root filesystem onto an overlay
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay/source
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay/source
Harald Hoyer 89b080
 	mkdir -p $initdir
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \
Harald Hoyer 89b080
@@ -77,7 +77,7 @@ test_setup() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     # second, install the files needed to make the root filesystem
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install sfdisk mkfs.btrfs btrfs poweroff cp umount sync
Harald Hoyer 89b080
 	inst_hook initqueue 01 ./create-root.sh
Harald Hoyer 89b080
@@ -112,7 +112,7 @@ test_setup() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install poweroff shutdown
Harald Hoyer 89b080
 	inst_hook emergency 000 ./hard-off.sh
Harald Hoyer 89b080
diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh
Harald Hoyer 89b080
index ef6d0c2..d2b1921 100755
Harald Hoyer 89b080
--- a/test/TEST-10-RAID/test.sh
Harald Hoyer 89b080
+++ b/test/TEST-10-RAID/test.sh
Harald Hoyer 89b080
@@ -25,7 +25,7 @@ test_setup() {
Harald Hoyer 89b080
     kernel=$KVERSION
Harald Hoyer 89b080
     # Create what will eventually be our root filesystem onto an overlay
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay/source
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay/source
Harald Hoyer 89b080
 	(mkdir -p "$initdir"; cd "$initdir"; mkdir -p dev sys proc etc var/run tmp run)
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \
Harald Hoyer 89b080
@@ -46,7 +46,7 @@ test_setup() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     # second, install the files needed to make the root filesystem
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install sfdisk mke2fs poweroff cp umount
Harald Hoyer 89b080
 	inst_hook initqueue 01 ./create-root.sh
Harald Hoyer 89b080
@@ -72,7 +72,7 @@ test_setup() {
Harald Hoyer 89b080
     grep -m 1 -q dracut-root-block-created $DISKIMAGE || return 1
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install poweroff shutdown
Harald Hoyer 89b080
 	inst_hook emergency 000 ./hard-off.sh
Harald Hoyer 89b080
diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh
Harald Hoyer 89b080
index 034cc4c..61ebdfa 100755
Harald Hoyer 89b080
--- a/test/TEST-11-LVM/test.sh
Harald Hoyer 89b080
+++ b/test/TEST-11-LVM/test.sh
Harald Hoyer 89b080
@@ -23,7 +23,7 @@ test_setup() {
Harald Hoyer 89b080
     kernel=$KVERSION
Harald Hoyer 89b080
     # Create what will eventually be our root filesystem onto an overlay
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay/source
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay/source
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \
Harald Hoyer 89b080
 	    mount dmesg ifconfig dhclient mkdir cp ping dhclient
Harald Hoyer 89b080
@@ -44,7 +44,7 @@ test_setup() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     # second, install the files needed to make the root filesystem
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install sfdisk mke2fs poweroff cp umount
Harald Hoyer 89b080
 	inst_hook initqueue 01 ./create-root.sh
Harald Hoyer 89b080
@@ -66,7 +66,7 @@ test_setup() {
Harald Hoyer 89b080
 	-initrd $TESTDIR/initramfs.makeroot  || return 1
Harald Hoyer 89b080
     grep -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install poweroff shutdown
Harald Hoyer 89b080
 	inst_hook emergency 000 ./hard-off.sh
Harald Hoyer 89b080
diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh
Harald Hoyer 89b080
index c6038bd..05e5f8a 100755
Harald Hoyer 89b080
--- a/test/TEST-12-RAID-DEG/test.sh
Harald Hoyer 89b080
+++ b/test/TEST-12-RAID-DEG/test.sh
Harald Hoyer 89b080
@@ -58,7 +58,7 @@ test_setup() {
Harald Hoyer 89b080
     kernel=$KVERSION
Harald Hoyer 89b080
     # Create what will eventually be our root filesystem onto an overlay
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay/source
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay/source
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \
Harald Hoyer 89b080
 	    mount dmesg ifconfig dhclient mkdir cp ping dhclient
Harald Hoyer 89b080
@@ -78,7 +78,7 @@ test_setup() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     # second, install the files needed to make the root filesystem
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install sfdisk mke2fs poweroff cp umount dd grep
Harald Hoyer 89b080
 	inst_hook initqueue 01 ./create-root.sh
Harald Hoyer 89b080
@@ -106,7 +106,7 @@ test_setup() {
Harald Hoyer 89b080
     grep -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1
Harald Hoyer 89b080
     eval $(grep --binary-files=text -m 1 MD_UUID $TESTDIR/root.ext2)
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install poweroff shutdown
Harald Hoyer 89b080
 	inst_hook emergency 000 ./hard-off.sh
Harald Hoyer 89b080
diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh
Harald Hoyer 89b080
index 658de8f..f0f7d34 100755
Harald Hoyer 89b080
--- a/test/TEST-13-ENC-RAID-LVM/test.sh
Harald Hoyer 89b080
+++ b/test/TEST-13-ENC-RAID-LVM/test.sh
Harald Hoyer 89b080
@@ -59,7 +59,7 @@ test_setup() {
Harald Hoyer 89b080
     kernel=$KVERSION
Harald Hoyer 89b080
     # Create what will eventually be our root filesystem onto an overlay
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay/source
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay/source
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \
Harald Hoyer 89b080
 	    mount dmesg ifconfig dhclient mkdir cp ping dhclient
Harald Hoyer 89b080
@@ -79,7 +79,7 @@ test_setup() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     # second, install the files needed to make the root filesystem
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install sfdisk mke2fs poweroff cp umount grep
Harald Hoyer 89b080
 	inst_hook initqueue 01 ./create-root.sh
Harald Hoyer 89b080
@@ -108,7 +108,7 @@ test_setup() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install poweroff shutdown
Harald Hoyer 89b080
 	inst_hook emergency 000 ./hard-off.sh
Harald Hoyer 89b080
diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh
Harald Hoyer 89b080
index 5918b5e..61ccae3 100755
Harald Hoyer 89b080
--- a/test/TEST-15-BTRFSRAID/test.sh
Harald Hoyer 89b080
+++ b/test/TEST-15-BTRFSRAID/test.sh
Harald Hoyer 89b080
@@ -25,7 +25,7 @@ test_setup() {
Harald Hoyer 89b080
     kernel=$KVERSION
Harald Hoyer 89b080
     # Create what will eventually be our root filesystem onto an overlay
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay/source
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay/source
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \
Harald Hoyer 89b080
 	    mount dmesg ifconfig dhclient mkdir cp ping dhclient
Harald Hoyer 89b080
@@ -45,7 +45,7 @@ test_setup() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     # second, install the files needed to make the root filesystem
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install sfdisk mkfs.btrfs poweroff cp umount
Harald Hoyer 89b080
 	inst_hook initqueue 01 ./create-root.sh
Harald Hoyer 89b080
@@ -74,7 +74,7 @@ test_setup() {
Harald Hoyer 89b080
     grep -m 1 -q dracut-root-block-created $DISKIMAGE || return 1
Harald Hoyer 89b080
 
Harald Hoyer 89b080
    (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+        export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install poweroff shutdown
Harald Hoyer 89b080
 	inst_hook emergency 000 ./hard-off.sh
Harald Hoyer 89b080
diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh
Harald Hoyer 89b080
index 5cd9986..4dc133c 100755
Harald Hoyer 89b080
--- a/test/TEST-16-DMSQUASH/test.sh
Harald Hoyer 89b080
+++ b/test/TEST-16-DMSQUASH/test.sh
Harald Hoyer 89b080
@@ -29,7 +29,7 @@ test_run() {
Harald Hoyer 89b080
 test_setup() {
Harald Hoyer 89b080
     mkdir -p $TESTDIR/overlay
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install poweroff shutdown
Harald Hoyer 89b080
 	inst_hook emergency 000 ./hard-off.sh
Harald Hoyer 89b080
@@ -47,7 +47,7 @@ test_setup() {
Harald Hoyer 89b080
     kernel=$KVERSION
Harald Hoyer 89b080
     # Create what will eventually be our root filesystem onto an overlay
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/root-source
Harald Hoyer 89b080
+	export initdir=$TESTDIR/root-source
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \
Harald Hoyer 89b080
 	    mount dmesg ifconfig dhclient mkdir cp ping dhclient \
Harald Hoyer 89b080
diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh
Harald Hoyer 89b080
index 57bf512..a44f6c0 100755
Harald Hoyer 89b080
--- a/test/TEST-20-NFS/test.sh
Harald Hoyer 89b080
+++ b/test/TEST-20-NFS/test.sh
Harald Hoyer 89b080
@@ -217,7 +217,7 @@ test_setup() {
Harald Hoyer 89b080
     # Detect lib paths
Harald Hoyer 89b080
 
Harald Hoyer 89b080
    (
Harald Hoyer 89b080
-    	initdir=$TESTDIR/mnt
Harald Hoyer 89b080
+       export initdir=$TESTDIR/mnt
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 
Harald Hoyer 89b080
 	for _f in modules.builtin.bin modules.builtin; do
Harald Hoyer 89b080
@@ -282,7 +282,7 @@ test_setup() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     # Make client root inside server root
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/mnt/nfs/client
Harald Hoyer 89b080
+	export initdir=$TESTDIR/mnt/nfs/client
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 
Harald Hoyer 89b080
 	dracut_install sh shutdown poweroff stty cat ps ln ip \
Harald Hoyer 89b080
@@ -325,7 +325,7 @@ test_setup() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     # Make an overlay with needed tools for the test harness
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	mkdir $TESTDIR/overlay
Harald Hoyer 89b080
 	dracut_install poweroff shutdown
Harald Hoyer 89b080
diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh
Harald Hoyer 89b080
index 8c577f0..c5dba80 100755
Harald Hoyer 89b080
--- a/test/TEST-30-ISCSI/test.sh
Harald Hoyer 89b080
+++ b/test/TEST-30-ISCSI/test.sh
Harald Hoyer 89b080
@@ -102,7 +102,7 @@ test_setup() {
Harald Hoyer 89b080
     kernel=$KVERSION
Harald Hoyer 89b080
     # Create what will eventually be our root filesystem onto an overlay
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-        initdir=$TESTDIR/overlay/source
Harald Hoyer 89b080
+        export initdir=$TESTDIR/overlay/source
Harald Hoyer 89b080
         . $basedir/dracut-functions.sh
Harald Hoyer 89b080
         dracut_install sh shutdown poweroff stty cat ps ln ip \
Harald Hoyer 89b080
             mount dmesg mkdir cp ping grep
Harald Hoyer 89b080
@@ -118,7 +118,7 @@ test_setup() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     # second, install the files needed to make the root filesystem
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-        initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+        export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
         . $basedir/dracut-functions.sh
Harald Hoyer 89b080
         dracut_install sfdisk mkfs.ext3 poweroff cp umount
Harald Hoyer 89b080
         inst_hook initqueue 01 ./create-root.sh
Harald Hoyer 89b080
@@ -153,7 +153,7 @@ test_setup() {
Harald Hoyer 89b080
     grep -m 1 -q dracut-root-block-created $TESTDIR/client.img || return 1
Harald Hoyer 89b080
     rm $TESTDIR/client.img
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-        initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+        export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
         . $basedir/dracut-functions.sh
Harald Hoyer 89b080
         dracut_install poweroff shutdown
Harald Hoyer 89b080
         inst_hook emergency 000 ./hard-off.sh
Harald Hoyer 89b080
@@ -173,7 +173,7 @@ test_setup() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     kernel=$KVERSION
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-        initdir=$TESTDIR/mnt
Harald Hoyer 89b080
+        export initdir=$TESTDIR/mnt
Harald Hoyer 89b080
         . $basedir/dracut-functions.sh
Harald Hoyer 89b080
         (
Harald Hoyer 89b080
             cd "$initdir";
Harald Hoyer 89b080
diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh
Harald Hoyer 89b080
index f5465b6..94efb8a 100755
Harald Hoyer 89b080
--- a/test/TEST-40-NBD/test.sh
Harald Hoyer 89b080
+++ b/test/TEST-40-NBD/test.sh
Harald Hoyer 89b080
@@ -190,7 +190,7 @@ make_encrypted_root() {
Harald Hoyer 89b080
     kernel=$KVERSION
Harald Hoyer 89b080
     # Create what will eventually be our root filesystem onto an overlay
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay/source
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay/source
Harald Hoyer 89b080
         . $basedir/dracut-functions.sh
Harald Hoyer 89b080
         mkdir -p "$initdir"
Harald Hoyer 89b080
 	(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
Harald Hoyer 89b080
@@ -208,7 +208,7 @@ make_encrypted_root() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     # second, install the files needed to make the root filesystem
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install mke2fs poweroff cp umount tune2fs
Harald Hoyer 89b080
 	inst_hook initqueue 01 ./create-root.sh
Harald Hoyer 89b080
@@ -244,7 +244,7 @@ make_client_root() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     kernel=$KVERSION
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/mnt
Harald Hoyer 89b080
+	export initdir=$TESTDIR/mnt
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
         mkdir -p "$initdir"
Harald Hoyer 89b080
 	(cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
Harald Hoyer 89b080
@@ -278,7 +278,7 @@ make_server_root() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     kernel=$KVERSION
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/mnt
Harald Hoyer 89b080
+	export initdir=$TESTDIR/mnt
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
         mkdir -p "$initdir"
Harald Hoyer 89b080
 	(
Harald Hoyer 89b080
@@ -323,7 +323,7 @@ test_setup() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     # Make the test image
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install poweroff shutdown
Harald Hoyer 89b080
 	inst_hook emergency 000 ./hard-off.sh
Harald Hoyer 89b080
diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh
Harald Hoyer 89b080
index a96669e..74f10d8 100755
Harald Hoyer 89b080
--- a/test/TEST-50-MULTINIC/test.sh
Harald Hoyer 89b080
+++ b/test/TEST-50-MULTINIC/test.sh
Harald Hoyer 89b080
@@ -132,7 +132,7 @@ test_setup() {
Harald Hoyer 89b080
     sudo mount -o loop $TESTDIR/server.ext3 $TESTDIR/mnt
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-        initdir=$TESTDIR/mnt
Harald Hoyer 89b080
+        export initdir=$TESTDIR/mnt
Harald Hoyer 89b080
         . $basedir/dracut-functions.sh
Harald Hoyer 89b080
 
Harald Hoyer 89b080
         (
Harald Hoyer 89b080
@@ -197,7 +197,7 @@ test_setup() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     # Make client root inside server root
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-        initdir=$TESTDIR/mnt/nfs/client
Harald Hoyer 89b080
+        export initdir=$TESTDIR/mnt/nfs/client
Harald Hoyer 89b080
         . $basedir/dracut-functions.sh
Harald Hoyer 89b080
         dracut_install sh shutdown poweroff stty cat ps ln ip \
Harald Hoyer 89b080
             mount dmesg mkdir cp ping grep ls
Harald Hoyer 89b080
@@ -236,7 +236,7 @@ test_setup() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     # Make an overlay with needed tools for the test harness
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-        initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+        export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
         . $basedir/dracut-functions.sh
Harald Hoyer 89b080
         dracut_install poweroff shutdown
Harald Hoyer 89b080
         inst_hook emergency 000 ./hard-off.sh
Harald Hoyer 89b080
diff --git a/test/old.TEST-14-IMSM/test.sh b/test/old.TEST-14-IMSM/test.sh
Harald Hoyer 89b080
index 5b9438e..cd2d715 100755
Harald Hoyer 89b080
--- a/test/old.TEST-14-IMSM/test.sh
Harald Hoyer 89b080
+++ b/test/old.TEST-14-IMSM/test.sh
Harald Hoyer 89b080
@@ -57,7 +57,7 @@ test_setup() {
Harald Hoyer 89b080
     kernel=$KVERSION
Harald Hoyer 89b080
     # Create what will eventually be our root filesystem onto an overlay
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay/source
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay/source
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install sh df free ls shutdown poweroff stty cat ps ln ip route \
Harald Hoyer 89b080
 	    mount dmesg ifconfig dhclient mkdir cp ping dhclient
Harald Hoyer 89b080
@@ -78,7 +78,7 @@ test_setup() {
Harald Hoyer 89b080
 
Harald Hoyer 89b080
     # second, install the files needed to make the root filesystem
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install sfdisk mke2fs poweroff cp umount
Harald Hoyer 89b080
 	inst_hook initqueue 01 ./create-root.sh
Harald Hoyer 89b080
@@ -104,7 +104,7 @@ test_setup() {
Harald Hoyer 89b080
 	-initrd $TESTDIR/initramfs.makeroot  || return 1
Harald Hoyer 89b080
     grep -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1
Harald Hoyer 89b080
     (
Harald Hoyer 89b080
-	initdir=$TESTDIR/overlay
Harald Hoyer 89b080
+	export initdir=$TESTDIR/overlay
Harald Hoyer 89b080
 	. $basedir/dracut-functions.sh
Harald Hoyer 89b080
 	dracut_install poweroff shutdown
Harald Hoyer 89b080
 	inst_hook emergency 000 ./hard-off.sh
Harald Hoyer 89b080
diff --git a/test/test-functions b/test/test-functions
Harald Hoyer 89b080
index 451837f..10d78ed 100644
Harald Hoyer 89b080
--- a/test/test-functions
Harald Hoyer 89b080
+++ b/test/test-functions
Harald Hoyer 89b080
@@ -6,7 +6,7 @@ export PATH
Harald Hoyer 89b080
 
Harald Hoyer 89b080
 [[ -e .testdir ]] && . .testdir
Harald Hoyer 89b080
 if [[ -z "$TESTDIR" ]] || [[ ! -d "$TESTDIR" ]]; then
Harald Hoyer 89b080
-   TESTDIR=$(mktemp -d -t dracut-test.XXXXXX)
Harald Hoyer 89b080
+   TESTDIR=$(mktemp -d --tmpdir="/var/tmp" -t dracut-test.XXXXXX)
Harald Hoyer 89b080
 fi
Harald Hoyer 89b080
 echo "TESTDIR=\"$TESTDIR\"" > .testdir
Harald Hoyer 89b080
 export TESTDIR