You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: reaper_test.go
    path of file: ./repos/coder/agent/reaper
    
    the code of the file until where you have to start completion: //go:build linux

package reaper_test

import (
	"fmt"
	"os"
	"os/exec"
	"os/signal"
	"syscall"
	"testing"
	"time"

	"github.com/hashicorp/go-reap"
	"github.com/stretchr/testify/require"

	"github.com/coder/coder/v2/agent/reaper"
	"github.com/coder/coder/v2/testutil"
)

// TestReap checks that's the reaper is successfully reaping
// exited processes and passing the PIDs through the shared
// channel.
//
//nolint:paralleltest
func TestReap(t *testing.T) {
	// Don't run the reaper test in CI. It does weird
	// things like forkexecing which may have unintended
	// consequences in CI.
	if testutil.InCI() {
		t.Skip("Detected CI, skipping reaper tests")
	}

	pids := make(reap.PidCh, 1)
	err := reaper.ForkReap(
		reaper.WithPIDCallback(
    
func TestReap(t *testing.T) {
	// Don't run the reaper test in CI. It does weird
	// things like forkexecing which may have unintended
	// consequences in CI.
	if testutil.InCI() {
		t.Skip("Detected CI, skipping reaper tests")
	}

	pids := make(reap.PidCh, 1)
	err := reaper.ForkReap(
		reaper.WithPIDCallback(pids),
		// Provide some argument that immediately exits.
		reaper.WithExecArgs("/bin/sh", "-c", "exit 0"),
	)
	require.NoError(t, err)

	cmd := exec.Command("tail", "-f", "/dev/null")
	err = cmd.Start()
	require.NoError(t, err)

	cmd2 := exec.Command("tail", "-f", "/dev/null")
	err = cmd2.Start()
	require.NoError(t, err)

	err = cmd.Process.Kill()
	require.NoError(t, err)

	err = cmd2.Process.Kill()
	require.NoError(t, err)

	expectedPIDs := []int{cmd.Process.Pid, cmd2.Process.Pid}

	for i := 0; i < len(expectedPIDs); i++ {
		select {
		case <-time.After(testutil.WaitShort):
			t.Fatalf("Timed out waiting for process")
		case pid := <-pids:
			require.Contains(t, expectedPIDs, pid)
		}
	}
}