From 7638a44fa613f23434318bdf136723aa010e8638 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 13 Oct 2025 04:38:48 +0900 Subject: treewide: parallel tests Most tests already had no global state, however parallel was never enabled. This change enables it for all applicable tests. Signed-off-by: Ophestra --- helper/args_test.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'helper/args_test.go') diff --git a/helper/args_test.go b/helper/args_test.go index e22842e2..3aff8cf5 100644 --- a/helper/args_test.go +++ b/helper/args_test.go @@ -11,27 +11,29 @@ import ( ) func TestArgsString(t *testing.T) { + t.Parallel() wantString := strings.Join(wantArgs, " ") if got := argsWt.(fmt.Stringer).String(); got != wantString { - t.Errorf("String: %q, want %q", - got, wantString) + t.Errorf("String: %q, want %q", got, wantString) } } func TestNewCheckedArgs(t *testing.T) { + t.Parallel() + args := []string{"\x00"} if _, err := helper.NewCheckedArgs(args); !errors.Is(err, syscall.EINVAL) { - t.Errorf("NewCheckedArgs: error = %v, wantErr %v", - err, syscall.EINVAL) + t.Errorf("NewCheckedArgs: error = %v, wantErr %v", err, syscall.EINVAL) } t.Run("must panic", func(t *testing.T) { + t.Parallel() + badPayload := []string{"\x00"} defer func() { wantPanic := "invalid argument" if r := recover(); r != wantPanic { - t.Errorf("MustNewCheckedArgs: panic = %v, wantPanic %v", - r, wantPanic) + t.Errorf("MustNewCheckedArgs: panic = %v, wantPanic %v", r, wantPanic) } }() helper.MustNewCheckedArgs(badPayload) -- cgit v1.3.1