<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/go-git.git/src/os/exec/exec_test.go, branch master</title>
<subtitle>github.com: golang/go
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/'/>
<entry>
<title>cmd/link/internal/ld: move more of mustLinkExternal into internal/platform</title>
<updated>2023-03-02T16:34:21+00:00</updated>
<author>
<name>Bryan C. Mills</name>
<email>bcmills@google.com</email>
</author>
<published>2023-03-01T16:11:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=3f8f929d60a90c4e4e2b07c8d1972166c1a783b1'/>
<id>3f8f929d60a90c4e4e2b07c8d1972166c1a783b1</id>
<content type='text'>
internal/platform.MustLinkExternal is used in various places to
determine whether external linking is required. It should always
match what the linker actually requires, but today does not match
because the linker imposes additional constraints.

Updates #31544.

Change-Id: I0cc6ad587e95c607329dea5d60d29a5fb2a9e722
Reviewed-on: https://go-review.googlesource.com/c/go/+/472515
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
internal/platform.MustLinkExternal is used in various places to
determine whether external linking is required. It should always
match what the linker actually requires, but today does not match
because the linker imposes additional constraints.

Updates #31544.

Change-Id: I0cc6ad587e95c607329dea5d60d29a5fb2a9e722
Reviewed-on: https://go-review.googlesource.com/c/go/+/472515
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>all: fix typos</title>
<updated>2023-02-28T03:43:42+00:00</updated>
<author>
<name>pgxiaolianzi</name>
<email>gnnu_d13@163.com</email>
</author>
<published>2023-02-27T06:51:55+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=81cd9ff7dbf46a57710fd72330f2d60e3db959d0'/>
<id>81cd9ff7dbf46a57710fd72330f2d60e3db959d0</id>
<content type='text'>
Change-Id: Ica8d5e5799a4de532764ae86cdb623508d3a8e18
GitHub-Last-Rev: 3e97cca9de3885f2fe0d7deb776e59cc1c73146d
GitHub-Pull-Request: golang/go#58689
Reviewed-on: https://go-review.googlesource.com/c/go/+/471021
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Ica8d5e5799a4de532764ae86cdb623508d3a8e18
GitHub-Last-Rev: 3e97cca9de3885f2fe0d7deb776e59cc1c73146d
GitHub-Pull-Request: golang/go#58689
Reviewed-on: https://go-review.googlesource.com/c/go/+/471021
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>os: use testenv.Command instead of exec.Command in tests</title>
<updated>2023-02-21T23:07:55+00:00</updated>
<author>
<name>cui fliter</name>
<email>imcusg@gmail.com</email>
</author>
<published>2022-11-18T06:06:56+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=dd87e33d88eadaf5302895fb91b0a0e2e16b136e'/>
<id>dd87e33d88eadaf5302895fb91b0a0e2e16b136e</id>
<content type='text'>
testenv.Command sets a default timeout based on the test's deadline
and sends SIGQUIT (where supported) in case of a hang.

Change-Id: I84d469d12ca1f39175b713ca41e7cd2202d11d96
Reviewed-on: https://go-review.googlesource.com/c/go/+/451895
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
testenv.Command sets a default timeout based on the test's deadline
and sends SIGQUIT (where supported) in case of a hang.

Change-Id: I84d469d12ca1f39175b713ca41e7cd2202d11d96
Reviewed-on: https://go-review.googlesource.com/c/go/+/451895
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>os/exec: avoid leaking an exec.Cmd in TestWaitInterrupt</title>
<updated>2023-01-10T17:59:34+00:00</updated>
<author>
<name>Bryan C. Mills</name>
<email>bcmills@google.com</email>
</author>
<published>2023-01-10T16:29:25+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=82f09b75ca181a6be0e594e1917e4d3d91934b27'/>
<id>82f09b75ca181a6be0e594e1917e4d3d91934b27</id>
<content type='text'>
In CL 436655 I added a GODEBUG setting to this test process to verify
that Wait is eventually called for every exec.Cmd before it becomes
unreachable. However, the cmdHang test helpers in
TestWaitInterrupt/Exit-hang and TestWaitInterrupt/SIGKILL-hang
intentially leak a subprocess in order to simulate a leaky third-party
program, as Go users might encounter in practical use.

To avoid tripping over the leak check, we call Wait on the leaked
subprocess in a background goroutine. Since we expect the process
running cmdHang to exit before its subprocess does, the call to Wait
should have no effect beyond suppressing the leak check.

Fixes #57596.
Updates #52580.
Updates #50436.

Change-Id: Ia4b88ea47fc6b605c27ca6d9d7669c874867a900
Reviewed-on: https://go-review.googlesource.com/c/go/+/460998
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In CL 436655 I added a GODEBUG setting to this test process to verify
that Wait is eventually called for every exec.Cmd before it becomes
unreachable. However, the cmdHang test helpers in
TestWaitInterrupt/Exit-hang and TestWaitInterrupt/SIGKILL-hang
intentially leak a subprocess in order to simulate a leaky third-party
program, as Go users might encounter in practical use.

To avoid tripping over the leak check, we call Wait on the leaked
subprocess in a background goroutine. Since we expect the process
running cmdHang to exit before its subprocess does, the call to Wait
should have no effect beyond suppressing the leak check.

Fixes #57596.
Updates #52580.
Updates #50436.

Change-Id: Ia4b88ea47fc6b605c27ca6d9d7669c874867a900
Reviewed-on: https://go-review.googlesource.com/c/go/+/460998
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>os/exec: fix TestWaitInterrupt/WaitDelay error message</title>
<updated>2022-11-11T21:43:46+00:00</updated>
<author>
<name>scott</name>
<email>scottwangsxll@gmail.com</email>
</author>
<published>2022-11-11T03:55:08+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=7e4191e686c192b9c85065fd3b8775190d3e9c5f'/>
<id>7e4191e686c192b9c85065fd3b8775190d3e9c5f</id>
<content type='text'>
As the comments say. Here we expect err to be nil instead of ctx.Err()

Change-Id: I4cd02d62ac0a13c9577a567de36742f13d140d36
GitHub-Last-Rev: 6bedfbc9d2511140d088dc9ee5f40015725f68db
GitHub-Pull-Request: golang/go#56698
Reviewed-on: https://go-review.googlesource.com/c/go/+/449737
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As the comments say. Here we expect err to be nil instead of ctx.Err()

Change-Id: I4cd02d62ac0a13c9577a567de36742f13d140d36
GitHub-Last-Rev: 6bedfbc9d2511140d088dc9ee5f40015725f68db
GitHub-Pull-Request: golang/go#56698
Reviewed-on: https://go-review.googlesource.com/c/go/+/449737
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>os/exec: allow NUL in environment variables on Plan 9</title>
<updated>2022-11-04T01:23:16+00:00</updated>
<author>
<name>Matthew Dempsky</name>
<email>mdempsky@google.com</email>
</author>
<published>2022-11-03T18:02:51+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=bc2dc2384619d871000f9627b5d4e2bdc1dd38dc'/>
<id>bc2dc2384619d871000f9627b5d4e2bdc1dd38dc</id>
<content type='text'>
Plan 9 uses NUL as os.PathListSeparator, so it's almost always going
to appear in the environment variable list. Exempt GOOS=plan9 from the
check for NUL in environment variables.

For #56284.
Fixes #56544.

Change-Id: I23df233cdf20c0a9a606fd9253e15a9b5482575a
Reviewed-on: https://go-review.googlesource.com/c/go/+/447715
Reviewed-by: David du Colombier &lt;0intro@gmail.com&gt;
Run-TryBot: Matthew Dempsky &lt;mdempsky@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Plan 9 uses NUL as os.PathListSeparator, so it's almost always going
to appear in the environment variable list. Exempt GOOS=plan9 from the
check for NUL in environment variables.

For #56284.
Fixes #56544.

Change-Id: I23df233cdf20c0a9a606fd9253e15a9b5482575a
Reviewed-on: https://go-review.googlesource.com/c/go/+/447715
Reviewed-by: David du Colombier &lt;0intro@gmail.com&gt;
Run-TryBot: Matthew Dempsky &lt;mdempsky@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>os/exec: allow open descriptors to be closed during TestPipeLookPathLeak</title>
<updated>2022-11-03T14:38:29+00:00</updated>
<author>
<name>Bryan C. Mills</name>
<email>bcmills@google.com</email>
</author>
<published>2022-11-02T13:09:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=56ad133512b4f05c071ec79bc4cf9ccb227567c1'/>
<id>56ad133512b4f05c071ec79bc4cf9ccb227567c1</id>
<content type='text'>
In https://build.golang.org/log/d2eb315305bf3d513c490e7f85d56e9a016aacd2,
we observe a failure in TestPipeLookPathLeak due to an additional
descriptor (7) that was open at the start of the test being closed while
the test executes.

I haven't dug much into the failure, but it seems plausible to me that the
descriptor may have been opened by libc for some reason, and may have been
closed due to some sort of idle timeout or the completion of a background
initialization routine.

Since the test is looking for a leak, and closing an existing descriptor
does not indicate a leak, let's not fail the test if an existing descriptor
is unexpectedly closed.

Updates #5071.

Change-Id: I03973ddff6592c454cfcc790d6e56accd051dd52
Reviewed-on: https://go-review.googlesource.com/c/go/+/447235
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In https://build.golang.org/log/d2eb315305bf3d513c490e7f85d56e9a016aacd2,
we observe a failure in TestPipeLookPathLeak due to an additional
descriptor (7) that was open at the start of the test being closed while
the test executes.

I haven't dug much into the failure, but it seems plausible to me that the
descriptor may have been opened by libc for some reason, and may have been
closed due to some sort of idle timeout or the completion of a background
initialization routine.

Since the test is looking for a leak, and closing an existing descriptor
does not indicate a leak, let's not fail the test if an existing descriptor
is unexpectedly closed.

Updates #5071.

Change-Id: I03973ddff6592c454cfcc790d6e56accd051dd52
Reviewed-on: https://go-review.googlesource.com/c/go/+/447235
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>syscall, os/exec: reject environment variables containing NULs</title>
<updated>2022-11-01T16:40:37+00:00</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2022-10-18T00:38:29+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=61ae0a37a8c96e2b1745594e477244100f1a7046'/>
<id>61ae0a37a8c96e2b1745594e477244100f1a7046</id>
<content type='text'>
Check for and reject environment variables containing NULs.

The conventions for passing environment variables to subprocesses
cause most or all systems to interpret a NUL as a separator. The
syscall package rejects environment variables containing a NUL
on most systems, but erroniously did not do so on Windows. This
causes an environment variable such as "FOO=a\x00BAR=b" to be
interpreted as "FOO=a", "BAR=b".

Check for and reject NULs in environment variables passed to
syscall.StartProcess on Windows.

Add a redundant check to os/exec as extra insurance.

Fixes #56284
Fixes CVE-2022-41716

Change-Id: I2950e2b0cb14ebd26e5629be1521858f66a7d4ae
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1609434
Run-TryBot: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Tatiana Bradley &lt;tatianabradley@google.com&gt;
Reviewed-by: Roland Shoemaker &lt;bracewell@google.com&gt;
TryBot-Result: Security TryBots &lt;security-trybots@go-security-trybots.iam.gserviceaccount.com&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/446916
Reviewed-by: Tatiana Bradley &lt;tatiana@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Matthew Dempsky &lt;mdempsky@google.com&gt;
Reviewed-by: Heschi Kreinick &lt;heschi@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Check for and reject environment variables containing NULs.

The conventions for passing environment variables to subprocesses
cause most or all systems to interpret a NUL as a separator. The
syscall package rejects environment variables containing a NUL
on most systems, but erroniously did not do so on Windows. This
causes an environment variable such as "FOO=a\x00BAR=b" to be
interpreted as "FOO=a", "BAR=b".

Check for and reject NULs in environment variables passed to
syscall.StartProcess on Windows.

Add a redundant check to os/exec as extra insurance.

Fixes #56284
Fixes CVE-2022-41716

Change-Id: I2950e2b0cb14ebd26e5629be1521858f66a7d4ae
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1609434
Run-TryBot: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Tatiana Bradley &lt;tatianabradley@google.com&gt;
Reviewed-by: Roland Shoemaker &lt;bracewell@google.com&gt;
TryBot-Result: Security TryBots &lt;security-trybots@go-security-trybots.iam.gserviceaccount.com&gt;
Reviewed-on: https://go-review.googlesource.com/c/go/+/446916
Reviewed-by: Tatiana Bradley &lt;tatiana@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Matthew Dempsky &lt;mdempsky@google.com&gt;
Reviewed-by: Heschi Kreinick &lt;heschi@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>os/exec: add the Cancel and WaitDelay fields</title>
<updated>2022-10-25T03:34:36+00:00</updated>
<author>
<name>Bryan C. Mills</name>
<email>bcmills@google.com</email>
</author>
<published>2022-04-21T17:58:06+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=55eaae452cf69df768b2aaf6045db22d6c1a4029'/>
<id>55eaae452cf69df768b2aaf6045db22d6c1a4029</id>
<content type='text'>
Fixes #50436.

Change-Id: I9dff8caa317a04b7b2b605f810b8f12ef8ca485d
Reviewed-on: https://go-review.googlesource.com/c/go/+/401835
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #50436.

Change-Id: I9dff8caa317a04b7b2b605f810b8f12ef8ca485d
Reviewed-on: https://go-review.googlesource.com/c/go/+/401835
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>os/exec: set traceback to "system" in TestContextCancel</title>
<updated>2022-10-13T20:12:51+00:00</updated>
<author>
<name>Bryan C. Mills</name>
<email>bcmills@google.com</email>
</author>
<published>2022-10-12T15:15:45+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=379a49c593ce3c2e8e57039e05e90aa466363092'/>
<id>379a49c593ce3c2e8e57039e05e90aa466363092</id>
<content type='text'>
This will dump more goroutines if the test happens to fail.

For #50138.

Change-Id: Ifae30b5ba8bddcdaa9250dd90be8d8ba7d5604d2
Reviewed-on: https://go-review.googlesource.com/c/go/+/442476
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will dump more goroutines if the test happens to fail.

For #50138.

Change-Id: Ifae30b5ba8bddcdaa9250dd90be8d8ba7d5604d2
Reviewed-on: https://go-review.googlesource.com/c/go/+/442476
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
