tests: line: fix the misc flags test case
authorBartosz Golaszewski <bartekgola@gmail.com>
Sun, 15 Oct 2017 19:01:44 +0000 (21:01 +0200)
committerBartosz Golaszewski <bartekgola@gmail.com>
Sun, 15 Oct 2017 19:01:44 +0000 (21:01 +0200)
Setting the open-drain or open-source flags for input doesn't make any
sense as these flags are only valid for output mode. This should
actually be checked in the kernel. For now fix the test case.

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

index 7d4e3e1d206b6183a2751f15e1467c6bbfdc89c7..0aaeb98f4ea5274ec9abd28ef5d2504b37b7378e 100644 (file)
@@ -402,7 +402,7 @@ static void line_misc_flags(void)
        TEST_ASSERT_FALSE(gpiod_line_is_open_drain(line));
        TEST_ASSERT_FALSE(gpiod_line_is_open_source(line));
 
-       config.request_type = GPIOD_LINE_REQUEST_DIRECTION_INPUT;
+       config.request_type = GPIOD_LINE_REQUEST_DIRECTION_OUTPUT;
        config.consumer = TEST_CONSUMER;
        config.flags = GPIOD_LINE_REQUEST_OPEN_DRAIN;