Bump DeviceHost to 1.2.48-0 and enable virtiofs O_APPEND ftruncate test (#41044)
* test(drvfs): run O_APPEND ftruncate test on virtiofs The wsldevicehost fix for GitHub issue #40987 ships, so remove the virtiofs skip and run the O_APPEND ftruncate regression test on all filesystems. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Bump Microsoft.WSL.DeviceHost to 1.2.48-0 Pick up the wsldevicehost fix for the O_APPEND ftruncate EACCES bug on virtiofs (GitHub issue #40987). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ben Hillis committed
Jul 9, 2026 at 15:43 UTC
7cbdb70535978834d52a3b0780b159e49099708d
2 files changed
+9
-20
packages.config
+1
-1
@@ -19,7 +19,7 @@
19
<package id="Microsoft.WSL.bsdtar" version="0.0.2-2" />
20
<package id="Microsoft.WSL.Dependencies.amd64fre" version="10.0.27820.1000-250318-1700.rs-base2-hyp" targetFramework="native" />
21
<package id="Microsoft.WSL.Dependencies.arm64fre" version="10.0.27820.1000-250318-1700.rs-base2-hyp" targetFramework="native" />
22
- <package id="Microsoft.WSL.DeviceHost" version="1.2.39-0" />
22
+ <package id="Microsoft.WSL.DeviceHost" version="1.2.48-0" />
23
<package id="Microsoft.WSL.Kernel" version="6.18.35.2-1" targetFramework="native" />
24
<package id="Microsoft.WSL.LinuxSdk" version="1.20.0" targetFramework="native" />
25
<package id="Microsoft.WSL.TestData" version="0.4.0" />
test/linux/unit_tests/drvfs.c
+8
-19
@@ -1074,26 +1074,15 @@ Return Value:
1074
// Regression test for a virtiofs bug where ftruncate returned EACCES on an
1075
// append-mode descriptor (GitHub issue #40987).
1076
//
1077
- // TODO: Remove the virtiofs skip once the wsldevicehost fix ships (the
1078
- // Windows lxutil file server strips FILE_WRITE_DATA for O_APPEND, causing
1079
- // SetEndOfFile to fail with access denied).
1080
- //
1077
1082
- if (g_LxtFsInfo.FsType == LxtFsTypeVirtioFs)
1083
- {
1084
- LxtLogInfo("Skipping O_APPEND ftruncate test on virtiofs (see GitHub issue #40987).");
1085
- }
1086
- else
1087
- {
1088
- LxtCheckErrno(Fd = open(DRVFS_BASIC_PREFIX "/test", O_WRONLY | O_APPEND, 0666));
1089
- LxtCheckErrno(Size = write(Fd, "hello", 5));
1090
- LxtCheckEqual(Size, 5, "%ld");
1091
- LxtCheckErrnoZeroSuccess(ftruncate(Fd, 0));
1092
- LxtCheckErrnoZeroSuccess(ftruncate(Fd, 1));
1093
- LxtCheckClose(Fd);
1094
- LxtCheckErrnoZeroSuccess(stat(DRVFS_BASIC_PREFIX "/test", &Stat));
1095
- LxtCheckEqual(Stat.st_size, 1, "%lld");
1096
- }
1078
+ LxtCheckErrno(Fd = open(DRVFS_BASIC_PREFIX "/test", O_WRONLY | O_APPEND, 0666));
1079
+ LxtCheckErrno(Size = write(Fd, "hello", 5));
1080
+ LxtCheckEqual(Size, 5, "%ld");
1081
+ LxtCheckErrnoZeroSuccess(ftruncate(Fd, 0));
1082
+ LxtCheckErrnoZeroSuccess(ftruncate(Fd, 1));
1083
+ LxtCheckClose(Fd);
1084
+ LxtCheckErrnoZeroSuccess(stat(DRVFS_BASIC_PREFIX "/test", &Stat));
1085
+ LxtCheckEqual(Stat.st_size, 1, "%lld");
1086
1087
//
1088
// Creating/removing items relative to the current working directory.