aboutsummaryrefslogtreecommitdiff
path: root/tests/unittests
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2019-10-01 13:49:20 +0200
committerJakub Jelen <jjelen@redhat.com>2019-10-25 13:23:14 +0200
commit17952c495380e128ea418bf4955fa1ed8f6ef994 (patch)
tree45327b30ae17b506527a8df48c9b85af78e5db96 /tests/unittests
parentfe18ef279881b65434e3e44fc4743e4b1c7cb891 (diff)
downloadlibssh-17952c495380e128ea418bf4955fa1ed8f6ef994.tar.gz
libssh-17952c495380e128ea418bf4955fa1ed8f6ef994.tar.xz
libssh-17952c495380e128ea418bf4955fa1ed8f6ef994.zip
tests: Let shell resolve the absolute path to binaries in Exec tests
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Diffstat (limited to 'tests/unittests')
-rw-r--r--tests/unittests/torture_config.c6
-rw-r--r--tests/unittests/torture_options.c4
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",