From cc6ce65aa02e1ee5c9657c137eb39e938e28f4e2 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Mon, 16 Oct 2017 17:55:55 +0200 Subject: [PATCH] tests: set errno to 0 before running each test case Just to make sure we start with a clean environment, set errno to 0 before running the test callback. Signed-off-by: Bartosz Golaszewski --- tests/gpiod-test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/gpiod-test.c b/tests/gpiod-test.c index d06276e..4b26455 100644 --- a/tests/gpiod-test.c +++ b/tests/gpiod-test.c @@ -904,6 +904,8 @@ static void prepare_test(struct _test_chip_descr *descr) static void run_test(struct _test_case *test) { + errno = 0; + print_header("TEST", CYELLOW); pr_raw("'%s': ", test->name); -- 2.30.2