mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-28 05:40:26 +00:00
syz-fuzzer: fix testing when shmem is not used
We get program output info only if shmem is used. Output info over pipes is not implemented. So don't fail when we got nothing.
This commit is contained in:
parent
eecefab32c
commit
ecbe6d99d3
@ -128,6 +128,7 @@ func checkSimpleProgram(args *checkArgs) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create ipc env: %v", err)
|
||||
}
|
||||
defer env.Close()
|
||||
p := args.target.GenerateSimpleProg()
|
||||
output, info, failed, hanged, err := env.Exec(args.ipcExecOpts, p)
|
||||
if err != nil {
|
||||
@ -139,6 +140,11 @@ func checkSimpleProgram(args *checkArgs) error {
|
||||
if failed {
|
||||
return fmt.Errorf("program failed:\n%s", output)
|
||||
}
|
||||
if args.ipcConfig.Flags&ipc.FlagUseShmem == 0 {
|
||||
// Output is currently only supported via shmem.
|
||||
// So if we are using pipes, we won't get any info.
|
||||
return nil
|
||||
}
|
||||
if len(info) == 0 {
|
||||
return fmt.Errorf("no calls executed:\n%s", output)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user