tests: re-enable a test case for gpiomon
authorBartosz Golaszewski <bartekgola@gmail.com>
Sat, 12 Aug 2017 19:46:13 +0000 (21:46 +0200)
committerBartosz Golaszewski <bartekgola@gmail.com>
Sat, 12 Aug 2017 19:46:13 +0000 (21:46 +0200)
The test case in which we verify if falling-edge events are correctly
ignored was failing due to a bug in the kernel. This has now been
fixed with commit df1e76f28ffe ("gpiolib: skip unwanted events, don't
convert them to opposite edge") and released in linux v4.12.6.

Re-enable the test and make this version a hard requirement for
running the test suite.

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

index 84317b0f589e0cc474a542b0c2fe8f867c18c83c..944c3f079f7310917c935831252659a1d4faabec 100644 (file)
@@ -36,8 +36,8 @@
 static const char mockup_devpath[] = "/devices/platform/gpio-mockup/gpiochip";
 
 static const unsigned int min_kern_major = 4;
-static const unsigned int min_kern_minor = 11;
-static const unsigned int min_kern_release = 0;
+static const unsigned int min_kern_minor = 12;
+static const unsigned int min_kern_release = 6;
 
 struct mockup_chip {
        char *path;
index 9d9b406e123fedfc4604d127685c86a3c5acb110..1a59f04cb6336c1961c2d2c2f02f2e44b9b32e3d 100644 (file)
@@ -129,11 +129,6 @@ TEST_DEFINE(gpiomon_both_events_sigterm,
            "tools: gpiomon - receive both types of events and kill with SIGTERM",
            0, { 8, 8 });
 
-/*
- * TODO There's a bug in the kernel with filtering out unwanted events. Until
- * it gets fixed, we must skip this test case.
- */
-#if 0
 static void gpiomon_ignore_falling_edge(void)
 {
        test_tool_run("gpiomon", "--rising-edge",
@@ -151,7 +146,6 @@ static void gpiomon_ignore_falling_edge(void)
 TEST_DEFINE(gpiomon_ignore_falling_edge,
            "tools: gpiomon - wait for rising edge events, ignore falling edge",
            0, { 8, 8 });
-#endif
 
 static void gpiomon_watch_multiple_lines(void)
 {