Update Microsoft.WSL.Kernel to 6.18.26.1 (#40161)
* Update Microsoft.WSL.Kernel to 6.18.26.1-1 * Update tests for Linux 6.18 kernel behavior changes Adjust eventfd size validation, lxtfs writev, and mount option format expectations to match 6.18 kernel behavior. * Update test patterns for new kernel /proc/mounts cache format The kernel now outputs cache=0x5 (hex) instead of cache=5 (decimal) in /proc/mounts for 9p filesystems. Update the ExpectMount patterns in WSLCTests::WindowsMounts and WSLCTests::GPU to match the new format. --------- Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Mitchell Levy committed
May 8, 2026 at 10:45 UTC
4b415844c70ad4553451bbe96436d42456f54642
5 files changed
+17
-26
packages.config
+1
-1
@@ -20,7 +20,7 @@
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.23-0" />
23
- <package id="Microsoft.WSL.Kernel" version="6.6.114.1-1" targetFramework="native" />
23
+ <package id="Microsoft.WSL.Kernel" version="6.18.26.1-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" />
26
<package id="Microsoft.WSL.TestDistro" version="2.7.1-1" />
test/linux/unit_tests/eventfd.c
+2
-2
@@ -248,12 +248,12 @@ int EventFdVariationReadWrite(PLXT_ARGS Args)
248
249
memset(&LargeValue, 0, sizeof(LargeValue));
250
LargeValue.Value = 1;
251
- Size = write(Fd, &LargeValue, sizeof(LargeValue));
251
+ Size = write(Fd, &LargeValue, sizeof(LargeValue.Value));
252
LxtCheckEqual(Size, sizeof(LargeValue.Value), "%lld");
253
LxtCheckEqual(LargeValue.Value, 1, "%llu");
254
255
LargeValue.Value = 0;
256
- Size = read(Fd, &LargeValue, sizeof(LargeValue));
256
+ Size = read(Fd, &LargeValue, sizeof(LargeValue.Value));
257
LxtCheckEqual(Size, sizeof(LargeValue.Value), "%lld");
258
LxtCheckEqual(LargeValue.Value, 1, "%llu");
259
test/linux/unit_tests/lxtfs.c
+11
-20
@@ -285,7 +285,7 @@ Return Value:
285
snprintf(
286
Plan9Options,
287
sizeof(Plan9Options),
288
- "aname=drvfs;path=%s%s;symlinkroot=/mnt/,cache=5,access=client,msize=262144,trans=virtio",
288
+ "aname=drvfs;path=%s%s;symlinkroot=/mnt/,cache=0x5,access=client,msize=262144,trans=virtio",
289
Plan9Source,
290
Temp);
291
}
@@ -294,7 +294,7 @@ Return Value:
294
snprintf(
295
Plan9Options,
296
sizeof(Plan9Options),
297
- "aname=drvfs;path=%s%s;symlinkroot=/mnt/,cache=5,access=client,msize=65536,trans=fd,rfd=*,wfd=*",
297
+ "aname=drvfs;path=%s%s;symlinkroot=/mnt/,cache=0x5,access=client,msize=65536,trans=fd,rfd=*,wfd=*",
298
Plan9Source,
299
Temp);
300
}
@@ -3652,8 +3652,6 @@ Return Value:
3652
// Test an invalid buffer after a valid buffer. The writev call should return the
3653
// number of bytes written until the invalid buffer.
3654
//
3655
- // N.B. The plan 9 client does not follow this behavior, and will write nothing.
3656
- //
3655
3656
LxtCheckErrno(FileDescriptor = open(TestFile, O_RDWR | O_CREAT | O_TRUNC, S_IRWXU));
3657
memset(Iov, 0, sizeof(Iov));
@@ -3664,23 +3662,16 @@ Return Value:
3662
Iov[2].iov_base = ContentB;
3663
Iov[2].iov_len = sizeof(ContentB);
3664
LxtLogInfo("%d", g_LxtFsInfo.FsType);
3667
- if (g_LxtFsInfo.FsType == LxtFsTypePlan9)
3668
- {
3669
- LxtCheckErrnoFailure(Bytes = writev(FileDescriptor, Iov, 3), EFAULT);
3670
- }
3671
- else
3672
- {
3673
- LxtCheckErrno(Bytes = writev(FileDescriptor, Iov, 3));
3674
- LxtCheckEqual(Bytes, sizeof(ContentA), "%d");
3675
- LxtCheckErrno(close(FileDescriptor));
3665
+ LxtCheckErrno(Bytes = writev(FileDescriptor, Iov, 3));
3666
+ LxtCheckEqual(Bytes, sizeof(ContentA), "%d");
3667
+ LxtCheckErrno(close(FileDescriptor));
3668
3677
- LxtCheckErrno(FileDescriptor = open(TestFile, O_RDWR, S_IRWXU));
3678
- memset(Buffer, 0, sizeof(Buffer));
3679
- LxtCheckErrno(Bytes = read(FileDescriptor, Buffer, sizeof(ContentA)));
3680
- LxtCheckEqual(Bytes, sizeof(ContentA), "%d");
3681
- LxtCheckErrno(Bytes = read(FileDescriptor, Buffer, sizeof(ContentB)));
3682
- LxtCheckEqual(Bytes, 0, "%d");
3683
- }
3669
+ LxtCheckErrno(FileDescriptor = open(TestFile, O_RDWR, S_IRWXU));
3670
+ memset(Buffer, 0, sizeof(Buffer));
3671
+ LxtCheckErrno(Bytes = read(FileDescriptor, Buffer, sizeof(ContentA)));
3672
+ LxtCheckEqual(Bytes, sizeof(ContentA), "%d");
3673
+ LxtCheckErrno(Bytes = read(FileDescriptor, Buffer, sizeof(ContentB)));
3674
+ LxtCheckEqual(Bytes, 0, "%d");
3675
3676
Result = LXT_RESULT_SUCCESS;
3677
test/windows/UnitTests.cpp
+1
-1
@@ -1809,7 +1809,7 @@ Error code: Wsl/InstallDistro/WSL_E_DISTRO_NOT_FOUND
1809
VERIFY_ARE_EQUAL(
1810
LxsstuLaunchWsl(
1811
L"mount | grep -iF '" TEXT(
1812
- LXSS_GPU_DRIVERS_SHARE) L" on /usr/lib/wsl/drivers type 9p (ro,nosuid,nodev,noatime,aname=" TEXT(LXSS_GPU_DRIVERS_SHARE) L";fmask=222;dmask=222,cache=5,access=client,msize=65536,trans=fd,rfd=8,wfd=8)'",
1812
+ LXSS_GPU_DRIVERS_SHARE) L" on /usr/lib/wsl/drivers type 9p (ro,nosuid,nodev,noatime,aname=" TEXT(LXSS_GPU_DRIVERS_SHARE) L";fmask=222;dmask=222,cache=0x5,access=client,msize=65536,trans=fd,rfd=8,wfd=8)'",
1813
nullptr,
1814
nullptr,
1815
nullptr,
test/windows/WSLCTests.cpp
+2
-2
@@ -3171,7 +3171,7 @@ class WSLCTests
3171
else
3172
{
3173
return std::format(
3174
- "/win-path*9p*{},relatime,aname=*,cache=5,access=client,msize=65536,trans=fd,rfd=*,wfd=*", readOnly ? "ro" : "rw");
3174
+ "/win-path*9p*{},relatime,aname=*,cache=0x5,access=client,msize=65536,trans=fd,rfd=*,wfd=*", readOnly ? "ro" : "rw");
3175
}
3176
};
3177
@@ -3368,7 +3368,7 @@ class WSLCTests
3368
ExpectMount(
3369
session.get(),
3370
"/usr/lib/wsl/drivers",
3371
- "/usr/lib/wsl/drivers*9p*relatime,aname=*,cache=5,access=client,msize=65536,trans=fd,rfd=*,wfd=*");
3371
+ "/usr/lib/wsl/drivers*9p*relatime,aname=*,cache=0x5,access=client,msize=65536,trans=fd,rfd=*,wfd=*");
3372
3373
ExpectMount(
3374
session.get(),