From d735811329815f6fb8ad89e20200768b7be68fae Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 28 Jun 2016 20:44:26 +0300 Subject: [PATCH] tests: Add TEST_FAIL() to hostapd_get_aid() This allows additional testing coverage for AID unavailability cases. Signed-off-by: Jouni Malinen --- src/ap/ieee802_11.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index 98601a831..11f12f981 100644 --- a/src/ap/ieee802_11.c +++ b/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;