* [PATCH] unit: remove timeout tests from test-sae
@ 2021-04-06 18:29 James Prestwood
2021-04-06 20:03 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: James Prestwood @ 2021-04-06 18:29 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 3237 bytes --]
The timeout functionality was removed from the core SAE
implementation as it causes issues with kernel behavior.
Because of this the timeout tests are no longer valid,
nor is a few asserts in the end-to-end test.
---
unit/test-sae.c | 66 +------------------------------------------------
1 file changed, 1 insertion(+), 65 deletions(-)
diff --git a/unit/test-sae.c b/unit/test-sae.c
index 10367cf9..678c2526 100644
--- a/unit/test-sae.c
+++ b/unit/test-sae.c
@@ -236,59 +236,6 @@ static size_t setup_assoc_frame(struct associate_frame *frame, uint16_t status)
return sizeof(frame->hdr) + sizeof(frame->assoc);
}
-static void test_confirm_timeout(const void *arg)
-{
- struct test_data *td = l_new(struct test_data, 1);
- struct auth_proto *ap = test_initialize(td);
- struct authenticate_frame *frame = alloca(
- sizeof(struct authenticate_frame) +
- sizeof(aa_commit));
- size_t len;
- int i;
-
- len = setup_auth_frame(frame, aa, 1, 0, aa_commit, sizeof(aa_commit));
-
- assert(auth_proto_rx_authenticate(ap, (uint8_t *)frame, len) == 0);
-
- assert(td->confirm_success);
-
- assert(l_get_le16(td->tx_packet + 4) == 1);
-
- for (i = 1; i < 5; i++) {
- assert(auth_proto_auth_timeout(ap));
- assert(l_get_le16(td->tx_packet + 4) == i + 1);
- }
-
- assert(!auth_proto_auth_timeout(ap));
-
- test_destruct(td);
-
- auth_proto_free(ap);
-}
-
-static void test_commit_timeout(const void *arg)
-{
- struct test_data *td = l_new(struct test_data, 1);
- struct auth_proto *ap = test_initialize(td);
- uint8_t last_packet[512];
- int i;
-
- memcpy(last_packet, td->tx_packet, td->tx_packet_len);
-
- for (i = 0; i < 4; i++) {
- assert(auth_proto_auth_timeout(ap));
-
- assert(!memcmp(last_packet, td->tx_packet, td->tx_packet_len));
-
- memcpy(last_packet, td->tx_packet, td->tx_packet_len);
- }
-
- assert(!auth_proto_auth_timeout(ap));
-
- test_destruct(td);
- auth_proto_free(ap);
-}
-
static void test_clogging(const void *arg)
{
struct test_data *td = l_new(struct test_data, 1);
@@ -575,16 +522,7 @@ static void test_confirm_after_accept(const void *arg)
assert(td1->tx_assoc_called);
- /* simulate sm2 not receiving confirm and resending its confirm */
- ap2->auth_timeout(ap2);
- frame_len = setup_auth_frame(frame, aa, 2, 0, td2->tx_packet + 4,
- td2->tx_packet_len - 4);
- assert(auth_proto_rx_authenticate(ap1, (uint8_t *)frame,
- frame_len) == 0);
-
- /* sc should be set to 0xffff */
- assert(l_get_u16(td1->tx_packet + 4) == 0xffff);
- /* sm1 should respond with a new confirm, and accept */
+ /* sm1 should respond with a confirm, and accept */
frame_len = setup_auth_frame(frame, spa, 2, 0, td1->tx_packet + 4,
td1->tx_packet_len - 4);
assert(auth_proto_rx_authenticate(ap2, (uint8_t *)frame,
@@ -703,8 +641,6 @@ int main(int argc, char *argv[])
goto done;
}
- l_test_add("SAE commit timeout", test_commit_timeout, NULL);
- l_test_add("SAE confirm timeout", test_confirm_timeout, NULL);
l_test_add("SAE anti-clogging", test_clogging, NULL);
l_test_add("SAE early confirm", test_early_confirm, NULL);
l_test_add("SAE reflection", test_reflection, NULL);
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-06 20:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06 18:29 [PATCH] unit: remove timeout tests from test-sae James Prestwood
2021-04-06 20:03 ` Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.