add kernel mismatch detection in testsuite

This commit is contained in:
Tobias Powalowski 2024-08-12 10:33:22 +02:00
parent a20fb9bff7
commit 6420f280e1
2 changed files with 15 additions and 8 deletions

View file

@ -23,7 +23,11 @@ echo "Installing kernel..."
pacman -Sydd --noconfirm --noscriptlet linux &>"${_LOG}" pacman -Sydd --noconfirm --noscriptlet linux &>"${_LOG}"
depmod -a depmod -a
if ! rg -qw 'mac80211_hwsim' /proc/modules; then if ! rg -qw 'mac80211_hwsim' /proc/modules; then
modprobe mac80211_hwsim # kernel module mismatch needs to be checked
if ! modprobe mac80211_hwsim; then
echo "Error: Module mismatch detected!"
exit 1
fi
fi fi
iwctl ap wlan0 stop iwctl ap wlan0 stop
systemctl restart iwd systemctl restart iwd

View file

@ -149,13 +149,16 @@ echo -e "Starting Wi-Fi check in \e[1m10\e[m seconds... \e[1;92mCTRL-C\e[m to st
sleep 10 sleep 10
_run_test "Wi-Fi... this takes a while" _run_test "Wi-Fi... this takes a while"
echo -n "Setting up hwsim... " echo -n "Setting up hwsim... "
archboot-hwsim.sh test &>"${_LOG}" if archboot-hwsim.sh test &>"${_LOG}"; then
echo -n "iwctl tests running... " echo -n "iwctl tests running... "
iwctl station wlan1 scan iwctl station wlan1 scan
sleep 5 sleep 5
iwctl station wlan1 get-networks | rg -q test || echo "Wi-Fi get-networks error" >> iwctl-error.log iwctl station wlan1 get-networks | rg -q test || echo "Wi-Fi get-networks error" >> iwctl-error.log
iwctl --passphrase=12345678 station wlan1 connect test || echo "Wi-Fi connect error" >> iwctl-error.log iwctl --passphrase=12345678 station wlan1 connect test || echo "Wi-Fi connect error" >> iwctl-error.log
iwctl station wlan1 disconnect || echo "Wi-Fi iwctl disconnect error" >> iwctl-error.log iwctl station wlan1 disconnect || echo "Wi-Fi iwctl disconnect error" >> iwctl-error.log
else
echo "Hwsim failed." >> iwctl-error.log
fi
_result iwctl-error.log _result iwctl-error.log
echo -e "Starting none tracked files in \e[1m10\e[m seconds... \e[1;92mCTRL-C\e[m to stop now." echo -e "Starting none tracked files in \e[1m10\e[m seconds... \e[1;92mCTRL-C\e[m to stop now."
sleep 10 sleep 10