]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: hwsim: Allow configuring MODULEDIR
authorJohannes Berg <johannes.berg@intel.com>
Mon, 13 Jun 2022 09:07:07 +0000 (11:07 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 16 Sep 2022 18:16:10 +0000 (21:16 +0300)
It can be useful to configure a different module directory, so you don't
need to install the kernel modules in the host /lib/modules/ location.
Allow configuring it in the config file.

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

index 3fe37a6fddb56f088686b040b2efe2e4ea606ba1..9c6a9572b8d8ae3634afd72f42042f93573382d8 100755 (executable)
@@ -45,6 +45,10 @@ fi
 
 mount --bind "$TESTDIR/vm/regdb/" /lib/firmware
 
+if [ "$MODULEDIR" != "" ] ; then
+       mount --bind $MODULEDIR /lib/modules
+fi
+
 # reload reg if (and only if) cfg80211.ko is already loaded
 iw reg reload || true
 
index 7a0273ac4b06732e4366bef9d6abf82b3bd6e051..defea43e87236249c96437c8780db2f10eaac9ff 100755 (executable)
@@ -150,6 +150,7 @@ A+="mac80211_hwsim.dyndbg=+p "
 A+="init=$CMD "
 A+="testdir=$TESTDIR "
 A+="timewarp=$TIMEWARP "
+A+="MODULEDIR=$MODULEDIR "
 A+="TELNET=$TELNET_ARG "
 A+="EPATH=$EPATH "
 A+="ARGS=$argsfile "