Update tests; run fuzzing (#294)

Run fuzzing tests in CI.

Use race detector when running tests.

Add missing `t.Helper()` calls.

Update test helpers in `pkg/bindfilter` to use `RtlGetNtVersionNumbers`
instead of reading registry, and skip tests if not running as admin.

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
This commit is contained in:
Hamza El-Saawy
2023-07-21 18:06:41 -04:00
committed by GitHub
parent 10d5703c7b
commit 19a9f656e1
11 changed files with 86 additions and 46 deletions
+5 -2
View File
@@ -37,6 +37,7 @@ func serverListen(u testUtil) (l *HvsockListener, a *HvsockAddr) {
u.T.Logf("address collision %v", a)
continue
}
u.T.Logf("listening on %v", a)
break
}
u.Must(err, "could not listen")
@@ -579,9 +580,11 @@ type testUtil struct {
T testing.TB
}
func newUtil(t testing.TB) testUtil {
func newUtil(tb testing.TB) testUtil {
tb.Helper()
return testUtil{
T: t,
T: tb,
}
}