]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: More ieee802_11_parse_elems() coverage for new elements
authorJouni Malinen <j@w1.fi>
Sun, 25 Dec 2016 22:48:34 +0000 (00:48 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 26 Dec 2016 12:30:50 +0000 (14:30 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
src/common/common_module_tests.c

index e0769c08e764a4773a3e503daec04af45436b501..eb41310da88ae411a7bd80c3d24410f54bf43c62 100644 (file)
@@ -53,6 +53,31 @@ static const struct ieee802_11_parse_test_data parse_tests[] = {
          18, ParseOK, 9 },
        { (u8 *) "\x8b\x00", 2, ParseOK, 1 },
        { (u8 *) "\xdd\x04\x00\x90\x4c\x04", 6, ParseUnknown, 1 },
+       { (u8 *) "\xed\x00", 2, ParseOK, 1 },
+       { (u8 *) "\xef\x00", 2, ParseOK, 1 },
+       { (u8 *) "\xef\x01\x11", 3, ParseOK, 1 },
+       { (u8 *) "\xf0\x00", 2, ParseOK, 1 },
+       { (u8 *) "\xf1\x00", 2, ParseOK, 1 },
+       { (u8 *) "\xf1\x02\x11\x22", 4, ParseOK, 1 },
+       { (u8 *) "\xf2\x00", 2, ParseOK, 1 },
+       { (u8 *) "\xff\x00", 2, ParseUnknown, 1 },
+       { (u8 *) "\xff\x01\x00", 3, ParseUnknown, 1 },
+       { (u8 *) "\xff\x01\x01", 3, ParseOK, 1 },
+       { (u8 *) "\xff\x02\x01\x00", 4, ParseOK, 1 },
+       { (u8 *) "\xff\x01\x02", 3, ParseOK, 1 },
+       { (u8 *) "\xff\x04\x02\x11\x22\x33", 6, ParseOK, 1 },
+       { (u8 *) "\xff\x01\x04", 3, ParseOK, 1 },
+       { (u8 *) "\xff\x01\x05", 3, ParseOK, 1 },
+       { (u8 *) "\xff\x0d\x05\x11\x22\x33\x44\x55\x55\x11\x22\x33\x44\x55\x55",
+         15, ParseOK, 1 },
+       { (u8 *) "\xff\x01\x06", 3, ParseOK, 1 },
+       { (u8 *) "\xff\x02\x06\x00", 4, ParseOK, 1 },
+       { (u8 *) "\xff\x01\x07", 3, ParseOK, 1 },
+       { (u8 *) "\xff\x09\x07\x11\x22\x33\x44\x55\x66\x77\x88", 11,
+         ParseOK, 1 },
+       { (u8 *) "\xff\x01\x0c", 3, ParseOK, 1 },
+       { (u8 *) "\xff\x02\x0c\x00", 4, ParseOK, 1 },
+       { (u8 *) "\xff\x01\x0d", 3, ParseOK, 1 },
        { NULL, 0, ParseOK, 0 }
 };