exec: improve error message on exec errors
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>v0.9
parent
460ba750fd
commit
a27d7c3d81
|
@ -677,7 +677,7 @@ func testSecurityModeSysfs(t *testing.T, sb integration.Sandbox) {
|
||||||
|
|
||||||
if secMode == securitySandbox {
|
if secMode == securitySandbox {
|
||||||
require.Error(t, err)
|
require.Error(t, err)
|
||||||
require.Contains(t, err.Error(), "executor failed running")
|
require.Contains(t, err.Error(), "did not complete successfully")
|
||||||
require.Contains(t, err.Error(), "mkdir /sys/fs/cgroup/cpuset/securitytest")
|
require.Contains(t, err.Error(), "mkdir /sys/fs/cgroup/cpuset/securitytest")
|
||||||
} else {
|
} else {
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
@ -3190,7 +3190,7 @@ func testReadonlyRootFS(t *testing.T, sb integration.Sandbox) {
|
||||||
// Would prefer to detect more specifically "Read-only file
|
// Would prefer to detect more specifically "Read-only file
|
||||||
// system" but that isn't exposed here (it is on the stdio
|
// system" but that isn't exposed here (it is on the stdio
|
||||||
// which we don't see).
|
// which we don't see).
|
||||||
require.Contains(t, err.Error(), "executor failed running [/bin/touch /foo]:")
|
require.Contains(t, err.Error(), "process \"/bin/touch /foo\" did not complete successfully")
|
||||||
|
|
||||||
checkAllReleasable(t, c, sb, true)
|
checkAllReleasable(t, c, sb, true)
|
||||||
}
|
}
|
||||||
|
|
|
@ -2149,7 +2149,7 @@ func testDockerfileInvalidCommand(t *testing.T, sb integration.Sandbox) {
|
||||||
err = cmd.Run()
|
err = cmd.Run()
|
||||||
require.Error(t, err)
|
require.Error(t, err)
|
||||||
require.Contains(t, stdout.String(), "/bin/sh -c invalidcmd")
|
require.Contains(t, stdout.String(), "/bin/sh -c invalidcmd")
|
||||||
require.Contains(t, stdout.String(), "executor failed running")
|
require.Contains(t, stdout.String(), "did not complete successfully")
|
||||||
}
|
}
|
||||||
|
|
||||||
func testDockerfileADDFromURL(t *testing.T, sb integration.Sandbox) {
|
func testDockerfileADDFromURL(t *testing.T, sb integration.Sandbox) {
|
||||||
|
|
|
@ -354,7 +354,7 @@ func (e *execOp) Exec(ctx context.Context, g session.Group, inputs []solver.Resu
|
||||||
// Prevent the result from being released.
|
// Prevent the result from being released.
|
||||||
p.OutputRefs[i].Ref = nil
|
p.OutputRefs[i].Ref = nil
|
||||||
}
|
}
|
||||||
return results, errors.Wrapf(execErr, "executor failed running %v", e.op.Meta.Args)
|
return results, errors.Wrapf(execErr, "process %q did not complete successfully", strings.Join(e.op.Meta.Args, " "))
|
||||||
}
|
}
|
||||||
|
|
||||||
func proxyEnvList(p *pb.ProxyEnv) []string {
|
func proxyEnvList(p *pb.ProxyEnv) []string {
|
||||||
|
|
Loading…
Reference in New Issue