Use the same prefix for all functions for tools testing.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
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;
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);
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());
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());
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());
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());
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());
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();
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());
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());