From 84fc3594b8edd99c9468850381f1ec8df8e95f62 Mon Sep 17 00:00:00 2001 From: cadenasynyster <8373765+cadenasynyster@users.noreply.github.com> Date: Wed, 21 Oct 2026 23:31:35 +0200 Subject: [PATCH] test(libkernel): remove a leftover kernel_fcntl_probe.bin before guest_kernel_fcntl opens it FileFlagsRoundTrip opens kernel_fcntl_probe.bin with O_CREAT but without O_TRUNC and removes it only when every check passes. A run that aborts leaves the file behind, and every later run then fails at the FIONREAD check because the file is longer than the five bytes the test writes. The test now removes the file before opening it. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01GtXavMkgCTCdmRpweviHcQ --- core/libs/tests/GuestKernelFcntl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/core/libs/tests/GuestKernelFcntl.cpp b/core/libs/tests/GuestKernelFcntl.cpp index b75d3c22a961..e7f8e620369f 100644 --- a/core/libs/tests/GuestKernelFcntl.cpp +++ b/core/libs/tests/GuestKernelFcntl.cpp @@ -199,6 +199,7 @@ static void SocketsKeepTheirPath() { } static void FileFlagsRoundTrip() { + std::remove("kernel_fcntl_probe.bin"); const int file = sceKernelOpen("kernel_fcntl_probe.bin", CreateReadWrite, 0644); Require(file >= 0); Require(sceKernelFcntl(file, GetFlags) == ReadWrite);