X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Ftest_acl.c;h=c6b511fb19a5b8419fa26e9289b38357a4acc3df;hb=dd0eedb1cfcf0cb7423d859177c5bc6f931eaf8a;hp=2b8279044a3421d11dba612806177d25f44298be;hpb=0b6fbe8749d260724c1e8c0e718d0afc2a0b7f65;p=dpdk.git diff --git a/app/test/test_acl.c b/app/test/test_acl.c index 2b8279044a..c6b511fb19 100644 --- a/app/test/test_acl.c +++ b/app/test/test_acl.c @@ -1357,19 +1357,6 @@ test_invalid_rules(void) goto err; } - rule.dst_mask_len = 0; - rule.src_mask_len = 0; - rule.data.userdata = 0; - - /* try adding this rule (it should fail because userdata is invalid) */ - ret = rte_acl_ipv4vlan_add_rules(acx, &rule, 1); - if (ret == 0) { - printf("Line %i: Adding a rule with invalid user data " - "should have failed!\n", __LINE__); - rte_acl_free(acx); - return -1; - } - rte_acl_free(acx); return 0; @@ -1515,26 +1502,6 @@ test_invalid_parameters(void) /* free ACL context */ rte_acl_free(acx); - /* set wrong rule_size so that adding any rules would fail */ - param.rule_size = RTE_ACL_IPV4VLAN_RULE_SZ + 4; - acx = rte_acl_create(¶m); - if (acx == NULL) { - printf("Line %i: ACL context creation failed!\n", __LINE__); - return -1; - } - - /* try adding a rule with size different from context rule_size */ - result = rte_acl_ipv4vlan_add_rules(acx, &rule, 1); - if (result == 0) { - printf("Line %i: Adding an invalid sized rule " - "should have failed!\n", __LINE__); - rte_acl_free(acx); - return -1; - } - - /* free ACL context */ - rte_acl_free(acx); - /** * rte_acl_ipv4vlan_build @@ -1682,8 +1649,4 @@ test_acl(void) return 0; } -static struct test_command acl_cmd = { - .command = "acl_autotest", - .callback = test_acl, -}; -REGISTER_TEST_COMMAND(acl_cmd); +REGISTER_TEST_COMMAND(acl_autotest, test_acl);