aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtests/hwsim/vm/inside.sh8
-rwxr-xr-xtests/hwsim/vm/vm-run.sh13
2 files changed, 18 insertions, 3 deletions
diff --git a/tests/hwsim/vm/inside.sh b/tests/hwsim/vm/inside.sh
index 6039808..3cbfe10 100755
--- a/tests/hwsim/vm/inside.sh
+++ b/tests/hwsim/vm/inside.sh
@@ -22,7 +22,7 @@ sysctl kernel.panic=1
TESTDIR=$(sed 's/.*testdir=\([^ ]*\) .*/\1/' /proc/cmdline)
TIMEWARP=$(sed 's/.*timewarp=\([^ ]*\) .*/\1/' /proc/cmdline)
EPATH=$(sed 's/.*EPATH=\([^ ]*\) .*/\1/' /proc/cmdline)
-ARGS=$(sed 's/.*ARGS=//' /proc/cmdline)
+ARGS=$(sed 's/.*ARGS=\([^ ]*\)\( \|$\).*/\1/' /proc/cmdline)
# create /dev entries we need
mknod -m 660 /dev/ttyS0 c 4 64
@@ -78,6 +78,10 @@ ip link set lo up
mkdir /tmp/logs
mount -t 9p -o trans=virtio,rw logshare /tmp/logs
+# allow access to any outside directory (e.g. /tmp) we also have
+mkdir /tmp/host
+mount --bind / /tmp/host
+
if [ "$TIMEWARP" = "1" ] ; then
(
while sleep 1 ; do
@@ -107,7 +111,7 @@ else
dbus-daemon --config-file=$TESTDIR/vm/dbus.conf --fork
cd $TESTDIR
- ./run-all.sh $ARGS </dev/ttyS0 >/dev/ttyS0 2>&1
+ ./run-all.sh $(cat /tmp/host$ARGS) </dev/ttyS0 >/dev/ttyS0 2>&1
if test -d /sys/kernel/debug/gcov ; then
cp -ar /sys/kernel/debug/gcov /tmp/logs/
# these are broken as they're updated while being read ...
diff --git a/tests/hwsim/vm/vm-run.sh b/tests/hwsim/vm/vm-run.sh
index ab4df4c..c0ef5b0 100755
--- a/tests/hwsim/vm/vm-run.sh
+++ b/tests/hwsim/vm/vm-run.sh
@@ -113,6 +113,17 @@ for kvmprog in kvm qemu-kvm; do
fi
done
+argsfile=$(mktemp)
+if [ $? -ne 0 ] ; then
+ exit 2
+fi
+function finish {
+ rm -f $argsfile
+}
+trap finish EXIT
+
+echo "$RUN_TEST_ARGS" > $argsfile
+
$KVM \
-kernel $KERNEL -smp 4 \
$KVMARGS -m $MEMORY -nographic \
@@ -121,7 +132,7 @@ $KVM \
-fsdev local,security_model=none,id=fsdev-logs,path="$LOGDIR",writeout=immediate \
-device virtio-9p-pci,id=fs-logs,fsdev=fsdev-logs,mount_tag=logshare \
-monitor null -serial stdio -serial file:$LOGDIR/console \
- -append "mac80211_hwsim.support_p2p_device=0 mac80211_hwsim.channels=$CHANNELS mac80211_hwsim.radios=7 init=$CMD testdir=$TESTDIR timewarp=$TIMEWARP console=$KVMOUT root=/dev/root rootflags=trans=virtio,version=9p2000.u ro rootfstype=9p EPATH=$EPATH ARGS=$RUN_TEST_ARGS"
+ -append "mac80211_hwsim.support_p2p_device=0 mac80211_hwsim.channels=$CHANNELS mac80211_hwsim.radios=7 init=$CMD testdir=$TESTDIR timewarp=$TIMEWARP console=$KVMOUT root=/dev/root rootflags=trans=virtio,version=9p2000.u ro rootfstype=9p EPATH=$EPATH ARGS=$argsfile"
if [ $CODECOV = "yes" ]; then
echo "Preparing code coverage reports"