test(libSceNet): accept every unusable IPv6 loopback error in guest_sce_net #7987

Merged
MarrasFederico merged 1 commit from upstream-pr/7987 into main 2026-10-20 01:53:05 +00:00
MarrasFederico commented 2026-10-19 17:06:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarrasFederico on 2026-10-19T17:06:13Z.


What

guest_sce_net aborts in CheckUnspecifiedIpv6 on a Linux host whose kernel has IPv6 but where ::1 is unusable. The test skips its IPv6 checks when sceNetSendto to ::1 fails and HostIpv6LoopbackUnavailable confirms the host cannot reach ::1. The host probe accepts EADDRNOTAVAIL, ENETUNREACH and EHOSTUNREACH, but the guest check accepted only ENETUNREACH (51). On the same machine, which has no IPv6 address or route, the host sendto to ::1 failed with ENETUNREACH earlier in the day and with EADDRNOTAVAIL later (strace: sendto(..., inet_pton(AF_INET6, "::1", ...)) = -1 EADDRNOTAVAIL), with no change to the code in between. The guest then sees 49, the skip is not taken and Require(sent == sizeof(payload)) aborts.

The guest check now accepts the FreeBSD numbers of the same three errors the host probe accepts: 49, 51 and 65. Hosts with a usable ::1 still run every IPv6 check.

Same host condition as the merged #7847 (guest_datagram_*) and the closed #2820 (guest_sce_net), in a different test.

Tested

Ubuntu 26.04.1, kernel 7.0.0-38, GCC 15.2.0, Release, full build with BUILD_TESTING=ON.

  • Host with net.ipv6.conf.lo.disable_ipv6=1 and no IPv6 route: main aborts (exit 134, gdb stops in CheckUnspecifiedIpv6); with this change it skips (exit 77, Skipped in ctest).
  • Network namespace with IPv6 on lo (unshare -rn, ::1 assigned): passes (exit 0), and strace shows the IPv6 sends to ::1 succeed, so the IPv6 checks still run.
  • Network namespace with IPv6 disabled on lo: skips (exit 77).
  • tools/check_conventions.py --base origin/main passes. tools/pr_overlap.py lists #5836, #6044 and #7332 as touching GuestSceNet.cpp; none of them changes this line.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4924532698 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7987). Originally posted by [MarrasFederico](https://github.com/MarrasFederico) on 2026-10-19T17:06:13Z. --- ### What `guest_sce_net` aborts in `CheckUnspecifiedIpv6` on a Linux host whose kernel has IPv6 but where `::1` is unusable. The test skips its IPv6 checks when `sceNetSendto` to `::1` fails and `HostIpv6LoopbackUnavailable` confirms the host cannot reach `::1`. The host probe accepts `EADDRNOTAVAIL`, `ENETUNREACH` and `EHOSTUNREACH`, but the guest check accepted only `ENETUNREACH` (51). On the same machine, which has no IPv6 address or route, the host `sendto` to `::1` failed with `ENETUNREACH` earlier in the day and with `EADDRNOTAVAIL` later (strace: `sendto(..., inet_pton(AF_INET6, "::1", ...)) = -1 EADDRNOTAVAIL`), with no change to the code in between. The guest then sees 49, the skip is not taken and `Require(sent == sizeof(payload))` aborts. The guest check now accepts the FreeBSD numbers of the same three errors the host probe accepts: 49, 51 and 65. Hosts with a usable `::1` still run every IPv6 check. Same host condition as the merged #7847 (`guest_datagram_*`) and the closed #2820 (`guest_sce_net`), in a different test. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Ubuntu 26.04.1, kernel 7.0.0-38, GCC 15.2.0, Release, full build with `BUILD_TESTING=ON`. - Host with `net.ipv6.conf.lo.disable_ipv6=1` and no IPv6 route: `main` aborts (exit 134, `gdb` stops in `CheckUnspecifiedIpv6`); with this change it skips (exit 77, `Skipped` in ctest). - Network namespace with IPv6 on `lo` (`unshare -rn`, `::1` assigned): passes (exit 0), and `strace` shows the IPv6 sends to `::1` succeed, so the IPv6 checks still run. - Network namespace with IPv6 disabled on `lo`: skips (exit 77). - `tools/check_conventions.py --base origin/main` passes. `tools/pr_overlap.py` lists #5836, #6044 and #7332 as touching `GuestSceNet.cpp`; none of them changes this line. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: n/a <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no -->
github-actions[bot] commented 2026-10-19 17:33:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T17:33:24Z.


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.

Pull request Shared files not compared
PR 5836 core/libs/tests/GuestSceNet.cpp
PR 6044 core/libs/tests/GuestSceNet.cpp
PR 7332 core/libs/tests/GuestSceNet.cpp
PR 7959 core/libs/tests/GuestSceNet.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6273264301 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7987#issuecomment-6273264301). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-19T17:33:24Z. --- <!-- pr-overlap --> 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. | Pull request | Shared files not compared | |---|---| | [PR 5836](https://www.github.com/boykopovar/AnyPS5/pull/5836) | `core/libs/tests/GuestSceNet.cpp` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/GuestSceNet.cpp` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `core/libs/tests/GuestSceNet.cpp` | | [PR 7959](https://www.github.com/boykopovar/AnyPS5/pull/7959) | `core/libs/tests/GuestSceNet.cpp` |
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!7987
No description provided.