Message ID | 1474638259-3431-1-git-send-email-maxim.uvarov@linaro.org |
---|---|
State | Superseded |
Headers | show |
please review. Maxim. On 09/23/16 16:44, Maxim Uvarov wrote: > Make check should skip the test instead of failing it. > > Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> > --- > test/common_plat/performance/odp_pktio_perf.c | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/test/common_plat/performance/odp_pktio_perf.c b/test/common_plat/performance/odp_pktio_perf.c > index f041b13..846dfaa 100644 > --- a/test/common_plat/performance/odp_pktio_perf.c > +++ b/test/common_plat/performance/odp_pktio_perf.c > @@ -34,6 +34,8 @@ > #include <inttypes.h> > #include <test_debug.h> > > +#define TEST_SKIP 77 > + > #define PKT_BUF_NUM 8192 > #define MAX_NUM_IFACES 2 > #define TEST_HDR_MAGIC 0x92749451 > @@ -558,7 +560,7 @@ static int setup_txrx_masks(odp_cpumask_t *thd_mask_tx, > gbl_args->args.cpu_count); > if (num_workers < 2) { > LOG_ERR("Need at least two cores\n"); > - return -1; > + return TEST_SKIP; > } > > if (gbl_args->args.num_tx_workers) { > @@ -669,8 +671,9 @@ static int run_test(void) > .warmup = 1, > }; > > - if (setup_txrx_masks(&txmask, &rxmask) != 0) > - return -1; > + ret = setup_txrx_masks(&txmask, &rxmask); > + if (ret) > + return ret; > > printf("Starting test with params:\n"); > printf("\tTransmit workers: \t%d\n", odp_cpumask_count(&txmask)); > @@ -691,8 +694,11 @@ static int run_test(void) > run_test_single(&txmask, &rxmask, &status); > status.warmup = 0; > > - while (ret > 0) > + while (1) { > ret = run_test_single(&txmask, &rxmask, &status); > + if (ret) > + break; > + } > > return ret; > }
On 23 September 2016 at 09:44, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: > Make check should skip the test instead of failing it. > The description needs to elaborate on what case this fixes, i.e. what was failing and why it was wrong > > Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> > --- > test/common_plat/performance/odp_pktio_perf.c | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/test/common_plat/performance/odp_pktio_perf.c > b/test/common_plat/performance/odp_pktio_perf.c > index f041b13..846dfaa 100644 > --- a/test/common_plat/performance/odp_pktio_perf.c > +++ b/test/common_plat/performance/odp_pktio_perf.c > @@ -34,6 +34,8 @@ > #include <inttypes.h> > #include <test_debug.h> > > +#define TEST_SKIP 77 + > #define PKT_BUF_NUM 8192 > #define MAX_NUM_IFACES 2 > #define TEST_HDR_MAGIC 0x92749451 > @@ -558,7 +560,7 @@ static int setup_txrx_masks(odp_cpumask_t *thd_mask_tx, > gbl_args->args.cpu_count); > if (num_workers < 2) { > LOG_ERR("Need at least two cores\n"); > - return -1; > + return TEST_SKIP; > } > > if (gbl_args->args.num_tx_workers) { > @@ -669,8 +671,9 @@ static int run_test(void) > .warmup = 1, > }; > > - if (setup_txrx_masks(&txmask, &rxmask) != 0) > - return -1; > + ret = setup_txrx_masks(&txmask, &rxmask); > + if (ret) > + return ret; > > printf("Starting test with params:\n"); > printf("\tTransmit workers: \t%d\n", > odp_cpumask_count(&txmask)); > @@ -691,8 +694,11 @@ static int run_test(void) > run_test_single(&txmask, &rxmask, &status); > status.warmup = 0; > > - while (ret > 0) > + while (1) { > ret = run_test_single(&txmask, &rxmask, &status); > + if (ret) > + break; > + } > > return ret; > } > -- > 2.7.4 > > -- Mike Holmes Program Manager - Linaro Networking Group Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs "Work should be fun and collaborative, the rest follows"
diff --git a/test/common_plat/performance/odp_pktio_perf.c b/test/common_plat/performance/odp_pktio_perf.c index f041b13..846dfaa 100644 --- a/test/common_plat/performance/odp_pktio_perf.c +++ b/test/common_plat/performance/odp_pktio_perf.c @@ -34,6 +34,8 @@ #include <inttypes.h> #include <test_debug.h> +#define TEST_SKIP 77 + #define PKT_BUF_NUM 8192 #define MAX_NUM_IFACES 2 #define TEST_HDR_MAGIC 0x92749451 @@ -558,7 +560,7 @@ static int setup_txrx_masks(odp_cpumask_t *thd_mask_tx, gbl_args->args.cpu_count); if (num_workers < 2) { LOG_ERR("Need at least two cores\n"); - return -1; + return TEST_SKIP; } if (gbl_args->args.num_tx_workers) { @@ -669,8 +671,9 @@ static int run_test(void) .warmup = 1, }; - if (setup_txrx_masks(&txmask, &rxmask) != 0) - return -1; + ret = setup_txrx_masks(&txmask, &rxmask); + if (ret) + return ret; printf("Starting test with params:\n"); printf("\tTransmit workers: \t%d\n", odp_cpumask_count(&txmask)); @@ -691,8 +694,11 @@ static int run_test(void) run_test_single(&txmask, &rxmask, &status); status.warmup = 0; - while (ret > 0) + while (1) { ret = run_test_single(&txmask, &rxmask, &status); + if (ret) + break; + } return ret; }
Make check should skip the test instead of failing it. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> --- test/common_plat/performance/odp_pktio_perf.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) -- 2.7.4