• Home
  • Raw
  • Download

Lines Matching refs:req

74 	for req := range progs {
75 <-req.Done
76 if req.Bin != "" {
77 os.Remove(req.Bin)
80 if req.broken != "" {
82 result = fmt.Sprintf("BROKEN (%v)", req.broken)
83 } else if req.skip != "" {
85 result = fmt.Sprintf("SKIP (%v)", req.skip)
87 if req.Err == nil {
88 req.Err = checkResult(req)
90 if req.Err != nil {
93 strings.Replace(req.Err.Error(), "\n", "\n\t", -1))
94 if len(req.Output) != 0 {
96 strings.Replace(string(req.Output), "\n", "\n\t", -1))
103 ctx.log("%-36v: %v", req.name, result)
173 req, err := ctx.createSyzTest(p, sandbox, threaded, cov)
177 ctx.produceTest(progs, req, name, properties, requires, results)
198 req, err := ctx.createCTest(p, sandbox, threaded, times)
202 ctx.produceTest(progs, req, name, properties, requires, results)
225 for _, req := range strings.Fields(comment[len(prefix):]) {
227 if req[0] == '-' {
229 req = req[1:]
231 requires[req] = positive
264 func (ctx *Context) produceTest(progs chan *RunRequest, req *RunRequest, name string,
266 req.name = name
267 req.results = results
269 req.Done = make(chan struct{})
270 ctx.Requests <- req
272 req.skip = "excluded by constraints"
273 req.Done = make(chan struct{})
274 close(req.Done)
276 progs <- req
280 for req, positive := range requires {
282 if !props[req] {
288 for _, req1 := range strings.Split(req, ",") {
329 req := &RunRequest{
335 return req, nil
367 req := &RunRequest{
372 return req, nil
375 func checkResult(req *RunRequest) error {
376 if req.Bin != "" {
378 if req.Info, err = parseBinOutput(req); err != nil {
382 if req.Repeat != len(req.Info) {
384 req.Repeat, len(req.Info))
386 for run, info := range req.Info {
388 want := req.results[i]
394 if flag == ipc.CallBlocked && req.Bin != "" {
415 func parseBinOutput(req *RunRequest) ([][]ipc.CallInfo, error) {
417 s := bufio.NewScanner(bytes.NewReader(req.Output))
421 infos = append(infos, make([]ipc.CallInfo, len(req.P.Calls)))
458 func RunTest(req *RunRequest, executor string) {
459 if req.Bin != "" {
462 req.Err = fmt.Errorf("failed to create temp dir: %v", err)
466 req.Output, req.Err = osutil.RunCmd(20*time.Second, tmpDir, req.Bin)
469 req.Cfg.Executor = executor
470 env, err := ipc.MakeEnv(req.Cfg, 0)
472 req.Err = fmt.Errorf("failed to create ipc env: %v", err)
476 for run := 0; run < req.Repeat; run++ {
477 output, info, failed, hanged, err := env.Exec(req.Opts, req.P)
478 req.Output = append(req.Output, output...)
480 req.Err = fmt.Errorf("run %v: failed to run: %v", run, err)
484 req.Err = fmt.Errorf("run %v: failed", run)
488 req.Err = fmt.Errorf("run %v: hanged", run)
496 req.Info = append(req.Info, info)