tests: fix a dmesg error message from gpio-mockup
authorBartosz Golaszewski <bartekgola@gmail.com>
Mon, 8 May 2017 14:36:53 +0000 (16:36 +0200)
committerBartosz Golaszewski <bartekgola@gmail.com>
Mon, 8 May 2017 14:36:53 +0000 (16:36 +0200)
When checking if we can load gpio-mockup, we don't pass the
gpio_mockup_ranges argument to the module. This makes probe() fail
and causes an error message to be emitted.

Pass a correct argument to gpio-mockup so that a dummy GPIO chip gets
created and no errors are displayed.

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

index f6a0b2ac6a7c60f64b6b3fb71ec5eac8906e94b7..100e8ca61f9e2b298ba4cacfe5638ab1f66a3517 100644 (file)
@@ -357,7 +357,8 @@ static void check_gpio_mockup(void)
 
        /* Then see if we can freely load and unload it. */
        status = kmod_module_probe_insert_module(globals.module, 0,
-                                                NULL, NULL, NULL, NULL);
+                                                "gpio_mockup_ranges=-1,4",
+                                                NULL, NULL, NULL);
        if (status)
                die_perr("unable to load gpio-mockup");