3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 01:19:23 +01:00

unit: Add test case #3 for RSNE parser

This commit is contained in:
Denis Kenzior 2015-01-15 21:49:16 -06:00
parent a01ecd64fa
commit c71b70863c

View File

@ -304,6 +304,20 @@ static const struct ie_rsne_info_test ie_rsne_info_test_2 = {
.akm_suites = IE_RSN_AKM_SUITE_8021X,
};
/* 802.11, Section 8.4.2.27.1; second example */
static const unsigned char rsne_data_3[] = {
0x30, 0x14, 0x01, 0x00, 0x00, 0x0f, 0xac, 0x04, 0x01, 0x00, 0x00, 0x0f,
0xac, 0x04, 0x01, 0x00, 0x00, 0x0f, 0xac, 0x01, 0x01, 0x00,
};
static const struct ie_rsne_info_test ie_rsne_info_test_3 = {
.data = rsne_data_3,
.data_len = sizeof(rsne_data_3),
.group_cipher = IE_RSN_CIPHER_SUITE_CCMP,
.pairwise_ciphers = IE_RSN_CIPHER_SUITE_CCMP,
.akm_suites = IE_RSN_AKM_SUITE_8021X,
};
static void ie_test_rsne_info(const void *data)
{
const struct ie_rsne_info_test *test = data;
@ -333,6 +347,8 @@ int main(int argc, char *argv[])
ie_test_rsne_info, &ie_rsne_info_test_1);
l_test_add("/ie/RSN Info Parser/Test Case 2",
ie_test_rsne_info, &ie_rsne_info_test_2);
l_test_add("/ie/RSN Info Parser/Test Case 3",
ie_test_rsne_info, &ie_rsne_info_test_3);
return l_test_run();
}