test(libSceNet): skip IPv6 datagram receive cases without an IPv6 loopback #7847
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7847"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by MarrasFederico on 2026-10-19T10:41:12Z.
What
guest_datagram_recv,guest_datagram_recvfrom,guest_datagram_sceNetRecvandguest_datagram_sceNetRecvfromfail withbind loopback socketson a Linux host whose kernel has IPv6 but whose loopback has it disabled (net.ipv6.conf.lo.disable_ipv6=1, so::1is not assigned). There the IPv6 socket is created andbindto::1fails withEADDRNOTAVAIL, which the test treats as a failure.The test now skips its IPv6 case when socket creation fails with
EAFNOSUPPORT(47) or the bind to::1fails withEADDRNOTAVAIL(49), through__errororsceNetErrnoLocdepending on the API under test. This is the same ruleGuestUdp.cppandGuestSocketPortZero.cppalready use, and the same host condition #2820 fixed forguest_sce_net. The IPv4 case and the IPv6 case on hosts with a usable::1are unchanged.Tested
Ubuntu 26.04.1, kernel 7.0.0-38, GCC 15.2.0, Release, full build with
BUILD_TESTING=ON.disable_ipv6=1onlo: onmainthe fourguest_datagram_*tests fail withbind loopback sockets; with this change they pass.straceshows the IPv4 binds succeed and the IPv6 bind returnsEADDRNOTAVAIL, after which the case is skipped.lo(unshare -rn,::1assigned): all four pass, andstraceshows the IPv6 sockets are bound to::1and receive the datagrams, so the IPv6 case still runs where it can.guest_udp,guest_socket_port_zeroandguest_sce_netgive the same results as onmain.ctestonmainc74aeb2f4on this host (RTX 5060 Ti, NVIDIA 595.99.02): 1583 of 1589 passed; the fourguest_datagram_*tests were the only failures that also failed when run alone.tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.pylists #6044, which only moves this file totests/networking/without changing its content.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)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T10:45:11Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/tests/GuestDatagramReceive.cppImported from boykopovar/AnyPS5. Originally posted by fogydes on 2026-10-19T12:07:18Z.
Review: APPROVED
Built and verified locally on Windows 11 with WinLibs MinGW-w64 GCC 15.2.0, Release (
-DBUILD_TESTING=ON):guest_datagram_receive_testsbuilds cleanly with Ninja.ctest --test-dir build-libs -R "guest_datagram_" --output-on-failure:guest_datagram_recv: Passed (0.11s)guest_datagram_recvfrom: Passed (0.02s)guest_datagram_sceNetRecv: Passed (0.03s)guest_datagram_sceNetRecvfrom: Passed (0.02s)All 4/4 tests passed in 0.23s.
tools/check_conventions.py --base origin/mainpasses with zero findings.tests/networking/.The skip conditions align with
GuestSceNet.cpp(EAFNOSUPPORT47 andEADDRNOTAVAIL49). Clean micro-PR.AI-assisted: yes