aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/instance/execprog.go
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2025-08-21 11:35:15 +0200
committerTaras Madan <tarasmadan@google.com>2025-08-28 11:36:44 +0000
commit6c8b90a1abc330c4e05307ddb268b084a02cd2a3 (patch)
tree0aeeab06948096b0a8b6c60495e3a4dba4291258 /pkg/instance/execprog.go
parent443c11c765c0bf86d91595bf5edd50af4476fdc6 (diff)
vm: extract all the crashes from the log
Diffstat (limited to 'pkg/instance/execprog.go')
-rw-r--r--pkg/instance/execprog.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/instance/execprog.go b/pkg/instance/execprog.go
index 0b9f9ebf7..7c97819f4 100644
--- a/pkg/instance/execprog.go
+++ b/pkg/instance/execprog.go
@@ -126,10 +126,14 @@ func (inst *ExecProgInstance) runCommand(command string, duration time.Duration,
}
ctxTimeout, cancel := context.WithTimeout(context.Background(), duration)
defer cancel()
- output, rep, err := inst.VMInstance.Run(ctxTimeout, inst.reporter, command,
+ output, reps, err := inst.VMInstance.Run(ctxTimeout, inst.reporter, command,
vm.WithExitCondition(exitCondition),
optionalBeforeContext,
)
+ var rep *report.Report
+ if len(reps) > 0 {
+ rep = reps[0]
+ }
if err != nil {
return nil, fmt.Errorf("failed to run command in VM: %w", err)
}