]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Suppress annoying console reset from VMs
authorJohannes Berg <johannes.berg@intel.com>
Tue, 5 Feb 2019 11:26:46 +0000 (12:26 +0100)
committerJouni Malinen <j@w1.fi>
Tue, 5 Feb 2019 11:35:15 +0000 (13:35 +0200)
Recently, qemu/seabios grew an annoying console/terminal reset,
which also causes my terminal to be left in a state where long
lines don't work well and less gets confused because of this.

Suppress this by suppressing all output from qemu before a new
magic string printed from inside.sh.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
tests/hwsim/vm/inside.sh
tests/hwsim/vm/vm-run.sh

index c97a284e8db670c918b54cc67388dd3eaed65497..accc0ddec6e2f5412b789174710bf507923da1ab 100755 (executable)
@@ -36,6 +36,8 @@ ln -s /proc/self/fd/0 /dev/stdin
 ln -s /proc/self/fd/1 /dev/stdout
 ln -s /proc/self/fd/2 /dev/stderr
 
+echo "VM has started up" > /dev/ttyS0
+
 # create dummy sudo - everything runs as uid 0
 mkdir /tmp/bin
 cat > /tmp/bin/sudo << EOF
index 1712ed349647cbfa9652ecd78cef999eac32914d..2972fb1b0786220d3ce815791d94d706462d0f8f 100755 (executable)
@@ -134,7 +134,8 @@ $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 cfg80211.dyndbg=+p mac80211.dyndbg=+p mac80211_hwsim.dyndbg=+p init=$CMD testdir=$TESTDIR timewarp=$TIMEWARP console=$KVMOUT root=/dev/root rootflags=trans=virtio,version=9p2000.u ro rootfstype=9p EPATH=$EPATH ARGS=$argsfile"
+       -append "mac80211_hwsim.support_p2p_device=0 mac80211_hwsim.channels=$CHANNELS mac80211_hwsim.radios=7 cfg80211.dyndbg=+p mac80211.dyndbg=+p mac80211_hwsim.dyndbg=+p init=$CMD testdir=$TESTDIR timewarp=$TIMEWARP console=$KVMOUT root=/dev/root rootflags=trans=virtio,version=9p2000.u ro rootfstype=9p EPATH=$EPATH ARGS=$argsfile" | \
+       sed -u '0,/VM has started up/d'
 
 if [ $CODECOV = "yes" ]; then
     echo "Preparing code coverage reports"