mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-23 11:29:46 +00:00
parent
742f448304
commit
4a9fce1952
@ -164,10 +164,9 @@ func (comp *compiler) assignSyscallNumbers(consts map[string]uint64) {
|
||||
// Updates desc and returns set of unsupported syscalls and flags.
|
||||
func (comp *compiler) patchConsts(consts map[string]uint64) {
|
||||
for _, decl := range comp.desc.Nodes {
|
||||
switch decl.(type) {
|
||||
switch n := decl.(type) {
|
||||
case *ast.IntFlags:
|
||||
// Unsupported flag values are dropped.
|
||||
n := decl.(*ast.IntFlags)
|
||||
var values []*ast.Int
|
||||
for _, v := range n.Values {
|
||||
if comp.patchIntConst(&v.Value, &v.Ident, consts, nil) {
|
||||
|
@ -60,7 +60,7 @@ func TestGenerate(t *testing.T) {
|
||||
}
|
||||
|
||||
func testTarget(t *testing.T, target *prog.Target, full bool) {
|
||||
seed := int64(time.Now().UnixNano())
|
||||
seed := time.Now().UnixNano()
|
||||
if os.Getenv("TRAVIS") != "" {
|
||||
seed = 0 // required for deterministic coverage reports
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ func TestMode(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestDecode(t *testing.T) {
|
||||
seed := int64(time.Now().UnixNano())
|
||||
seed := time.Now().UnixNano()
|
||||
if os.Getenv("TRAVIS") != "" {
|
||||
seed = 0 // required for deterministic coverage reports
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ func initTest(t *testing.T) (*prog.Target, rand.Source, int, EnvFlags) {
|
||||
if testing.Short() {
|
||||
iters = 10
|
||||
}
|
||||
seed := int64(time.Now().UnixNano())
|
||||
seed := time.Now().UnixNano()
|
||||
if os.Getenv("TRAVIS") != "" {
|
||||
seed = 0 // required for deterministic coverage reports
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ func initTest(t *testing.T) (*rand.Rand, int) {
|
||||
if testing.Short() {
|
||||
iters = 100
|
||||
}
|
||||
seed := int64(time.Now().UnixNano())
|
||||
seed := time.Now().UnixNano()
|
||||
if os.Getenv("TRAVIS") != "" {
|
||||
seed = 0 // required for deterministic coverage reports
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ func initTargetTest(t *testing.T, os, arch string) *Target {
|
||||
}
|
||||
|
||||
func randSource(t *testing.T) rand.Source {
|
||||
seed := int64(time.Now().UnixNano())
|
||||
seed := time.Now().UnixNano()
|
||||
if os.Getenv("TRAVIS") != "" {
|
||||
seed = 0 // required for deterministic coverage reports
|
||||
}
|
||||
|
@ -328,12 +328,11 @@ func (inst *instance) getBatteryLevel(numRetry int) (int, error) {
|
||||
// sleep for 5 seconds before retrying
|
||||
time.Sleep(5 * time.Second)
|
||||
out, err = inst.adb("shell", "dumpsys battery | grep level:")
|
||||
} else {
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
val := 0
|
||||
for _, c := range out {
|
||||
if c >= '0' && c <= '9' {
|
||||
|
@ -336,7 +336,7 @@ func (inst *instance) Diagnose() ([]byte, bool) {
|
||||
|
||||
func init() {
|
||||
if os.Getenv("SYZ_GVISOR_PROXY") != "" {
|
||||
fmt.Fprintf(os.Stderr, initStartMsg)
|
||||
fmt.Fprint(os.Stderr, initStartMsg)
|
||||
select {}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user