Commit Graph
11 Commits
Author SHA1 Message Date
Hamza El-Saawy 19a9f656e1 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>
2023-07-21 18:06:41 -04:00
Hamza El-Saawy 376b2013fe GUID tests to use t.Run (#256)
Switched to subtests using `t.Run()` for GUID testing, rather than using
log statements to demarcate different tests.

Added `.String` to GUID `Variant` and `Version` using
`golang.org/x/tools/cmd/stringer`.

Added `tools.go` to version `stringer` in go.mod and allow
`go generate ./...` to be run without needing a `go get` call.
Based off of [go wiki](https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module)
recommendation.

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
2022-08-29 16:27:34 -04:00
Hamza El-Saawy b52bba4773 Updating windows build constraints
pkg/guid is not windows specific, as it can run on Linux.
Build constraints on guid_windows and guid_nonwindows are redundant with
file names, but added for consistency.

Added missing build constraints.

Added Ubuntu to test matrix, along with windows 2022.

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
2022-03-29 12:38:23 -04:00
Thomas d4c02ad896 Add missing build constraints 2021-02-10 23:54:19 +00:00
Kevin Parsons 177d2ec7ea guid: Add V5 GUID support
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2019-07-10 15:08:22 -07:00
Kevin Parsons c5294c98c0 guid: Improve version and variant handling
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2019-07-10 15:03:44 -07:00
Kevin Parsons 2dc6637e2c pkg/guid: Support big-endian and Windows encodings
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2019-05-13 14:28:49 -07:00
Kevin Parsons 6dd84a2574 pkg/guid: Add helper functions to tests
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2019-05-13 14:25:53 -07:00
Kevin Parsons 1197d54849 pkg/guid: Add variant and version support
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2019-05-13 14:22:42 -07:00
Kevin Parsons 7185c03f75 pkg/guid: Prefer passing GUID by value
Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
2019-05-08 15:52:52 -07:00
Kevin Parsons 88da7d1491 Add guid package 2019-04-01 16:07:14 -07:00