Parcourir la source

tests: Add TEST_FAIL() to hostapd_get_aid()

This allows additional testing coverage for AID unavailability cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen il y a 8 ans
Parent
commit
d735811329
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      src/ap/ieee802_11.c

+ 3 - 0
src/ap/ieee802_11.c

@@ -1385,6 +1385,9 @@ int hostapd_get_aid(struct hostapd_data *hapd, struct sta_info *sta)
 		return 0;
 	}
 
+	if (TEST_FAIL())
+		return -1;
+
 	for (i = 0; i < AID_WORDS; i++) {
 		if (hapd->sta_aid[i] == (u32) -1)
 			continue;