diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2024-04-02 16:28:04 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2024-04-11 17:14:14 +0000 |
| commit | 27de0a5cccaebe20ffd8fce48c2c5ec9d4b358fa (patch) | |
| tree | b9944c40d2e739e12df9b4778030ec8474e82811 /prog/prio_test.go | |
| parent | 3f7932d24f9b230ac0e3592093a15a5a8c0a3770 (diff) | |
prog: update the choice table aglorithm
Two changes:
1) Instead of multiplying static and dynamic prios, add them 1:1.
2) For dynamic priorities, limit the effect of too frequent call
combinations by taking a sqrt() of the value.
On syz-testbed experiments, the updated algorithm triggers 5-10%
more different crash types.
As before, there is no big theory behind the approach :)
Diffstat (limited to 'prog/prio_test.go')
| -rw-r--r-- | prog/prio_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/prog/prio_test.go b/prog/prio_test.go index 3f2fbc2ce..60802657a 100644 --- a/prog/prio_test.go +++ b/prog/prio_test.go @@ -11,19 +11,19 @@ import ( "github.com/google/syzkaller/pkg/testutil" ) -func TestNormalizePrio(t *testing.T) { +func TestNormalizePrios(t *testing.T) { prios := [][]int32{ {2, 2, 2}, {1, 2, 4}, {1, 2, 0}, } want := [][]int32{ - {1000, 1000, 1000}, - {257, 505, 1000}, - {505, 1000, 10}, + {10, 10, 10}, + {4, 8, 17}, + {10, 20, 0}, } t.Logf("had: %+v", prios) - normalizePrio(prios) + normalizePrios(prios) if !reflect.DeepEqual(prios, want) { t.Logf("got: %+v", prios) t.Errorf("want: %+v", want) |
