tests: rename test_gpiotool_run()
authorBartosz Golaszewski <bartekgola@gmail.com>
Mon, 12 Jun 2017 10:52:53 +0000 (12:52 +0200)
committerBartosz Golaszewski <bartekgola@gmail.com>
Mon, 12 Jun 2017 10:52:53 +0000 (12:52 +0200)
Use the same prefix for all functions for tools testing.

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

index 10edd2b990109c3544fd9be976c1f274fa738acd..328219440f54ae9575559c2a5fd9845d8eb24884 100644 (file)
@@ -435,7 +435,7 @@ void test_tool_signal(int signum)
                die_perr("unable to send signal to process %d", proc->pid);
 }
 
-void test_gpiotool_run(char *tool, ...)
+void test_tool_run(char *tool, ...)
 {
        int in_fds[2], out_fds[2], err_fds[2], status;
        struct gpiotool_proc *proc;
index 5c88ad0db342b6d3cfa0d7cc19a308441062636f..4ba89ed32e25138831909ea866fd30d9e1c28a10 100644 (file)
@@ -103,7 +103,7 @@ enum {
 void test_set_event(unsigned int chip_index, unsigned int line_offset,
                    int event_type, unsigned int freq);
 
-void test_gpiotool_run(char *tool, ...);
+void test_tool_run(char *tool, ...);
 void test_tool_wait(void);
 const char * test_tool_stdout(void);
 const char * test_tool_stderr(void);
index 8385beb002a4b42df0f2762b48d754c1fd254f41..dc917770988fbb7a2dab577558a157b11b1d12a9 100644 (file)
@@ -30,7 +30,7 @@ static void gpiodetect_simple(void)
        TEST_ASSERT(ret1 > 0);
        TEST_ASSERT(ret2 > 0);
 
-       test_gpiotool_run("gpiodetect", (char *)NULL);
+       test_tool_run("gpiodetect", (char *)NULL);
        test_tool_wait();
 
        TEST_ASSERT(test_tool_exited());
@@ -47,7 +47,7 @@ TEST_DEFINE(gpiodetect_simple,
 
 static void gpiodetect_invalid_args(void)
 {
-       test_gpiotool_run("gpiodetect", "unused argument", (char *)NULL);
+       test_tool_run("gpiodetect", "unused argument", (char *)NULL);
        test_tool_wait();
 
        TEST_ASSERT(test_tool_exited());
index 6f57f1def606bf7736102b6c3423e75cdacfdc83..2ac3e9ce7e5b5d3565c79aab996bc0072ea7f6fd 100644 (file)
@@ -20,7 +20,7 @@ static void gpiofind_found(void)
        rv = asprintf(&output, "%s 7\n", test_chip_name(1));
        TEST_ASSERT(rv > 0);
 
-       test_gpiotool_run("gpiofind", "gpio-mockup-B-7", (char *)NULL);
+       test_tool_run("gpiofind", "gpio-mockup-B-7", (char *)NULL);
        test_tool_wait();
 
        TEST_ASSERT(test_tool_exited());
@@ -35,7 +35,7 @@ TEST_DEFINE(gpiofind_found,
 
 static void gpiofind_not_found(void)
 {
-       test_gpiotool_run("gpiofind", "nonexistent", (char *)NULL);
+       test_tool_run("gpiofind", "nonexistent", (char *)NULL);
        test_tool_wait();
 
        TEST_ASSERT(test_tool_exited());
@@ -49,7 +49,7 @@ TEST_DEFINE(gpiofind_not_found,
 
 static void gpiofind_invalid_args(void)
 {
-       test_gpiotool_run("gpiofind", (char *)NULL);
+       test_tool_run("gpiofind", (char *)NULL);
        test_tool_wait();
 
        TEST_ASSERT(test_tool_exited());
@@ -59,7 +59,7 @@ static void gpiofind_invalid_args(void)
        TEST_ASSERT_STR_CONTAINS(test_tool_stderr(),
                                 "exactly one GPIO line name must be specified");
 
-       test_gpiotool_run("gpiofind", "first argument",
+       test_tool_run("gpiofind", "first argument",
                          "second argument", (char *)NULL);
        test_tool_wait();
 
index ff4a509e563dcc15c602d5a6abf06043532abc4e..ca71b9a90fe2aa87967bb2de5b2004202d18c226 100644 (file)
@@ -14,7 +14,7 @@
 
 static void gpioinfo_simple(void)
 {
-       test_gpiotool_run("gpioinfo", (char *)NULL);
+       test_tool_run("gpioinfo", (char *)NULL);
        test_tool_wait();
 
        TEST_ASSERT(test_tool_exited());
@@ -52,7 +52,7 @@ static void gpioinfo_one_exported(void)
        rv = gpiod_line_request_input(line, TEST_CONSUMER, true);
        TEST_ASSERT_RET_OK(rv);
 
-       test_gpiotool_run("gpioinfo", (char *)NULL);
+       test_tool_run("gpioinfo", (char *)NULL);
        test_tool_wait();
 
        TEST_ASSERT(test_tool_exited());