From: Bartosz Golaszewski Date: Mon, 16 Oct 2017 15:55:55 +0000 (+0200) Subject: tests: set errno to 0 before running each test case X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=cc6ce65aa02e1ee5c9657c137eb39e938e28f4e2;p=qemu-gpiodev%2Flibgpiod.git 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 --- 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);