Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions reexec/reexec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func TestCommandContext(t *testing.T) {

for _, tc := range tests {
t.Run(tc.doc, func(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond)
ctx, cancel := context.WithTimeout(t.Context(), 100*time.Millisecond)
defer cancel()

cmd := reexec.CommandContext(ctx, tc.cmdAndArgs...)
Expand Down Expand Up @@ -208,7 +208,7 @@ func TestCommandContext(t *testing.T) {
// [reexecoverride.OverrideArgv0] so that the fallback logic is exercised
// consistently across platforms.
func TestRunNaiveSelf(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond)
ctx, cancel := context.WithTimeout(t.Context(), 100*time.Millisecond)
defer cancel()

// Force Self() to use naiveSelf(os.Args[0]), instead of "/proc/self/exe" on Linux.
Expand Down
Loading