-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
syz-manager: pkg: skip seeds with mismatching requirements in fuzzing…
… mode When running in the test mode, syz-manager already ignores tests that have arch requirements mismatching the target arch. Because the same tests are also used as seeds in the fuzzing mode, skip them likewise, instead of reporting errors if they contain arch-specific syscalls. The code and tests for parsing the requirements is moved from pkg/runtest to pkg/manager.
- Loading branch information
1 parent
bb326ff
commit b74e713
Showing
5 changed files
with
97 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright 2024 syzkaller project authors. All rights reserved. | ||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. | ||
|
||
package manager | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
func TestRequires(t *testing.T) { | ||
{ | ||
requires := parseRequires([]byte("# requires: manual arch=amd64")) | ||
if !checkArch(requires, "amd64") { | ||
t.Fatalf("amd64 does not pass check") | ||
} | ||
if checkArch(requires, "riscv64") { | ||
t.Fatalf("riscv64 passes check") | ||
} | ||
} | ||
{ | ||
requires := parseRequires([]byte("# requires: -arch=arm64 manual -arch=riscv64")) | ||
if !checkArch(requires, "amd64") { | ||
t.Fatalf("amd64 does not pass check") | ||
} | ||
if checkArch(requires, "riscv64") { | ||
t.Fatalf("riscv64 passes check") | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters