Add several basic tests for IPsec API.
This PR incorporates #69  and event subtypes implementation on which it depends.

----------------github------------------------
/** Email created from pull request 70 (lumag:ipsec-testsuite-2)
 ** https://github.com/Linaro/odp/pull/70
 ** Patch: https://github.com/Linaro/odp/pull/70.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: 7b101c6937865f27f10cc58285092a6cab015e2f
 **/
----------------/github------------------------

----------------checkpatch.pl------------------------
total: 0 errors, 0 warnings, 0 checks, 8 lines checked


to_send-p-000.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 98 lines checked


to_send-p-001.patch has no obvious style problems and is ready for submission.
CHECK: Alignment should match open parenthesis
#352: FILE: test/common_plat/validation/api/ipsec/ipsec.c:313:
+               CU_ASSERT(ipsec_check_packet(part->out[i].pkt_out,
+                                       pkto[i]));

WARNING: line over 80 characters
#358: FILE: test/common_plat/validation/api/ipsec/ipsec.c:319:
+int ipsec_fill_out_one(const ipsec_test_part *part, odp_ipsec_sa_t sa, 
odp_packet_t *pkto)

WARNING: line over 80 characters
#401: FILE: test/common_plat/validation/api/ipsec/ipsec.c:362:
+               CU_ASSERT_EQUAL(1, odp_ipsec_out_inline(&pkt, 1, &param, 
&inline_param));

WARNING: line over 80 characters
#418: FILE: test/common_plat/validation/api/ipsec/ipsec.c:379:
+                               CU_ASSERT_EQUAL(ODP_EVENT_PACKET_IPSEC, 
subtype);

WARNING: line over 80 characters
#421: FILE: test/common_plat/validation/api/ipsec/ipsec.c:382:
+                               CU_ASSERT_EQUAL(ODP_EVENT_PACKET_BASIC, 
subtype);

WARNING: 'throught' may be misspelled - perhaps 'thought'?
#448: FILE: test/common_plat/validation/api/ipsec/ipsec.c:409:
+                       /* Inline packet went throught loop */

CHECK: Alignment should match open parenthesis
#458: FILE: test/common_plat/validation/api/ipsec/ipsec.c:419:
+               CU_ASSERT(ipsec_check_packet(part->out[i].pkt_out,
+                                       pkto[i]));

WARNING: 'throught' may be misspelled - perhaps 'thought'?
#485: FILE: test/common_plat/validation/api/ipsec/ipsec.c:446:
+                       /* Inline packet went throught loop */

CHECK: Avoid CamelCase: <pName>
#575: FILE: test/common_plat/validation/api/ipsec/ipsec.c:541:
+       for (i = 0; suite[i].pName; i++) {

WARNING: line over 80 characters
#607: FILE: test/common_plat/validation/api/ipsec/ipsec.c:573:
+       {"IPsec-inline-out", ipsec_out_inline_init, ipsec_out_term, 
ipsec_out_suite},

CHECK: Avoid CamelCase: <IPv4ADDR>
#1678: FILE: test/common_plat/validation/api/ipsec/ipsec_test_out.c:49:
+#define IPv4ADDR(a, b, c, d) odp_cpu_to_be_32((a << 24) | \

CHECK: Alignment should match open parenthesis
#2000: FILE: test/common_plat/validation/api/ipsec/test_vectors.h:18:
+KEY(key_a5_128, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
+               0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5);

CHECK: Alignment should match open parenthesis
#2002: FILE: test/common_plat/validation/api/ipsec/test_vectors.h:20:
+KEY(key_5a_128, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a,
+               0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a);

CHECK: Alignment should match open parenthesis
#2004: FILE: test/common_plat/validation/api/ipsec/test_vectors.h:22:
+KEY(key_a5_256, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,
+               0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5,

CHECK: Alignment should match open parenthesis
#2008: FILE: test/common_plat/validation/api/ipsec/test_vectors.h:26:
+KEY(key_5a_256, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a,
+               0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a,

CHECK: Alignment should match open parenthesis
#2013: FILE: test/common_plat/validation/api/ipsec/test_vectors.h:31:
+KEY(key_rfc3602, 0x90, 0xd3, 0x82, 0xb4, 0x10, 0xee, 0xba, 0x7a,
+                0xd9, 0x38, 0xc4, 0x6c, 0xec, 0x1a, 0x82, 0xbf);

CHECK: Alignment should match open parenthesis
#2015: FILE: test/common_plat/validation/api/ipsec/test_vectors.h:33:
+KEY(key_rfc3602_2, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
+                  0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef);

total: 0 errors, 7 warnings, 10 checks, 2616 lines checked


to_send-p-002.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
----------------/checkpatch.pl------------------------

Reply via email to