mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
tests: Fix virnetsockettest after SSH command line changes
Commit e4cb850081
changed the way ssh command line is created by
adding '--' before the hostname in order to fix a potential security
flaw. However it failed to modify the tests, so let's do that.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
b39464ba26
commit
21864e28ad
@ -491,7 +491,7 @@ mymain(void)
|
|||||||
struct testSSHData sshData1 = {
|
struct testSSHData sshData1 = {
|
||||||
.nodename = "somehost",
|
.nodename = "somehost",
|
||||||
.path = "/tmp/socket",
|
.path = "/tmp/socket",
|
||||||
.expectOut = "somehost sh -c 'if 'nc' -q 2>&1 | grep \"requires an argument\" >/dev/null 2>&1; then "
|
.expectOut = "-- somehost sh -c 'if 'nc' -q 2>&1 | grep \"requires an argument\" >/dev/null 2>&1; then "
|
||||||
"ARG=-q0;"
|
"ARG=-q0;"
|
||||||
"else "
|
"else "
|
||||||
"ARG=;"
|
"ARG=;"
|
||||||
@ -509,7 +509,7 @@ mymain(void)
|
|||||||
.noTTY = true,
|
.noTTY = true,
|
||||||
.noVerify = false,
|
.noVerify = false,
|
||||||
.path = "/tmp/socket",
|
.path = "/tmp/socket",
|
||||||
.expectOut = "-p 9000 -l fred -T -o BatchMode=yes -e none somehost sh -c '"
|
.expectOut = "-p 9000 -l fred -T -o BatchMode=yes -e none -- somehost sh -c '"
|
||||||
"if 'netcat' -q 2>&1 | grep \"requires an argument\" >/dev/null 2>&1; then "
|
"if 'netcat' -q 2>&1 | grep \"requires an argument\" >/dev/null 2>&1; then "
|
||||||
"ARG=-q0;"
|
"ARG=-q0;"
|
||||||
"else "
|
"else "
|
||||||
@ -528,7 +528,7 @@ mymain(void)
|
|||||||
.noTTY = false,
|
.noTTY = false,
|
||||||
.noVerify = true,
|
.noVerify = true,
|
||||||
.path = "/tmp/socket",
|
.path = "/tmp/socket",
|
||||||
.expectOut = "-p 9000 -l fred -o StrictHostKeyChecking=no somehost sh -c '"
|
.expectOut = "-p 9000 -l fred -o StrictHostKeyChecking=no -- somehost sh -c '"
|
||||||
"if 'netcat' -q 2>&1 | grep \"requires an argument\" >/dev/null 2>&1; then "
|
"if 'netcat' -q 2>&1 | grep \"requires an argument\" >/dev/null 2>&1; then "
|
||||||
"ARG=-q0;"
|
"ARG=-q0;"
|
||||||
"else "
|
"else "
|
||||||
@ -550,7 +550,7 @@ mymain(void)
|
|||||||
struct testSSHData sshData5 = {
|
struct testSSHData sshData5 = {
|
||||||
.nodename = "crashyhost",
|
.nodename = "crashyhost",
|
||||||
.path = "/tmp/socket",
|
.path = "/tmp/socket",
|
||||||
.expectOut = "crashyhost sh -c "
|
.expectOut = "-- crashyhost sh -c "
|
||||||
"'if 'nc' -q 2>&1 | grep \"requires an argument\" >/dev/null 2>&1; then "
|
"'if 'nc' -q 2>&1 | grep \"requires an argument\" >/dev/null 2>&1; then "
|
||||||
"ARG=-q0;"
|
"ARG=-q0;"
|
||||||
"else "
|
"else "
|
||||||
@ -567,7 +567,7 @@ mymain(void)
|
|||||||
.path = "/tmp/socket",
|
.path = "/tmp/socket",
|
||||||
.keyfile = "/root/.ssh/example_key",
|
.keyfile = "/root/.ssh/example_key",
|
||||||
.noVerify = true,
|
.noVerify = true,
|
||||||
.expectOut = "-i /root/.ssh/example_key -o StrictHostKeyChecking=no example.com sh -c '"
|
.expectOut = "-i /root/.ssh/example_key -o StrictHostKeyChecking=no -- example.com sh -c '"
|
||||||
"if 'nc' -q 2>&1 | grep \"requires an argument\" >/dev/null 2>&1; then "
|
"if 'nc' -q 2>&1 | grep \"requires an argument\" >/dev/null 2>&1; then "
|
||||||
"ARG=-q0;"
|
"ARG=-q0;"
|
||||||
"else "
|
"else "
|
||||||
@ -582,7 +582,7 @@ mymain(void)
|
|||||||
.nodename = "somehost",
|
.nodename = "somehost",
|
||||||
.netcat = "nc -4",
|
.netcat = "nc -4",
|
||||||
.path = "/tmp/socket",
|
.path = "/tmp/socket",
|
||||||
.expectOut = "somehost sh -c 'if ''nc -4'' -q 2>&1 | grep \"requires an argument\" >/dev/null 2>&1; then "
|
.expectOut = "-- somehost sh -c 'if ''nc -4'' -q 2>&1 | grep \"requires an argument\" >/dev/null 2>&1; then "
|
||||||
"ARG=-q0;"
|
"ARG=-q0;"
|
||||||
"else "
|
"else "
|
||||||
"ARG=;"
|
"ARG=;"
|
||||||
|
Loading…
Reference in New Issue
Block a user