Repository navigation
List every NetBSD thread with ps -s - #3817
Conversation
NetBSD's ps prints one row per process unless given -s, and that row carries only the process's first LWP. getThreadDetails() therefore returned a single thread per process, and getCurrentThread() found no row for any thread but the first, so its details came back empty. Both lookups now use one command constant, NetBsdOSThread.PS_THREAD_COMMAND, which includes -s. Verified on NetBSD 10.1 aarch64 (cfarm428): pid 0 now reports 211 threads, matching ps -s; the current thread has real state, CPU time and context switches with JNA native and with FFM; the full test suite passes.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📜 Recent review details
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3817 +/- ##
============================================
- Coverage 80.85% 80.84% -0.02%
- Complexity 648 671 +23
============================================
Files 725 725
Lines 26044 26045 +1
Branches 4422 4422
============================================
- Hits 21058 21055 -3
- Misses 2768 2770 +2
- Partials 2218 2220 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
NetBSD's
psprints one row per process unless it is given-s, and that row carries only the process's first LWP. SoOSProcess.getThreadDetails()returned one thread per process, andOperatingSystem.getCurrentThread()found no row for any thread but the first, which left its details empty.Both lookups now use a single command constant,
NetBsdOSThread.PS_THREAD_COMMAND, which includes-s. Before, each built its own copy of the command.Verified on NetBSD 10.1 aarch64 (cfarm428):
getThreadCount()andgetThreadDetails(), matchingps -s(before: 1 detail row)../mvnw clean test -Paggregate-coveragepasses in every module.No new unit test: the parsing is unchanged; only the
-sflag is new.Summary by CodeRabbit