[dpdk-dev] [PATCH v2] test: fix incorrect return types
Pattan, Reshma
reshma.pattan at intel.com
Tue Jul 17 15:51:08 CEST 2018
Hi,
> -----Original Message-----
> From: Burakov, Anatoly
> Sent: Tuesday, July 17, 2018 1:58 PM
> To: Pattan, Reshma <reshma.pattan at intel.com>; dev at dpdk.org
> Cc: Singh, Jasvinder <jasvinder.singh at intel.com>; Iremonger, Bernard
> <bernard.iremonger at intel.com>; stable at dpdk.org
> Subject: Re: [PATCH v2] test: fix incorrect return types
>
>
> > @@ -871,32 +871,32 @@ test_flow_classify(void)
> > printf("Line %i: f_create has failed!\n", __LINE__);
> > rte_flow_classifier_free(cls->cls);
> > rte_free(cls);
> > - return -1;
> > + return TEST_FAILED;
> > }
> > printf("Created table_acl for for IPv4 five tuple packets\n");
> >
> > ret = init_mbufpool();
> > if (ret) {
> > printf("Line %i: init_mbufpool has failed!\n", __LINE__);
> > - return -1;
> > + return TEST_FAILED;
> > }
> >
> > if (test_invalid_parameters() < 0)
> > - return -1;
> > + return TEST_FAILED;
> > if (test_valid_parameters() < 0)
> > - return -1;
> > + return TEST_FAILED;
> > if (test_invalid_patterns() < 0)
> > - return -1;
> > + return TEST_FAILED;
> > if (test_invalid_actions() < 0)
> > - return -1;
> > + return TEST_FAILED;
> > if (test_query_udp() < 0)
> > - return -1;
> > + return TEST_FAILED;
> > if (test_query_tcp() < 0)
> > - return -1;
> > + return TEST_FAILED;
> > if (test_query_sctp() < 0)
> > - return -1;
> > + return TEST_FAILED;
> >
> > - return 0;
> > + return TEST_SUCCESS;
> > }
> >
> > REGISTER_TEST_COMMAND(flow_classify_autotest, test_flow_classify);
> >
>
> I'm nitpicking now, but technically, we could've foregone large part of this
> patch and just kept the part above. We don't actually care if individual test
> functions return -1 or TEST_FAILED - we just need the return from test app to
> be that :)
>
Make sense. Will do the changes.
More information about the dev
mailing list