From 551aee64cd4d0daebf60a0c0aed4a4e09a9d39b6 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 26 Jun 2024 12:02:08 +0200 Subject: pkg/runtest: shorted parsing tests Parsing auto-generated seeds takes lots of time: --- PASS: TestParsing/linux/mips64le (56.86s) --- PASS: TestParsing/linux/amd64 (53.63s) --- PASS: TestParsing/linux/arm64 (53.32s) --- PASS: TestParsing/linux/arm (53.57s) --- PASS: TestParsing/linux/386 (53.59s) --- PASS: TestParsing/linux/s390x (43.09s) --- PASS: TestParsing/linux/riscv64 (43.17s) --- PASS: TestParsing/linux/ppc64le (43.12s) Don't even parse them. After: --- PASS: TestParsing/fuchsia/amd64 (0.48s) --- PASS: TestParsing/test/64_fork (0.59s) --- PASS: TestParsing/linux/386 (3.04s) --- PASS: TestParsing/linux/arm64 (3.08s) --- PASS: TestParsing/linux/riscv64 (3.10s) --- PASS: TestParsing/linux/s390x (3.13s) --- PASS: TestParsing/linux/amd64 (3.13s) --- PASS: TestParsing/linux/arm (3.14s) --- PASS: TestParsing/linux/mips64le (3.21s) --- PASS: TestParsing/test/32 (0.37s) --- PASS: TestParsing/fuchsia/arm64 (0.35s) --- PASS: TestParsing/test/32_fork (0.57s) --- PASS: TestParsing/test/64 (0.53s) --- PASS: TestParsing/test/64_fuzz (0.54s) --- PASS: TestParsing/linux/ppc64le (2.87s) --- pkg/runtest/run_test.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'pkg/runtest/run_test.go') diff --git a/pkg/runtest/run_test.go b/pkg/runtest/run_test.go index 92b6c2d77..af613ed30 100644 --- a/pkg/runtest/run_test.go +++ b/pkg/runtest/run_test.go @@ -414,7 +414,10 @@ func TestParsing(t *testing.T) { t.Run(fmt.Sprintf("%v/%v", target.OS, target.Arch), func(t *testing.T) { t.Parallel() for _, file := range files { - p, requires, _, err := parseProg(target, dir, file) + // syz_mount_image tests are very large and this test takes too long. + // syz-imagegen that generates does some of this testing (Deserialize/SerializeForExec). + requires := map[string]bool{"manual": false} + p, _, _, err := parseProg(target, dir, file, requires) if err != nil { t.Errorf("failed to parse %v: %v", file, err) } @@ -424,11 +427,6 @@ func TestParsing(t *testing.T) { if runtime.GOOS != sysTarget.BuildOS { continue // we need at least preprocessor binary to generate sources } - // syz_mount_image tests are very large and this test takes too long. - // syz-imagegen that generates does some of this testing (Deserialize/SerializeForExec). - if requires["manual"] { - continue - } if _, err = csource.Write(p, csource.ExecutorOpts); err != nil { t.Errorf("failed to generate C source for %v: %v", file, err) } -- cgit mrf-deployment