From: Johannes Berg Date: Mon, 13 Jun 2022 09:07:07 +0000 (+0200) Subject: tests: hwsim: Allow configuring MODULEDIR X-Git-Tag: hostap_2_11~1697 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f90aa5a63eb8e05b41222aff95b6b83d1dbf404;p=thirdparty%2Fhostap.git tests: hwsim: Allow configuring MODULEDIR 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 --- diff --git a/tests/hwsim/vm/inside.sh b/tests/hwsim/vm/inside.sh index 3fe37a6fd..9c6a9572b 100755 --- a/tests/hwsim/vm/inside.sh +++ b/tests/hwsim/vm/inside.sh @@ -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 diff --git a/tests/hwsim/vm/vm-run.sh b/tests/hwsim/vm/vm-run.sh index 7a0273ac4..defea43e8 100755 --- a/tests/hwsim/vm/vm-run.sh +++ b/tests/hwsim/vm/vm-run.sh @@ -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 "