From: Johannes Berg Date: Wed, 18 Dec 2013 20:50:21 +0000 (+0100) Subject: hwsim tests: Handle regdomain requests in vm scripts X-Git-Tag: hostap_2_1~446 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=625188e5bf7ab132981b89735b477f3441690f2d;p=thirdparty%2Fhostap.git hwsim tests: Handle regdomain requests in vm scripts In order to handle regulatory domain requests, crda needs to be installed on the host, but we also need to install a uevent helper in the VM so that it gets executed (since we don't run udev). Signed-hostap: Johannes Berg --- diff --git a/tests/hwsim/vm/inside.sh b/tests/hwsim/vm/inside.sh index 331702f2c..036197b12 100755 --- a/tests/hwsim/vm/inside.sh +++ b/tests/hwsim/vm/inside.sh @@ -66,6 +66,11 @@ else export DBFILE=$LOGDIR/results.db export PREFILL_DB=y + # some tests need CRDA, install a simple uevent helper + # and preload the 00 domain it will have asked for already + echo $TESTDIR/vm/uevent.sh > /sys/kernel/uevent_helper + COUNTRY=00 crda + cd $TESTDIR ./run-all.sh $ARGS >/dev/ttyS0 2>&1 if test -d /sys/kernel/debug/gcov ; then diff --git a/tests/hwsim/vm/uevent.sh b/tests/hwsim/vm/uevent.sh new file mode 100755 index 000000000..d52f7fcc1 --- /dev/null +++ b/tests/hwsim/vm/uevent.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# assume this was a call for CRDA, +# if not then it won't find a COUNTRY +# environment variable and exit +exec crda