From: Bartosz Golaszewski Date: Mon, 12 Jun 2017 10:52:53 +0000 (+0200) Subject: tests: rename test_gpiotool_run() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2ca7e8d6168fa9fadb8620f797758cecdd2ba0fe;p=qemu-gpiodev%2Flibgpiod.git tests: rename test_gpiotool_run() Use the same prefix for all functions for tools testing. Signed-off-by: Bartosz Golaszewski --- diff --git a/tests/gpiod-test.c b/tests/gpiod-test.c index 10edd2b..3282194 100644 --- a/tests/gpiod-test.c +++ b/tests/gpiod-test.c @@ -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; diff --git a/tests/gpiod-test.h b/tests/gpiod-test.h index 5c88ad0..4ba89ed 100644 --- a/tests/gpiod-test.h +++ b/tests/gpiod-test.h @@ -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); diff --git a/tests/tests-gpiodetect.c b/tests/tests-gpiodetect.c index 8385beb..dc91777 100644 --- a/tests/tests-gpiodetect.c +++ b/tests/tests-gpiodetect.c @@ -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()); diff --git a/tests/tests-gpiofind.c b/tests/tests-gpiofind.c index 6f57f1d..2ac3e9c 100644 --- a/tests/tests-gpiofind.c +++ b/tests/tests-gpiofind.c @@ -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(); diff --git a/tests/tests-gpioinfo.c b/tests/tests-gpioinfo.c index ff4a509..ca71b9a 100644 --- a/tests/tests-gpioinfo.c +++ b/tests/tests-gpioinfo.c @@ -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());