Fixup for CL 520265; of course errors returned from os/exec are wrapped.
While at it, change the order -- it seems more readable this way.
Change-Id: Ifb5d0c113f4fb2b3cc4be922021dbd2a8a886b7b
Reviewed-on: https://go-review.googlesource.com/c/go/+/524959
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
import (
"bytes"
+ "errors"
"flag"
"fmt"
"internal/platform"
}
out, err := cmd.CombinedOutput()
if err != nil {
- if err != syscall.EINVAL && testenv.SyscallIsNotSupported(err) {
+ if testenv.SyscallIsNotSupported(err) && !errors.Is(err, syscall.EINVAL) {
// Can be one of:
// - clone3 not supported (old kernel);
// - clone3 not allowed (by e.g. seccomp);