tests: set errno to 0 before running each test case
authorBartosz Golaszewski <bartekgola@gmail.com>
Mon, 16 Oct 2017 15:55:55 +0000 (17:55 +0200)
committerBartosz Golaszewski <bartekgola@gmail.com>
Mon, 16 Oct 2017 15:55:55 +0000 (17:55 +0200)
Just to make sure we start with a clean environment, set errno
to 0 before running the test callback.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
tests/gpiod-test.c

index d06276ea0d3c4a38aad5d5d7ea6f3f0376e62727..4b2645549b895cb28238ea25f06c19d7232f5484 100644 (file)
@@ -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);