diff mbox

hwsim tests: vm scripts: handle regdomain requests

Message ID 1387399821-21928-1-git-send-email-johannes@sipsolutions.net
State Accepted
Headers show

Commit Message

Johannes Berg Dec. 18, 2013, 8:50 p.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

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>
---
 tests/hwsim/vm/inside.sh | 5 +++++
 tests/hwsim/vm/uevent.sh | 6 ++++++
 2 files changed, 11 insertions(+)
 create mode 100755 tests/hwsim/vm/uevent.sh

Comments

Jouni Malinen Dec. 24, 2013, 7:48 a.m. UTC | #1
On Wed, Dec 18, 2013 at 09:50:21PM +0100, Johannes Berg wrote:
> 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.)

Thanks, applied.
diff mbox

Patch

diff --git a/tests/hwsim/vm/inside.sh b/tests/hwsim/vm/inside.sh
index 5c33ecd..63157d1 100755
--- a/tests/hwsim/vm/inside.sh
+++ b/tests/hwsim/vm/inside.sh
@@ -72,6 +72,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 0000000..d52f7fc
--- /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