Browse Source

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 <johannes.berg@intel.com>
Johannes Berg 11 years ago
parent
commit
625188e5bf
2 changed files with 11 additions and 0 deletions
  1. 5 0
      tests/hwsim/vm/inside.sh
  2. 6 0
      tests/hwsim/vm/uevent.sh

+ 5 - 0
tests/hwsim/vm/inside.sh

@@ -66,6 +66,11 @@ else
 	export DBFILE=$LOGDIR/results.db
 	export DBFILE=$LOGDIR/results.db
 	export PREFILL_DB=y
 	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
 	cd $TESTDIR
 	./run-all.sh $ARGS >/dev/ttyS0 2>&1
 	./run-all.sh $ARGS >/dev/ttyS0 2>&1
 	if test -d /sys/kernel/debug/gcov ; then
 	if test -d /sys/kernel/debug/gcov ; then

+ 6 - 0
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