mirror of
https://github.com/rwinkhart/go-winio.git
synced 2026-08-28 04:46:50 -04:00
Bug: Close hvsock handle on listen error; fix tests (#310)
* Bug: Close hvsock handle on listen error; fix tests Close the socket created in `github.com/Microsoft/go-winio/pkg/ListenHvsock` if either the `Bind` or `Listen` calls fail. Go changed `filepath.VolumeName` code, resulting in different behavior in `github.com/Microsoft/go-winio/pkg/fs.GetFileSystemType`. Update test accordingly. Also add more debug logs to `pkg\fs\resolve_test.go`. Also, move add skip for fuzzing on WS2019 or older to `FuzzHvSockRxTx` code directly, instead of in ci.yml. See: https://go-review.googlesource.com/c/go/+/540277 Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com> * PR: unskip TestResolvePath Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com> --------- Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
This commit is contained in:
@@ -7,9 +7,16 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
func FuzzHvSockRxTx(f *testing.F) {
|
||||
// fuzzing fails on windows 2019 for some reason, even though tests pass
|
||||
if _, _, build := windows.RtlGetNtVersionNumbers(); build <= 17763 {
|
||||
f.Skipf("build (%d) must be > %d", build, 17763)
|
||||
}
|
||||
|
||||
for _, b := range [][]byte{
|
||||
[]byte("hello?"),
|
||||
[]byte("This is a really long string that should be a good example of the really long " +
|
||||
|
||||
Reference in New Issue
Block a user