diff mbox

test: add termination path for l2fwd

Message ID 1468857004-13091-1-git-send-email-maxim.uvarov@linaro.org
State Accepted
Commit 6c6087bc5bc718bd8fb7e773b9206a4b2f7672d4
Headers show

Commit Message

Maxim Uvarov July 18, 2016, 3:50 p.m. UTC
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

---
 test/performance/odp_l2fwd.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

-- 
2.7.1.250.gff4ea60

Comments

Mike Holmes July 18, 2016, 5:23 p.m. UTC | #1
On 18 July 2016 at 11:50, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

>


Reviewed-by: Mike Holmes <mike.holmes@linaro.org>



> ---

>  test/performance/odp_l2fwd.c | 17 ++++++++++++++++-

>  1 file changed, 16 insertions(+), 1 deletion(-)

>

> diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c

> index f4947ca..f05aa30 100644

> --- a/test/performance/odp_l2fwd.c

> +++ b/test/performance/odp_l2fwd.c

> @@ -1481,7 +1481,22 @@ int main(int argc, char *argv[])

>

>         free(gbl_args->appl.if_names);

>         free(gbl_args->appl.if_str);

> -       printf("Exit\n\n");

>

> +       if (odp_pool_destroy(pool)) {

> +               LOG_ERR("Error: pool destroy\n");

> +               exit(EXIT_FAILURE);

> +       }

> +

> +       if (odp_term_local()) {

> +               LOG_ERR("Error: term local\n");

> +               exit(EXIT_FAILURE);

> +       }

> +

> +       if (odp_term_global(instance)) {

> +               LOG_ERR("Error: term global\n");

> +               exit(EXIT_FAILURE);

> +       }

> +

> +       printf("Exit %d\n\n", ret);

>         return ret;

>  }

> --

> 2.7.1.250.gff4ea60

>

>



-- 
Mike Holmes
Technical 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 mbox

Patch

diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c
index f4947ca..f05aa30 100644
--- a/test/performance/odp_l2fwd.c
+++ b/test/performance/odp_l2fwd.c
@@ -1481,7 +1481,22 @@  int main(int argc, char *argv[])
 
 	free(gbl_args->appl.if_names);
 	free(gbl_args->appl.if_str);
-	printf("Exit\n\n");
 
+	if (odp_pool_destroy(pool)) {
+		LOG_ERR("Error: pool destroy\n");
+		exit(EXIT_FAILURE);
+	}
+
+	if (odp_term_local()) {
+		LOG_ERR("Error: term local\n");
+		exit(EXIT_FAILURE);
+	}
+
+	if (odp_term_global(instance)) {
+		LOG_ERR("Error: term global\n");
+		exit(EXIT_FAILURE);
+	}
+
+	printf("Exit %d\n\n", ret);
 	return ret;
 }