test/crypto: refactor docsis to show hidden cases
PATCH 1/1 test/crypto: refactor docsis to show hidden cases
In the current implementation, the docsis test cases are running and being reported as one test, despite the fact that multiple test cases are hidden inside i.e. "test_DOCSIS_PROTO_all" runs 52 test cases. Each docsis test case should be reported individually instead.
This commit achieves this by removing the use of the test_DOCSIS_PROTO_all function and statically listing the test cases to run when building the test suite, which are then reported to the user by description.
--- app/test/test_cryptodev.c | 265 +++++++----------- ...t_cryptodev_security_docsis_test_vectors.h | 159 +++++++++-- 2 files changed, 241 insertions(+), 183 deletions(-)
app/test/test_cryptodev.c +108 -157
@@ -9518,11 +9518,13 @@ test_PDCP_PROTO_all(void) }static int -test_docsis_proto_uplink (int i,struct docsis_test_data *d_td) +test_docsis_proto_uplink (const void *data) { +const struct docsis_test_data *d_td = data;struct crypto_testsuite_params *ts_params = &testsuite_params;struct crypto_unittest_params *ut_params = &unittest_params; -uint8_t *plaintext, *ciphertext; +uint8_t *plaintext =NULL ; +uint8_t *ciphertext =NULL ;uint8_t *iv_ptr;int32_t cipher_len, crc_len;uint32_t crc_data_len;
@@ -9539,6 +9541,15 @@ test_docsis_proto_uplink(int i, struct docsis_test_data *d_td)const struct rte_cryptodev_symmetric_capability *sym_cap;int j =0 ; +/* Set action type */ + ut_params->type = gbl_action_type ==RTE_SECURITY_ACTION_TYPE_NONE ? +RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL : + gbl_action_type; + +if (security_proto_supported (ut_params->type, +RTE_SECURITY_PROTOCOL_DOCSIS ) <0 ) +return TEST_SKIPPED ; + sec_cap_idx.action = ut_params->type; sec_cap_idx.protocol =RTE_SECURITY_PROTOCOL_DOCSIS ; sec_cap_idx.docsis.direction =RTE_SECURITY_DOCSIS_UPLINK ;
@@ -9601,8 +9612,8 @@ test_docsis_proto_uplink(int i, struct docsis_test_data *d_td) ts_params->session_priv_mpool);if (!ut_params->sec_session) { -printf ("TestCase %s(%d) line %d: %s\n" , - __func__, i, __LINE__,"failed to allocate session" ); +printf ("Test function %s line %u: failed to allocate session\n" , + __func__, __LINE__); ret =TEST_FAILED ; goto on_err; }
@@ -9611,9 +9622,8 @@ test_docsis_proto_uplink(int i, struct docsis_test_data *d_td) ut_params->op =rte_crypto_op_alloc (ts_params->op_mpool,RTE_CRYPTO_OP_TYPE_SYMMETRIC );if (!ut_params->op) { -printf ("TestCase %s(%d) line %d: %s\n" , - __func__, i, __LINE__, -"failed to allocate symmetric crypto operation" ); +printf ("Test function %s line %u: failed to allocate symmetric " +"crypto operation\n" , __func__, __LINE__); ret =TEST_FAILED ; goto on_err; }
@@ -9652,16 +9662,15 @@ test_docsis_proto_uplink(int i, struct docsis_test_data *d_td)/* Process crypto operation */ if (process_crypto_request (ts_params->valid_devs[0 ], ut_params->op) ==NULL ) { -printf ("TestCase %s(%d) line %d: %s\n" , - __func__, i, __LINE__, -"failed to process security crypto op" ); +printf ("Test function %s line %u: failed to process security " +"crypto op\n" , __func__, __LINE__); ret =TEST_FAILED ; goto on_err; }if (ut_params->op->status !=RTE_CRYPTO_OP_STATUS_SUCCESS ) { -printf ("TestCase %s(%d) line %d: %s\n" , - __func__, i, __LINE__,"crypto op processing failed" ); +printf ("Test function %s line %u: failed to process crypto op\n" , + __func__, __LINE__); ret =TEST_FAILED ; goto on_err; }
@@ -9671,8 +9680,8 @@ test_docsis_proto_uplink(int i, struct docsis_test_data *d_td)if (memcmp (plaintext, d_td->plaintext.data, d_td->plaintext.len - crc_data_len)) { -printf ("TestCase %s(%d) line %d: %s\n" , - __func__, i, __LINE__,"plaintext not as expected\n" ); +printf ("Test function %s line %u: plaintext not as expected\n" , + __func__, __LINE__);rte_hexdump (stdout,"expected" , d_td->plaintext.data, d_td->plaintext.len);rte_hexdump (stdout,"actual" , plaintext, d_td->plaintext.len);
@@ -9695,11 +9704,13 @@ test_docsis_proto_uplink(int i, struct docsis_test_data *d_td) }static int -test_docsis_proto_downlink (int i,struct docsis_test_data *d_td) +test_docsis_proto_downlink (const void *data) { +const struct docsis_test_data *d_td = data;struct crypto_testsuite_params *ts_params = &testsuite_params;struct crypto_unittest_params *ut_params = &unittest_params; -uint8_t *plaintext, *ciphertext; +uint8_t *plaintext =NULL ; +uint8_t *ciphertext =NULL ;uint8_t *iv_ptr;int32_t cipher_len, crc_len;int ret =TEST_SUCCESS ;
@@ -9715,6 +9726,15 @@ test_docsis_proto_downlink(int i, struct docsis_test_data *d_td)const struct rte_cryptodev_symmetric_capability *sym_cap;int j =0 ; +/* Set action type */ + ut_params->type = gbl_action_type ==RTE_SECURITY_ACTION_TYPE_NONE ? +RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL : + gbl_action_type; + +if (security_proto_supported (ut_params->type, +RTE_SECURITY_PROTOCOL_DOCSIS ) <0 ) +return TEST_SKIPPED ; + sec_cap_idx.action = ut_params->type; sec_cap_idx.protocol =RTE_SECURITY_PROTOCOL_DOCSIS ; sec_cap_idx.docsis.direction =RTE_SECURITY_DOCSIS_DOWNLINK ;
@@ -9777,8 +9797,8 @@ test_docsis_proto_downlink(int i, struct docsis_test_data *d_td) ts_params->session_priv_mpool);if (!ut_params->sec_session) { -printf ("TestCase %s(%d) line %d: %s\n" , - __func__, i, __LINE__,"failed to allocate session" ); +printf ("Test function %s line %u: failed to allocate session\n" , + __func__, __LINE__); ret =TEST_FAILED ; goto on_err; }
@@ -9787,9 +9807,8 @@ test_docsis_proto_downlink(int i, struct docsis_test_data *d_td) ut_params->op =rte_crypto_op_alloc (ts_params->op_mpool,RTE_CRYPTO_OP_TYPE_SYMMETRIC );if (!ut_params->op) { -printf ("TestCase %s(%d) line %d: %s\n" , - __func__, i, __LINE__, -"failed to allocate security crypto operation" ); +printf ("Test function %s line %u: failed to allocate symmetric " +"crypto operation\n" , __func__, __LINE__); ret =TEST_FAILED ; goto on_err; }
@@ -9827,16 +9846,15 @@ test_docsis_proto_downlink(int i, struct docsis_test_data *d_td)/* Process crypto operation */ if (process_crypto_request (ts_params->valid_devs[0 ], ut_params->op) ==NULL ) { -printf ("TestCase %s(%d) line %d: %s\n" , - __func__, i, __LINE__, -"failed to process security crypto op" ); +printf ("Test function %s line %u: failed to process crypto op\n" , + __func__, __LINE__); ret =TEST_FAILED ; goto on_err; }if (ut_params->op->status !=RTE_CRYPTO_OP_STATUS_SUCCESS ) { -printf ("TestCase %s(%d) line %d: %s\n" , - __func__, i, __LINE__,"crypto op processing failed" ); +printf ("Test function %s line %u: crypto op processing failed\n" , + __func__, __LINE__); ret =TEST_FAILED ; goto on_err; }
@@ -9845,8 +9863,8 @@ test_docsis_proto_downlink(int i, struct docsis_test_data *d_td) ciphertext = plaintext;if (memcmp (ciphertext, d_td->ciphertext.data, d_td->ciphertext.len)) { -printf ("TestCase %s(%d) line %d: %s\n" , - __func__, i, __LINE__,"ciphertext not as expected\n" ); +printf ("Test function %s line %u: plaintext not as expected\n" , + __func__, __LINE__);rte_hexdump (stdout,"expected" , d_td->ciphertext.data, d_td->ciphertext.len);rte_hexdump (stdout,"actual" , ciphertext, d_td->ciphertext.len);
@@ -9867,133 +9885,6 @@ test_docsis_proto_downlink(int i, struct docsis_test_data *d_td)return ret; } - -#define TEST_DOCSIS_COUNT (func) do { \ - int ret = func; \ - if (ret == TEST_SUCCESS) { \ - printf("\t%2d)", n++); \ - printf("+++++ PASSED:" #func"\n"); \ - p++; \ - } else if (ret == TEST_SKIPPED) { \ - printf("\t%2d)", n++); \ - printf("~~~~~ SKIPPED:" #func"\n"); \ - s++; \ - } else { \ - printf("\t%2d)", n++); \ - printf("----- FAILED:" #func"\n"); \ - f++; \ - } \ -} while (0) - -static int -test_DOCSIS_PROTO_uplink_all (void ) -{ -int p =0 , s =0 , f =0 , n =0 ; - -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (1 , &docsis_test_case_1)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (2 , &docsis_test_case_2)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (3 , &docsis_test_case_3)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (4 , &docsis_test_case_4)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (5 , &docsis_test_case_5)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (6 , &docsis_test_case_6)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (7 , &docsis_test_case_7)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (8 , &docsis_test_case_8)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (9 , &docsis_test_case_9)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (10 , &docsis_test_case_10)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (11 , &docsis_test_case_11)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (12 , &docsis_test_case_12)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (13 , &docsis_test_case_13)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (14 , &docsis_test_case_14)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (15 , &docsis_test_case_15)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (16 , &docsis_test_case_16)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (17 , &docsis_test_case_17)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (18 , &docsis_test_case_18)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (19 , &docsis_test_case_19)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (20 , &docsis_test_case_20)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (21 , &docsis_test_case_21)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (22 , &docsis_test_case_22)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (23 , &docsis_test_case_23)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (24 , &docsis_test_case_24)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (25 , &docsis_test_case_25)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (26 , &docsis_test_case_26)); - -if (f) -printf ("## %s: %d passed out of %d (%d skipped)\n" , - __func__, p, n, s); - -return f; -}; - -static int -test_DOCSIS_PROTO_downlink_all (void ) -{ -int p =0 , s =0 , f =0 , n =0 ; - -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (1 , &docsis_test_case_1)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (2 , &docsis_test_case_2)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (3 , &docsis_test_case_3)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (4 , &docsis_test_case_4)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (5 , &docsis_test_case_5)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (6 , &docsis_test_case_6)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (7 , &docsis_test_case_7)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (8 , &docsis_test_case_8)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (9 , &docsis_test_case_9)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (10 , &docsis_test_case_10)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (11 , &docsis_test_case_11)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (12 , &docsis_test_case_12)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (13 , &docsis_test_case_13)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (14 , &docsis_test_case_14)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (15 , &docsis_test_case_15)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (16 , &docsis_test_case_16)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (17 , &docsis_test_case_17)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (18 , &docsis_test_case_18)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (19 , &docsis_test_case_19)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (20 , &docsis_test_case_20)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (21 , &docsis_test_case_21)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (22 , &docsis_test_case_22)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (23 , &docsis_test_case_23)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (24 , &docsis_test_case_24)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (25 , &docsis_test_case_25)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (26 , &docsis_test_case_26)); - -if (f) -printf ("## %s: %d passed out of %d (%d skipped)\n" , - __func__, p, n, s); - -return f; -}; - -static int -test_DOCSIS_PROTO_all (void ) -{ -struct crypto_testsuite_params *ts_params = &testsuite_params; -struct crypto_unittest_params *ut_params = &unittest_params; -struct rte_cryptodev_info dev_info; -int status; - -rte_cryptodev_info_get (ts_params->valid_devs[0 ], &dev_info); -uint64_t feat_flags = dev_info.feature_flags; - -if (!(feat_flags &RTE_CRYPTODEV_FF_SECURITY )) -return TEST_SKIPPED ; - -/* Set action type */ - ut_params->type = gbl_action_type ==RTE_SECURITY_ACTION_TYPE_NONE ? -RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL : - gbl_action_type; - -if (security_proto_supported (ut_params->type, -RTE_SECURITY_PROTOCOL_DOCSIS ) <0 ) -return TEST_SKIPPED ; - - status =test_DOCSIS_PROTO_uplink_all (); - status +=test_DOCSIS_PROTO_downlink_all (); - -if (status) -return TEST_FAILED ; -else -return TEST_SUCCESS ; -}#endif static int
@@ -14488,12 +14379,72 @@ static struct unit_test_suite pdcp_proto_testsuite = { } }; +#define ADD_UPLINK_TESTCASE (data) \ + TEST_CASE_NAMED_WITH_DATA(data.test_descr_uplink, ut_setup_security, \ + ut_teardown, test_docsis_proto_uplink, (const void *) &data), \ + +#define ADD_DOWNLINK_TESTCASE (data) \ + TEST_CASE_NAMED_WITH_DATA(data.test_descr_downlink, ut_setup_security, \ + ut_teardown, test_docsis_proto_downlink, (const void *) &data), \ +static struct unit_test_suite docsis_proto_testsuite = { .suite_name ="Docsis Proto Unit Test Suite" , .setup = docsis_proto_testsuite_setup, .unit_test_cases = { -TEST_CASE_ST (ut_setup_security, ut_teardown, - test_DOCSIS_PROTO_all), +/* Uplink */ + ADD_UPLINK_TESTCASE(docsis_test_case_1) + ADD_UPLINK_TESTCASE(docsis_test_case_2) + ADD_UPLINK_TESTCASE(docsis_test_case_3) + ADD_UPLINK_TESTCASE(docsis_test_case_4) + ADD_UPLINK_TESTCASE(docsis_test_case_5) + ADD_UPLINK_TESTCASE(docsis_test_case_6) + ADD_UPLINK_TESTCASE(docsis_test_case_7) + ADD_UPLINK_TESTCASE(docsis_test_case_8) + ADD_UPLINK_TESTCASE(docsis_test_case_9) + ADD_UPLINK_TESTCASE(docsis_test_case_10) + ADD_UPLINK_TESTCASE(docsis_test_case_11) + ADD_UPLINK_TESTCASE(docsis_test_case_12) + ADD_UPLINK_TESTCASE(docsis_test_case_13) + ADD_UPLINK_TESTCASE(docsis_test_case_14) + ADD_UPLINK_TESTCASE(docsis_test_case_15) + ADD_UPLINK_TESTCASE(docsis_test_case_16) + ADD_UPLINK_TESTCASE(docsis_test_case_17) + ADD_UPLINK_TESTCASE(docsis_test_case_18) + ADD_UPLINK_TESTCASE(docsis_test_case_19) + ADD_UPLINK_TESTCASE(docsis_test_case_20) + ADD_UPLINK_TESTCASE(docsis_test_case_21) + ADD_UPLINK_TESTCASE(docsis_test_case_22) + ADD_UPLINK_TESTCASE(docsis_test_case_23) + ADD_UPLINK_TESTCASE(docsis_test_case_24) + ADD_UPLINK_TESTCASE(docsis_test_case_25) + ADD_UPLINK_TESTCASE(docsis_test_case_26) +/* Downlink */ + ADD_DOWNLINK_TESTCASE(docsis_test_case_1) + ADD_DOWNLINK_TESTCASE(docsis_test_case_2) + ADD_DOWNLINK_TESTCASE(docsis_test_case_3) + ADD_DOWNLINK_TESTCASE(docsis_test_case_4) + ADD_DOWNLINK_TESTCASE(docsis_test_case_5) + ADD_DOWNLINK_TESTCASE(docsis_test_case_6) + ADD_DOWNLINK_TESTCASE(docsis_test_case_7) + ADD_DOWNLINK_TESTCASE(docsis_test_case_8) + ADD_DOWNLINK_TESTCASE(docsis_test_case_9) + ADD_DOWNLINK_TESTCASE(docsis_test_case_10) + ADD_DOWNLINK_TESTCASE(docsis_test_case_11) + ADD_DOWNLINK_TESTCASE(docsis_test_case_12) + ADD_DOWNLINK_TESTCASE(docsis_test_case_13) + ADD_DOWNLINK_TESTCASE(docsis_test_case_14) + ADD_DOWNLINK_TESTCASE(docsis_test_case_15) + ADD_DOWNLINK_TESTCASE(docsis_test_case_16) + ADD_DOWNLINK_TESTCASE(docsis_test_case_17) + ADD_DOWNLINK_TESTCASE(docsis_test_case_18) + ADD_DOWNLINK_TESTCASE(docsis_test_case_19) + ADD_DOWNLINK_TESTCASE(docsis_test_case_20) + ADD_DOWNLINK_TESTCASE(docsis_test_case_21) + ADD_DOWNLINK_TESTCASE(docsis_test_case_22) + ADD_DOWNLINK_TESTCASE(docsis_test_case_23) + ADD_DOWNLINK_TESTCASE(docsis_test_case_24) + ADD_DOWNLINK_TESTCASE(docsis_test_case_25) + ADD_DOWNLINK_TESTCASE(docsis_test_case_26)TEST_CASES_END ()/**< NULL terminate unit test array */ } };
app/test/test_cryptodev_security_docsis_test_vectors.h +133 -26
321 lines not on this page · raw message
Signature · 1 line
2.25.1
Hi Rebecca, see below
Quoted 7 lines
-----Original Message-----
From: Troy, Rebecca <[email protected]>In the current implementation, the docsis test cases are running and being reported as one test, despite the fact that multiple test cases are hidden inside i.e. "
test_DOCSIS_PROTO_all" runs
52 test cases. Each docsis test case should be reported individually instead.
[DC] Should make "docsis" all uppercase in the commit message - "DOCSIS"
Quoted 13 lines
This commit achieves this by removing the use of the
test_DOCSIS_PROTO_allfunction and statically listing the test cases to run when building the test suite, which are then reported to the user by description.Signed-off-by Rebecca Troy <[email protected]>--- app/test/test_cryptodev.c | 265 +++++++----------- ...t_cryptodev_security_docsis_test_vectors.h | 159 +++++++++-- 2 files changed, 241 insertions(+), 183 deletions(-)
<snip>
app/test/test_cryptodev.c static struct unit_test_suite pdcp_proto_testsuite = { · line 14391
Quoted 3 lines
app/test/test_cryptodev.c +1
-0+static struct unit_test_suite docsis_proto_testsuite = { .suite_name ="Docsis Proto Unit Test Suite" ,
[DC] Outside the specific changes of this patch, but "Docsis" should be all uppercase in the suite name too - "DOCSIS"... could take this opportunity to fix up this minor one
Quoted 9 lines
app/test/test_cryptodev.c +5
-2.setup = docsis_proto_testsuite_setup, .unit_test_cases = { -TEST_CASE_ST (ut_setup_security, ut_teardown, - test_DOCSIS_PROTO_all), +/* Uplink */ + ADD_UPLINK_TESTCASE(docsis_test_case_1) + ADD_UPLINK_TESTCASE(docsis_test_case_2) + ADD_UPLINK_TESTCASE(docsis_test_case_3) + ADD_UPLINK_TESTCASE(docsis_test_case_4)
<snip>
Review
Quoted 8 lines
app/test/test_cryptodev_security_docsis_test_vectors.h +4
-1-struct docsis_test_data docsis_test_case_1 = { +const struct docsis_test_data docsis_test_case_1 = { + .test_descr_uplink = {"AES-DOCSIS-BPI-128 and CRC Verify (24-byte " +"frame, Small offset and runt block encryption)" }, + .test_descr_downlink = {"CRC Generate and AES-DOCSIS-BPI-128(24-byte "
(quoted diff) +1
-0+ "frame, Small offset and runt block encryption)"},
[DC] This one is my fault when I supplied the descriptions, so apologies about this, but all the uplink descriptions should say "decryption" instead of "encryption"
Also I think all the descriptions should say "Uplink" or "Downlink" at the start. This can be inferred from the order of AES-DOCSIS-BPI and CRC in the description, but when I ran the test cases, I still had to think are these Uplink or Downlink tests. It would be much clearer if it's stated explicitly
Regards,
David
Quoted 78 lines
-----Original Message-----
From: Coyle, David <[email protected]>
Sent: Thursday 28 October 2021 11:34
To: Troy, Rebecca <[email protected]>; [email protected]
Cc: Power, Ciara <[email protected]>; Zhang, Roy Fan <[email protected]>; Akhil Goyal <[email protected]>; Doherty, Declan <[email protected]>
Subject: RE: [PATCH] test/crypto: refactor docsis to show hidden casesHi Rebecca, see below
Quoted 7 lines
-----Original Message-----
From: Troy, Rebecca <[email protected]>In the current implementation, the docsis test cases are running and being reported as one test, despite the fact that multiple test cases are hidden inside i.e. "
test_DOCSIS_PROTO_all" runs
52 test cases. Each docsis test case should be reported individually instead.[DC] Should make "docsis" all uppercase in the commit message - "DOCSIS"
Quoted 13 lines
This commit achieves this by removing the use of the
test_DOCSIS_PROTO_allfunction and statically listing the test cases to run when building the test suite, which are then reported to the user by description.Signed-off-by Rebecca Troy <[email protected]>--- app/test/test_cryptodev.c | 265 +++++++----------- ...t_cryptodev_security_docsis_test_vectors.h | 159 +++++++++-- 2 files changed, 241 insertions(+), 183 deletions(-)<snip>
app/test/test_cryptodev.c static struct unit_test_suite pdcp_proto_testsuite = { · line 14391
Quoted 3 lines
app/test/test_cryptodev.c +1
-0+static struct unit_test_suite docsis_proto_testsuite = { .suite_name ="Docsis Proto Unit Test Suite" ,[DC] Outside the specific changes of this patch, but "Docsis" should be all uppercase in the suite name too - "DOCSIS"... could take this opportunity to fix up this minor one
Quoted 9 lines
app/test/test_cryptodev.c +5
-2.setup = docsis_proto_testsuite_setup, .unit_test_cases = { -TEST_CASE_ST (ut_setup_security, ut_teardown, - test_DOCSIS_PROTO_all), +/* Uplink */ + ADD_UPLINK_TESTCASE(docsis_test_case_1) + ADD_UPLINK_TESTCASE(docsis_test_case_2) + ADD_UPLINK_TESTCASE(docsis_test_case_3) + ADD_UPLINK_TESTCASE(docsis_test_case_4)<snip>
Review
Quoted 8 lines
app/test/test_cryptodev_security_docsis_test_vectors.h +4
-1-struct docsis_test_data docsis_test_case_1 = { +const struct docsis_test_data docsis_test_case_1 = { + .test_descr_uplink = {"AES-DOCSIS-BPI-128 and CRC Verify (24-byte " +"frame, Small offset and runt block encryption)" }, + .test_descr_downlink = {"CRC Generate and AES-DOCSIS-BPI-128(24-byte "
(quoted diff) +1
-0+ "frame, Small offset and runt block encryption)"},[DC] This one is my fault when I supplied the descriptions, so apologies about this, but all the uplink descriptions should say "decryption" instead of "encryption"
Also I think all the descriptions should say "Uplink" or "Downlink" at the start.
This can be inferred from the order of AES-DOCSIS-BPI and CRC in the description, but when I ran the test cases, I still had to think are these Uplink or Downlink tests.
It would be much clearer if it's stated explicitly
Quoted 2 lines
Regards,
David
Great, thanks for the feedback David! Will look at implementing these changes in a v2.
Thanks,
Rebecca.
PATCH v2 1/1 test/crypto: refactor DOCSIS to show hidden cases
In reply to Rebecca TroyIn the current implementation, the DOCSIS test cases are running and being reported as one test, despite the fact that multiple test cases are hidden inside i.e. "test_DOCSIS_PROTO_all" runs 52 test cases. Each DOCSIS test case should be reported individually instead.
This commit achieves this by removing the use of the test_DOCSIS_PROTO_all function and statically listing the test cases to run when building the test suite, which are then reported to the user by description.
---
v2:
- Changed references of 'docsis' to uppercase 'DOCSIS'
- Corrected uplink descriptions by replacing 'encryption' with
'decryption'
- Added 'Uplink' and 'Downlink' to the beginning of their respective
test descriptions
--- app/test/test_cryptodev.c | 271 +++++++----------- ...t_cryptodev_security_docsis_test_vectors.h | 159 ++++++++-- 2 files changed, 244 insertions(+), 186 deletions(-)
app/test/test_cryptodev.c +111 -160
@@ -874,13 +874,13 @@ docsis_proto_testsuite_setup(void)if (!(dev_info.feature_flags &RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO ) || !(dev_info.feature_flags &RTE_CRYPTODEV_FF_SECURITY )) { -RTE_LOG (INFO ,USER1 ,"Feature flag requirements for Docsis " +RTE_LOG (INFO ,USER1 ,"Feature flag requirements for DOCSIS " "Proto testsuite not met\n" );return TEST_SKIPPED ; }if (check_cipher_capabilities_supported (ciphers,RTE_DIM (ciphers)) !=0 ) { -RTE_LOG (INFO ,USER1 ,"Capability requirements for Docsis Proto " +RTE_LOG (INFO ,USER1 ,"Capability requirements for DOCSIS Proto " "testsuite not met\n" );return TEST_SKIPPED ; }
@@ -9518,11 +9518,13 @@ test_PDCP_PROTO_all(void) }static int -test_docsis_proto_uplink (int i,struct docsis_test_data *d_td) +test_docsis_proto_uplink (const void *data) { +const struct docsis_test_data *d_td = data;struct crypto_testsuite_params *ts_params = &testsuite_params;struct crypto_unittest_params *ut_params = &unittest_params; -uint8_t *plaintext, *ciphertext; +uint8_t *plaintext =NULL ; +uint8_t *ciphertext =NULL ;uint8_t *iv_ptr;int32_t cipher_len, crc_len;uint32_t crc_data_len;
@@ -9539,6 +9541,15 @@ test_docsis_proto_uplink(int i, struct docsis_test_data *d_td)const struct rte_cryptodev_symmetric_capability *sym_cap;int j =0 ; +/* Set action type */ + ut_params->type = gbl_action_type ==RTE_SECURITY_ACTION_TYPE_NONE ? +RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL : + gbl_action_type; + +if (security_proto_supported (ut_params->type, +RTE_SECURITY_PROTOCOL_DOCSIS ) <0 ) +return TEST_SKIPPED ; + sec_cap_idx.action = ut_params->type; sec_cap_idx.protocol =RTE_SECURITY_PROTOCOL_DOCSIS ; sec_cap_idx.docsis.direction =RTE_SECURITY_DOCSIS_UPLINK ;
@@ -9601,8 +9612,8 @@ test_docsis_proto_uplink(int i, struct docsis_test_data *d_td) ts_params->session_priv_mpool);if (!ut_params->sec_session) { -printf ("TestCase %s(%d) line %d: %s\n" , - __func__, i, __LINE__,"failed to allocate session" ); +printf ("Test function %s line %u: failed to allocate session\n" , + __func__, __LINE__); ret =TEST_FAILED ; goto on_err; }
@@ -9611,9 +9622,8 @@ test_docsis_proto_uplink(int i, struct docsis_test_data *d_td) ut_params->op =rte_crypto_op_alloc (ts_params->op_mpool,RTE_CRYPTO_OP_TYPE_SYMMETRIC );if (!ut_params->op) { -printf ("TestCase %s(%d) line %d: %s\n" , - __func__, i, __LINE__, -"failed to allocate symmetric crypto operation" ); +printf ("Test function %s line %u: failed to allocate symmetric " +"crypto operation\n" , __func__, __LINE__); ret =TEST_FAILED ; goto on_err; }
@@ -9652,16 +9662,15 @@ test_docsis_proto_uplink(int i, struct docsis_test_data *d_td)/* Process crypto operation */ if (process_crypto_request (ts_params->valid_devs[0 ], ut_params->op) ==NULL ) { -printf ("TestCase %s(%d) line %d: %s\n" , - __func__, i, __LINE__, -"failed to process security crypto op" ); +printf ("Test function %s line %u: failed to process security " +"crypto op\n" , __func__, __LINE__); ret =TEST_FAILED ; goto on_err; }if (ut_params->op->status !=RTE_CRYPTO_OP_STATUS_SUCCESS ) { -printf ("TestCase %s(%d) line %d: %s\n" , - __func__, i, __LINE__,"crypto op processing failed" ); +printf ("Test function %s line %u: failed to process crypto op\n" , + __func__, __LINE__); ret =TEST_FAILED ; goto on_err; }
@@ -9671,8 +9680,8 @@ test_docsis_proto_uplink(int i, struct docsis_test_data *d_td)if (memcmp (plaintext, d_td->plaintext.data, d_td->plaintext.len - crc_data_len)) { -printf ("TestCase %s(%d) line %d: %s\n" , - __func__, i, __LINE__,"plaintext not as expected\n" ); +printf ("Test function %s line %u: plaintext not as expected\n" , + __func__, __LINE__);rte_hexdump (stdout,"expected" , d_td->plaintext.data, d_td->plaintext.len);rte_hexdump (stdout,"actual" , plaintext, d_td->plaintext.len);
@@ -9695,11 +9704,13 @@ test_docsis_proto_uplink(int i, struct docsis_test_data *d_td) }static int -test_docsis_proto_downlink (int i,struct docsis_test_data *d_td) +test_docsis_proto_downlink (const void *data) { +const struct docsis_test_data *d_td = data;struct crypto_testsuite_params *ts_params = &testsuite_params;struct crypto_unittest_params *ut_params = &unittest_params; -uint8_t *plaintext, *ciphertext; +uint8_t *plaintext =NULL ; +uint8_t *ciphertext =NULL ;uint8_t *iv_ptr;int32_t cipher_len, crc_len;int ret =TEST_SUCCESS ;
@@ -9715,6 +9726,15 @@ test_docsis_proto_downlink(int i, struct docsis_test_data *d_td)const struct rte_cryptodev_symmetric_capability *sym_cap;int j =0 ; +/* Set action type */ + ut_params->type = gbl_action_type ==RTE_SECURITY_ACTION_TYPE_NONE ? +RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL : + gbl_action_type; + +if (security_proto_supported (ut_params->type, +RTE_SECURITY_PROTOCOL_DOCSIS ) <0 ) +return TEST_SKIPPED ; + sec_cap_idx.action = ut_params->type; sec_cap_idx.protocol =RTE_SECURITY_PROTOCOL_DOCSIS ; sec_cap_idx.docsis.direction =RTE_SECURITY_DOCSIS_DOWNLINK ;
@@ -9777,8 +9797,8 @@ test_docsis_proto_downlink(int i, struct docsis_test_data *d_td) ts_params->session_priv_mpool);if (!ut_params->sec_session) { -printf ("TestCase %s(%d) line %d: %s\n" , - __func__, i, __LINE__,"failed to allocate session" ); +printf ("Test function %s line %u: failed to allocate session\n" , + __func__, __LINE__); ret =TEST_FAILED ; goto on_err; }
@@ -9787,9 +9807,8 @@ test_docsis_proto_downlink(int i, struct docsis_test_data *d_td) ut_params->op =rte_crypto_op_alloc (ts_params->op_mpool,RTE_CRYPTO_OP_TYPE_SYMMETRIC );if (!ut_params->op) { -printf ("TestCase %s(%d) line %d: %s\n" , - __func__, i, __LINE__, -"failed to allocate security crypto operation" ); +printf ("Test function %s line %u: failed to allocate symmetric " +"crypto operation\n" , __func__, __LINE__); ret =TEST_FAILED ; goto on_err; }
@@ -9827,16 +9846,15 @@ test_docsis_proto_downlink(int i, struct docsis_test_data *d_td)/* Process crypto operation */ if (process_crypto_request (ts_params->valid_devs[0 ], ut_params->op) ==NULL ) { -printf ("TestCase %s(%d) line %d: %s\n" , - __func__, i, __LINE__, -"failed to process security crypto op" ); +printf ("Test function %s line %u: failed to process crypto op\n" , + __func__, __LINE__); ret =TEST_FAILED ; goto on_err; }if (ut_params->op->status !=RTE_CRYPTO_OP_STATUS_SUCCESS ) { -printf ("TestCase %s(%d) line %d: %s\n" , - __func__, i, __LINE__,"crypto op processing failed" ); +printf ("Test function %s line %u: crypto op processing failed\n" , + __func__, __LINE__); ret =TEST_FAILED ; goto on_err; }
@@ -9845,8 +9863,8 @@ test_docsis_proto_downlink(int i, struct docsis_test_data *d_td) ciphertext = plaintext;if (memcmp (ciphertext, d_td->ciphertext.data, d_td->ciphertext.len)) { -printf ("TestCase %s(%d) line %d: %s\n" , - __func__, i, __LINE__,"ciphertext not as expected\n" ); +printf ("Test function %s line %u: plaintext not as expected\n" , + __func__, __LINE__);rte_hexdump (stdout,"expected" , d_td->ciphertext.data, d_td->ciphertext.len);rte_hexdump (stdout,"actual" , ciphertext, d_td->ciphertext.len);
@@ -9867,133 +9885,6 @@ test_docsis_proto_downlink(int i, struct docsis_test_data *d_td)return ret; } - -#define TEST_DOCSIS_COUNT (func) do { \ - int ret = func; \ - if (ret == TEST_SUCCESS) { \ - printf("\t%2d)", n++); \ - printf("+++++ PASSED:" #func"\n"); \ - p++; \ - } else if (ret == TEST_SKIPPED) { \ - printf("\t%2d)", n++); \ - printf("~~~~~ SKIPPED:" #func"\n"); \ - s++; \ - } else { \ - printf("\t%2d)", n++); \ - printf("----- FAILED:" #func"\n"); \ - f++; \ - } \ -} while (0) - -static int -test_DOCSIS_PROTO_uplink_all (void ) -{ -int p =0 , s =0 , f =0 , n =0 ; - -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (1 , &docsis_test_case_1)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (2 , &docsis_test_case_2)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (3 , &docsis_test_case_3)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (4 , &docsis_test_case_4)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (5 , &docsis_test_case_5)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (6 , &docsis_test_case_6)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (7 , &docsis_test_case_7)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (8 , &docsis_test_case_8)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (9 , &docsis_test_case_9)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (10 , &docsis_test_case_10)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (11 , &docsis_test_case_11)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (12 , &docsis_test_case_12)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (13 , &docsis_test_case_13)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (14 , &docsis_test_case_14)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (15 , &docsis_test_case_15)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (16 , &docsis_test_case_16)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (17 , &docsis_test_case_17)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (18 , &docsis_test_case_18)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (19 , &docsis_test_case_19)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (20 , &docsis_test_case_20)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (21 , &docsis_test_case_21)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (22 , &docsis_test_case_22)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (23 , &docsis_test_case_23)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (24 , &docsis_test_case_24)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (25 , &docsis_test_case_25)); -TEST_DOCSIS_COUNT (test_docsis_proto_uplink (26 , &docsis_test_case_26)); - -if (f) -printf ("## %s: %d passed out of %d (%d skipped)\n" , - __func__, p, n, s); - -return f; -}; - -static int -test_DOCSIS_PROTO_downlink_all (void ) -{ -int p =0 , s =0 , f =0 , n =0 ; - -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (1 , &docsis_test_case_1)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (2 , &docsis_test_case_2)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (3 , &docsis_test_case_3)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (4 , &docsis_test_case_4)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (5 , &docsis_test_case_5)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (6 , &docsis_test_case_6)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (7 , &docsis_test_case_7)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (8 , &docsis_test_case_8)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (9 , &docsis_test_case_9)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (10 , &docsis_test_case_10)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (11 , &docsis_test_case_11)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (12 , &docsis_test_case_12)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (13 , &docsis_test_case_13)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (14 , &docsis_test_case_14)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (15 , &docsis_test_case_15)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (16 , &docsis_test_case_16)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (17 , &docsis_test_case_17)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (18 , &docsis_test_case_18)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (19 , &docsis_test_case_19)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (20 , &docsis_test_case_20)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (21 , &docsis_test_case_21)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (22 , &docsis_test_case_22)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (23 , &docsis_test_case_23)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (24 , &docsis_test_case_24)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (25 , &docsis_test_case_25)); -TEST_DOCSIS_COUNT (test_docsis_proto_downlink (26 , &docsis_test_case_26)); - -if (f) -printf ("## %s: %d passed out of %d (%d skipped)\n" , - __func__, p, n, s); - -return f; -}; - -static int -test_DOCSIS_PROTO_all (void ) -{ -struct crypto_testsuite_params *ts_params = &testsuite_params; -struct crypto_unittest_params *ut_params = &unittest_params; -struct rte_cryptodev_info dev_info; -int status; - -rte_cryptodev_info_get (ts_params->valid_devs[0 ], &dev_info); -uint64_t feat_flags = dev_info.feature_flags; - -if (!(feat_flags &RTE_CRYPTODEV_FF_SECURITY )) -return TEST_SKIPPED ; - -/* Set action type */ - ut_params->type = gbl_action_type ==RTE_SECURITY_ACTION_TYPE_NONE ? -RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL : - gbl_action_type; - -if (security_proto_supported (ut_params->type, -RTE_SECURITY_PROTOCOL_DOCSIS ) <0 ) -return TEST_SKIPPED ; - - status =test_DOCSIS_PROTO_uplink_all (); - status +=test_DOCSIS_PROTO_downlink_all (); - -if (status) -return TEST_FAILED ; -else -return TEST_SUCCESS ; -}#endif static int
@@ -14488,12 +14379,72 @@ static struct unit_test_suite pdcp_proto_testsuite = { } }; +#define ADD_UPLINK_TESTCASE (data) \ + TEST_CASE_NAMED_WITH_DATA(data.test_descr_uplink, ut_setup_security, \ + ut_teardown, test_docsis_proto_uplink, (const void *) &data), \ + +#define ADD_DOWNLINK_TESTCASE (data) \ + TEST_CASE_NAMED_WITH_DATA(data.test_descr_downlink, ut_setup_security, \ + ut_teardown, test_docsis_proto_downlink, (const void *) &data), \ +static struct unit_test_suite docsis_proto_testsuite = { - .suite_name ="Docsis Proto Unit Test Suite" , + .suite_name ="DOCSIS Proto Unit Test Suite" , .setup = docsis_proto_testsuite_setup, .unit_test_cases = { -TEST_CASE_ST (ut_setup_security, ut_teardown, - test_DOCSIS_PROTO_all), +/* Uplink */ + ADD_UPLINK_TESTCASE(docsis_test_case_1) + ADD_UPLINK_TESTCASE(docsis_test_case_2) + ADD_UPLINK_TESTCASE(docsis_test_case_3) + ADD_UPLINK_TESTCASE(docsis_test_case_4) + ADD_UPLINK_TESTCASE(docsis_test_case_5) + ADD_UPLINK_TESTCASE(docsis_test_case_6) + ADD_UPLINK_TESTCASE(docsis_test_case_7) + ADD_UPLINK_TESTCASE(docsis_test_case_8) + ADD_UPLINK_TESTCASE(docsis_test_case_9) + ADD_UPLINK_TESTCASE(docsis_test_case_10) + ADD_UPLINK_TESTCASE(docsis_test_case_11) + ADD_UPLINK_TESTCASE(docsis_test_case_12) + ADD_UPLINK_TESTCASE(docsis_test_case_13) + ADD_UPLINK_TESTCASE(docsis_test_case_14) + ADD_UPLINK_TESTCASE(docsis_test_case_15) + ADD_UPLINK_TESTCASE(docsis_test_case_16) + ADD_UPLINK_TESTCASE(docsis_test_case_17) + ADD_UPLINK_TESTCASE(docsis_test_case_18) + ADD_UPLINK_TESTCASE(docsis_test_case_19) + ADD_UPLINK_TESTCASE(docsis_test_case_20) + ADD_UPLINK_TESTCASE(docsis_test_case_21) + ADD_UPLINK_TESTCASE(docsis_test_case_22) + ADD_UPLINK_TESTCASE(docsis_test_case_23) + ADD_UPLINK_TESTCASE(docsis_test_case_24) + ADD_UPLINK_TESTCASE(docsis_test_case_25) + ADD_UPLINK_TESTCASE(docsis_test_case_26) +/* Downlink */ + ADD_DOWNLINK_TESTCASE(docsis_test_case_1) + ADD_DOWNLINK_TESTCASE(docsis_test_case_2) + ADD_DOWNLINK_TESTCASE(docsis_test_case_3) + ADD_DOWNLINK_TESTCASE(docsis_test_case_4) + ADD_DOWNLINK_TESTCASE(docsis_test_case_5) + ADD_DOWNLINK_TESTCASE(docsis_test_case_6) + ADD_DOWNLINK_TESTCASE(docsis_test_case_7) + ADD_DOWNLINK_TESTCASE(docsis_test_case_8) + ADD_DOWNLINK_TESTCASE(docsis_test_case_9) + ADD_DOWNLINK_TESTCASE(docsis_test_case_10) + ADD_DOWNLINK_TESTCASE(docsis_test_case_11) + ADD_DOWNLINK_TESTCASE(docsis_test_case_12) + ADD_DOWNLINK_TESTCASE(docsis_test_case_13) + ADD_DOWNLINK_TESTCASE(docsis_test_case_14) + ADD_DOWNLINK_TESTCASE(docsis_test_case_15) + ADD_DOWNLINK_TESTCASE(docsis_test_case_16) + ADD_DOWNLINK_TESTCASE(docsis_test_case_17) + ADD_DOWNLINK_TESTCASE(docsis_test_case_18) + ADD_DOWNLINK_TESTCASE(docsis_test_case_19) + ADD_DOWNLINK_TESTCASE(docsis_test_case_20) + ADD_DOWNLINK_TESTCASE(docsis_test_case_21) + ADD_DOWNLINK_TESTCASE(docsis_test_case_22) + ADD_DOWNLINK_TESTCASE(docsis_test_case_23) + ADD_DOWNLINK_TESTCASE(docsis_test_case_24) + ADD_DOWNLINK_TESTCASE(docsis_test_case_25) + ADD_DOWNLINK_TESTCASE(docsis_test_case_26)TEST_CASES_END ()/**< NULL terminate unit test array */ } };
app/test/test_cryptodev_security_docsis_test_vectors.h +133 -26
321 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v2] test/crypto: refactor DOCSIS to show hidden cases
Quoted 15 lines
-----Original Message-----
From: Troy, Rebecca <[email protected]>
Sent: Friday 29 October 2021 10:04
To: [email protected]
Cc: Power, Ciara <[email protected]>; Zhang, Roy Fan <[email protected]>; Coyle, David <[email protected]>; Troy, Rebecca <[email protected]>; Akhil Goyal <[email protected]>; Doherty, Declan <[email protected]>
Subject: [PATCH v2] test/crypto: refactor DOCSIS to show hidden casesIn the current implementation, the DOCSIS test cases are running and being reported as one test, despite the fact that multiple test cases are hidden inside i.e. "
test_DOCSIS_PROTO_all" runs
52 test cases. Each DOCSIS test case should be reported individually instead.
Quoted 6 lines
This commit achieves this by removing the use of the
test_DOCSIS_PROTO_allfunction and statically listing the test cases to run when building the test suite, which are then reported to the user by description.Signed-off-by Rebecca Troy <[email protected]>
Re: [dpdk-dev] [PATCH v2] test/crypto: refactor DOCSIS to show hidden cases
Quoted 6 lines
Quoted 6 lines
In the current implementation, the DOCSIS test cases are running and being reported as one test, despite the fact that multiple test cases are hidden inside i.e. "
test_DOCSIS_PROTO_all" runs
52 test cases. Each DOCSIS test case should be reported individually instead.This commit achieves this by removing the use of the
Quoted 8 lines
test_DOCSIS_PROTO_allQuoted 1 line
function and statically listing the test cases to run when building the test
suite,
Quoted 4 lines
which are then reported to the user by description.
Signed-off-by Rebecca Troy <[email protected]>Acked-by Ciara Power <[email protected]>
Applied to dpdk-next-crypto
Thanks.
Re: [dpdk-dev] [PATCH v2] test/crypto: refactor DOCSIS to show hidden cases
In reply to Rebecca TroyQuoted 16 lines
-----Original Message-----
From: Troy, Rebecca <[email protected]>
Sent: Friday, October 29, 2021 10:04 AM
To: [email protected]
Cc: Power, Ciara <[email protected]>; Zhang, Roy Fan <[email protected]>; Coyle, David <[email protected]>; Troy, Rebecca <[email protected]>; Akhil Goyal <[email protected]>; Doherty, Declan <[email protected]>
Subject: [PATCH v2] test/crypto: refactor DOCSIS to show hidden casesIn the current implementation, the DOCSIS test cases are running and being reported as one test, despite the fact that multiple test cases are hidden inside i.e. "
test_DOCSIS_PROTO_all" runs
52 test cases. Each DOCSIS test case should be reported individually instead.
Quoted 7 lines
This commit achieves this by removing the use of the
test_DOCSIS_PROTO_allfunction and statically listing the test cases to run when building the test suite, which are then reported to the user by description.Signed-off-by Rebecca Troy <[email protected]>
Looks good Rebecca