This commit is contained in:
Jes Cok 2023-09-23 07:20:37 +08:00
parent 4e8dcdba47
commit be865d67ef
2 changed files with 3 additions and 3 deletions

View file

@ -123,7 +123,7 @@ func conversionTests() []conversionTest {
{s: "256", d: &scanuint8, wanterr: "converting driver.Value type string (\"256\") to a uint8: value out of range"},
{s: "256", d: &scanuint16, wantuint: 256},
{s: "-1", d: &scanint, wantint: -1},
{s: "foo", d: &scanint, wanterr: "converting driver.Value type string (\"foo\") to an int: invalid syntax"},
{s: "foo", d: &scanint, wanterr: "converting driver.Value type string (\"foo\") to a int: invalid syntax"},
// int64 to smaller integers
{s: int64(5), d: &scanuint8, wantuint: 5},

View file

@ -581,9 +581,9 @@ func TestStatLxSymLink(t *testing.T) {
}
if m := fi.Mode(); m&fs.ModeSymlink != 0 {
// This can happen depending on newer WSL versions when running as admin or in developer mode.
t.Skip("skipping: WSL created reparse tag IO_REPARSE_TAG_SYMLINK instead of an IO_REPARSE_TAG_LX_SYMLINK")
t.Skip("skipping: WSL created reparse tag IO_REPARSE_TAG_SYMLINK instead of a IO_REPARSE_TAG_LX_SYMLINK")
}
// Stat'ing an IO_REPARSE_TAG_LX_SYMLINK from outside WSL always return ERROR_CANT_ACCESS_FILE.
// Stat'ing a IO_REPARSE_TAG_LX_SYMLINK from outside WSL always return ERROR_CANT_ACCESS_FILE.
// We check this condition to validate that os.Stat has tried to follow the link.
_, err = os.Stat(link)
const ERROR_CANT_ACCESS_FILE = syscall.Errno(1920)