public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/redhat/heads/gcc-10-branch)] syscall: append to environment in tests, don't clobber it
@ 2020-06-18 10:45 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2020-06-18 10:45 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:fbfa806e65c552e81b363756fd8e2925651f7333
commit fbfa806e65c552e81b363756fd8e2925651f7333
Author: Ian Lance Taylor <iant@golang.org>
Date: Mon May 11 16:23:44 2020 -0700
syscall: append to environment in tests, don't clobber it
This is a partial backport of https://golang.org/cl/233318.
It's only a partial backport because part of the change was
already applied to libgo in CL 193497 as part of the update
to the Go 1.13beta1 release.
Fixes PR go/95061
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/233359
Diff:
---
libgo/go/syscall/syscall_linux_test.go | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/libgo/go/syscall/syscall_linux_test.go b/libgo/go/syscall/syscall_linux_test.go
index 97059c87d3d..c12df4cf5c7 100644
--- a/libgo/go/syscall/syscall_linux_test.go
+++ b/libgo/go/syscall/syscall_linux_test.go
@@ -187,7 +187,7 @@ func TestLinuxDeathSignal(t *testing.T) {
}
cmd := exec.Command(tmpBinary)
- cmd.Env = []string{"GO_DEATHSIG_PARENT=1"}
+ cmd.Env = append(os.Environ(), "GO_DEATHSIG_PARENT=1")
chldStdin, err := cmd.StdinPipe()
if err != nil {
t.Fatalf("failed to create new stdin pipe: %v", err)
@@ -225,7 +225,10 @@ func TestLinuxDeathSignal(t *testing.T) {
func deathSignalParent() {
cmd := exec.Command(os.Args[0])
- cmd.Env = []string{"GO_DEATHSIG_CHILD=1"}
+ cmd.Env = append(os.Environ(),
+ "GO_DEATHSIG_PARENT=",
+ "GO_DEATHSIG_CHILD=1",
+ )
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
attrs := syscall.SysProcAttr{
@@ -360,7 +363,7 @@ func TestSyscallNoError(t *testing.T) {
}
cmd := exec.Command(tmpBinary)
- cmd.Env = []string{"GO_SYSCALL_NOERROR=1"}
+ cmd.Env = append(os.Environ(), "GO_SYSCALL_NOERROR=1")
out, err := cmd.CombinedOutput()
if err != nil {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-18 10:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18 10:45 [gcc(refs/vendors/redhat/heads/gcc-10-branch)] syscall: append to environment in tests, don't clobber it Jakub Jelinek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).