Four complete test files under core/libs/tests/ are never built or run #17

Closed
opened 2026-09-26 20:24:48 +00:00 by obelisk-complex · 0 comments
obelisk-complex commented 2026-09-26 20:24:48 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by obelisk-complex on 2026-09-26T20:24:48Z.


core/libs/tests/ExceptionRuntime.cpp (211 lines), PthreadStart.cpp (105 lines), FileStreams.cpp (67 lines) and Formatting.cpp (87 lines) are complete, real tests, not stubs, but none is referenced by any CMakeLists.txt anywhere in the tree, so none is ever compiled or run. git log shows they were added in real feature/fix commits alongside production code, so they were written to run and then lost.

ExceptionRuntime.cpp is the most consequential: it covers RTTI across virtual/diamond/private inheritance, foreign-exception interop, __cxa_vec_new3/__cxa_vec_delete3 array-construction cleanup on partial failure, multi-threaded exception handling, and forced unwind. None of this is exercised anywhere else in the current suite.

The other three have genuinely bitrotted since being orphaned, independent of the wiring problem itself:

  • PthreadStart.cpp includes prx/libkernel/Pthread/Pthread.hpp, which moved to prx/libkernel/Pthread/include/Pthread.hpp at some point after this test was written.
  • FileStreams.cpp expects fseek to throw std::runtime_error on an invalid whence value; the current implementation returns -1 with errno set instead.
  • Formatting.cpp expects a VaList passed to vsnprintf to be byte-identical afterwards; the implementation mutates it in place while consuming arguments, which is normal SysV va_list-by-reference behaviour, so the test's own assumption no longer holds.

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5597056046 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/17). Originally posted by [obelisk-complex](https://github.com/obelisk-complex) on 2026-09-26T20:24:48Z. --- `core/libs/tests/ExceptionRuntime.cpp` (211 lines), `PthreadStart.cpp` (105 lines), `FileStreams.cpp` (67 lines) and `Formatting.cpp` (87 lines) are complete, real tests, not stubs, but none is referenced by any `CMakeLists.txt` anywhere in the tree, so none is ever compiled or run. `git log` shows they were added in real feature/fix commits alongside production code, so they were written to run and then lost. `ExceptionRuntime.cpp` is the most consequential: it covers RTTI across virtual/diamond/private inheritance, foreign-exception interop, `__cxa_vec_new3`/`__cxa_vec_delete3` array-construction cleanup on partial failure, multi-threaded exception handling, and forced unwind. None of this is exercised anywhere else in the current suite. The other three have genuinely bitrotted since being orphaned, independent of the wiring problem itself: - `PthreadStart.cpp` includes `prx/libkernel/Pthread/Pthread.hpp`, which moved to `prx/libkernel/Pthread/include/Pthread.hpp` at some point after this test was written. - `FileStreams.cpp` expects `fseek` to throw `std::runtime_error` on an invalid whence value; the current implementation returns `-1` with `errno` set instead. - `Formatting.cpp` expects a `VaList` passed to `vsnprintf` to be byte-identical afterwards; the implementation mutates it in place while consuming arguments, which is normal SysV `va_list`-by-reference behaviour, so the test's own assumption no longer holds. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
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#17
No description provided.