Repository navigation
Conversation
|
Windows check of head Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.
AI-assisted: yes. |
gabichuuuuu
left a comment
There was a problem hiding this comment.
Windows run of head c24f3e625c, merged onto main 286b14d2f7 in one tree with 47 other small open PRs that touch different files. Setup: Windows 11, WinLibs GCC 15.2 r7 (x86_64-ucrt-posix-seh, the CI toolchain), Release, BUILD_TESTING=ON.
guest_kernel_sys_module_internalwith--repeat until-fail:5: 5 / 5 pass.- This PR only changes tests, so there's no negative control.
adriadam10
left a comment
There was a problem hiding this comment.
Thanks for the test. Two expectations no longer match main since ac1d6d7 (fix(libkernel_sys): answer raw __getcwd errors in FreeBSD's order and kinds), so the test fails once merged onto current main:
GuestKernelSysModuleInternal.cpp:135: a buffer one byte short returns -1 withENOMEM(Export.cpp:815), notERANGE. The raw__getcwdsyscall reports ENOMEM;ERANGEis what libc'sgetcwdderives from it.GuestKernelSysModuleInternal.cpp:148: a one-byte buffer returnsEINVAL(size < 2,Export.cpp:810), notERANGE.
Please rebase on main and change those two expectations (a size-0 or size-1 case for EINVAL is worth keeping). The Windows runs above predate that commit, so they don't cover this.
|
One detail for the line 135 case: at that point the guest working directory is still |
|
Tested head This PR makes Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release, AI-assisted: yes (Claude Code) |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
Nothing blocks this test-only change; the points below are optional.
What I ran
Reviewed head c24f3e625c4e5c59b7fb85edc1aaab1a94547263. I inspected the prepared diff and source; I ran no commands or tests.
Results
| Check | Result | Note |
|---|---|---|
| Changed test source | passed | Read in full |
| Related implementation and existing test | passed | Read relevant ranges |
| Build and test commands | not run | Author reports successful build and test |
Findings
Blocking
None.
Non-blocking
- The test removes
/cwd-testbefore creating it and ignores the removal result. If that path is a non-empty directory, creation will fail; consider using a unique test directory or checking cleanup before setup. (core/libs/tests/GuestKernelSysModuleInternal.cpp:127)
Not verified
No build or test was run in this review. The author's reported Linux build, test, conventions check, and diff check were not independently verified. The sole changed file, core/libs/tests/GuestKernelSysModuleInternal.cpp, was read in full; no files were excluded by the review manifest. The implementation and existing raw-getcwd test were read only in relevant ranges.
To get this to a good state
Nothing is required. The setup cleanup concern is optional.
What
Adds coverage for
libkernel_sys's__getcwd_nid_postfixto the existingguest_kernel_sys_module_internaltest: a valid buffer returns 0 and a/-rooted guest path, a buffer of the exact required size succeeds, one byte less returns -1 withERANGE, a null buffer returns -1 withEFAULT, and a one-byte buffer returns -1 withERANGE, and amkdir/chdir/__getcwd/chdir("/")/removecycle confirms the export tracks the guest working directory (the guestgetcwdpath returns a virtual path, not the host working directory). No production code changes.Tested
CachyOS Linux, kernel 7.3.1-1-cachyos, GCC 16.2.1, CMake 3.31.6, Ninja 1.12.1, Release build.
cmake --build build --target guest_kernel_sys_module_internal_tests: builds and links cleanly.ctest --test-dir build -R "^guest_kernel_sys_module_internal$" --output-on-failure: 1/1 pass.python3 tools/check_conventions.py --base origin/main: passes.git diff --check: clean.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)