tests, Fix test 1780 of vmi_networking_test.go
In case traceroute command fails, the test doesnt
detect it, because it depend only on the stdout
of the command.
Add validation that the command succeeded.
Found by injecting an error, which caused
the command to fail, without the test detecting it.
@@ -904,6 +904,8 @@ func createExpectTraceroute6(address string) []expect.Batcher {
&expect.BExp{R: "\\$ "},
&expect.BSnd{S: "traceroute -6 " + address + " -w1 > tr\n"},
&expect.BExp{R: "\\$ "},
+ &expect.BSnd{S: "echo $?\n"},
+ &expect.BExp{R: tests.RetValue("0", "\\$ ")},
&expect.BSnd{S: "cat tr | grep -q \"*\\|!\"\n"},
&expect.BExp{R: "\\$ "},
&expect.BSnd{S: "echo $?\n"},
