From 17952c495380e128ea418bf4955fa1ed8f6ef994 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Tue, 1 Oct 2019 13:49:20 +0200 Subject: tests: Let shell resolve the absolute path to binaries in Exec tests Signed-off-by: Jakub Jelen Reviewed-by: Andreas Schneider Reviewed-by: Anderson Toshiyuki Sasaki --- tests/unittests/torture_config.c | 6 +++--- tests/unittests/torture_options.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/unittests/torture_config.c b/tests/unittests/torture_config.c index 7efa32db..a2de4a6d 100644 --- a/tests/unittests/torture_config.c +++ b/tests/unittests/torture_config.c @@ -548,7 +548,7 @@ static void torture_config_match(void **state) assert_string_equal(session->opts.host, "otherhost"); torture_write_file(LIBSSH_TESTCONFIG10, - "Match exec /bin/true\n" + "Match exec true\n" "\tHostName execed-true.com\n" ""); torture_reset_config(session); @@ -562,7 +562,7 @@ static void torture_config_match(void **state) #endif torture_write_file(LIBSSH_TESTCONFIG10, - "Match !exec /bin/false\n" + "Match !exec false\n" "\tHostName execed-false.com\n" ""); torture_reset_config(session); @@ -576,7 +576,7 @@ static void torture_config_match(void **state) #endif torture_write_file(LIBSSH_TESTCONFIG10, - "Match exec \"test -f /bin/true\"\n" + "Match exec \"test 1 -eq 1\"\n" "\tHostName execed-arguments.com\n" ""); torture_reset_config(session); diff --git a/tests/unittests/torture_options.c b/tests/unittests/torture_options.c index e698874f..63fa63d2 100644 --- a/tests/unittests/torture_options.c +++ b/tests/unittests/torture_options.c @@ -693,7 +693,7 @@ static void torture_options_config_match(void **state) torture_reset_config(session); config = fopen("test_config", "w"); assert_non_null(config); - fputs("Match exec /bin/true\n" + fputs("Match exec true\n" "\tPort 33\n" "Match all\n" "\tPort 34\n", @@ -715,7 +715,7 @@ static void torture_options_config_match(void **state) torture_reset_config(session); config = fopen("test_config", "w"); assert_non_null(config); - fputs("Match exec \"/bin/true 1\"\n" + fputs("Match exec \"true 1\"\n" "\tPort 33\n" "Match all\n" "\tPort 34\n", -- cgit v1.2.3