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 <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg 2022-06-13 11:07:07 +02:00 committed by Jouni Malinen
parent 6f844fa787
commit 6f90aa5a63
2 changed files with 5 additions and 0 deletions

View file

@ -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

View file

@ -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 "