summaryrefslogtreecommitdiffhomepage
path: root/test/packetimpact/runner/packetimpact_test.go
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@google.com>2020-08-28 16:43:24 -0700
committergVisor bot <gvisor-bot@google.com>2020-08-28 16:45:18 -0700
commitd3057717dcb7b6777aa4c20cac69babc7b545b5d (patch)
tree2d84a66ebfa8975a4072f61274ac6d59bcfd7802 /test/packetimpact/runner/packetimpact_test.go
parentd5787f628c40624db4d9d2a970f7e672bb006852 (diff)
Include command output on error
Currently the logs produce TestOne: packetimpact_test.go:182: listing devices on ... container: process terminated with status: 126 which is not actionable; presumably the `ip` command output is interesting. PiperOrigin-RevId: 329032105
Diffstat (limited to 'test/packetimpact/runner/packetimpact_test.go')
-rw-r--r--test/packetimpact/runner/packetimpact_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/packetimpact/runner/packetimpact_test.go b/test/packetimpact/runner/packetimpact_test.go
index e8c183977..cb9bfd5b7 100644
--- a/test/packetimpact/runner/packetimpact_test.go
+++ b/test/packetimpact/runner/packetimpact_test.go
@@ -369,11 +369,11 @@ func createDockerNetwork(ctx context.Context, n *dockerutil.Network) error {
func deviceByIP(ctx context.Context, d *dockerutil.Container, ip net.IP) (string, netdevs.DeviceInfo, error) {
out, err := d.Exec(ctx, dockerutil.ExecOpts{}, "ip", "addr", "show")
if err != nil {
- return "", netdevs.DeviceInfo{}, fmt.Errorf("listing devices on %s container: %w", d.Name, err)
+ return "", netdevs.DeviceInfo{}, fmt.Errorf("listing devices on %s container: %w\n%s", d.Name, err, out)
}
devs, err := netdevs.ParseDevices(out)
if err != nil {
- return "", netdevs.DeviceInfo{}, fmt.Errorf("parsing devices from %s container: %w", d.Name, err)
+ return "", netdevs.DeviceInfo{}, fmt.Errorf("parsing devices from %s container: %w\n%s", d.Name, err, out)
}
testDevice, deviceInfo, err := netdevs.FindDeviceByIP(ip, devs)
if err != nil {