tests: Use proper admin group in start.sh
wpa_supplicant configuration files had a hardcoded GROUP=admin. The start.sh script failed on a system without admin group (some systems have it named adm). Generate configuration files with appropriate GROUP in the log dir and use them. Signed-hostap: Michal Kazior <michal.kazior@tieto.com>
This commit is contained in:
parent
58d6f91d16
commit
d65a593b1e
1 changed files with 7 additions and 2 deletions
|
@ -21,9 +21,14 @@ else
|
||||||
GROUP=adm
|
GROUP=adm
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
sed "s/ GROUP=.*$/ GROUP=$GROUP/" "$DIR/sta-dummy.conf" > "$LOGDIR/sta-dummy.conf"
|
||||||
|
for i in 0 1 2; do
|
||||||
|
sed "s/ GROUP=.*$/ GROUP=$GROUP/" "$DIR/p2p$i.conf" > "$LOGDIR/p2p$i.conf"
|
||||||
|
done
|
||||||
|
|
||||||
if [ "$1" = "concurrent" ]; then
|
if [ "$1" = "concurrent" ]; then
|
||||||
CONCURRENT=y
|
CONCURRENT=y
|
||||||
CONCURRENT_ARGS="-N -Dnl80211 -ista%d -c $DIR/sta-dummy.conf"
|
CONCURRENT_ARGS="-N -Dnl80211 -ista%d -c $LOGDIR/sta-dummy.conf"
|
||||||
shift
|
shift
|
||||||
else
|
else
|
||||||
unset CONCURRENT
|
unset CONCURRENT
|
||||||
|
@ -61,7 +66,7 @@ mkdir -p $LOGDIR
|
||||||
sudo ifconfig hwsim0 up
|
sudo ifconfig hwsim0 up
|
||||||
sudo $WLANTEST -i hwsim0 -n $LOGDIR/hwsim0.pcapng -c -d > $LOGDIR/hwsim0 &
|
sudo $WLANTEST -i hwsim0 -n $LOGDIR/hwsim0.pcapng -c -d > $LOGDIR/hwsim0 &
|
||||||
for i in 0 1 2; do
|
for i in 0 1 2; do
|
||||||
sudo $(printf -- "$VALGRIND_WPAS" $i) $WPAS -g /tmp/wpas-wlan$i -G$GROUP -Dnl80211 -iwlan$i -c $DIR/p2p$i.conf \
|
sudo $(printf -- "$VALGRIND_WPAS" $i) $WPAS -g /tmp/wpas-wlan$i -G$GROUP -Dnl80211 -iwlan$i -c $LOGDIR/p2p$i.conf \
|
||||||
$(printf -- "$CONCURRENT_ARGS" $i) -ddKt$TRACE -f $LOGDIR/log$i &
|
$(printf -- "$CONCURRENT_ARGS" $i) -ddKt$TRACE -f $LOGDIR/log$i &
|
||||||
done
|
done
|
||||||
sudo $VALGRIND_HAPD $HAPD -ddKt$TRACE -g /var/run/hostapd-global -G $GROUP -ddKt -f $LOGDIR/hostapd &
|
sudo $VALGRIND_HAPD $HAPD -ddKt$TRACE -g /var/run/hostapd-global -G $GROUP -ddKt -f $LOGDIR/hostapd &
|
||||||
|
|
Loading…
Reference in a new issue