Commit ab446f3
committed
[getconf] macos testing fixes
Completed Fixes
| Fix | Description | Status |
|-------|--------------------------------------------------------------------------------------------------------------------------------|--------|
| Fix 1 | Proper errno checking - outputs "undefined" with exit 0 instead of error when sysconf/pathconf returns -1 with errno unchanged | ✅ |
| Fix 2 | POSIX2_* compatibility aliases (POSIX2_VERSION, POSIX2_C_DEV, POSIX2_LINE_MAX, etc.) | ✅ |
| Fix 3 | Added missing sysconf variables (PAGESIZE, _POSIX_VERSION, HOST_NAME_MAX, _XOPEN_VERSION, etc.) | ✅ |
| Fix 4 | Fixed confstr output to trim null byte | ✅ |
| Fix 5 | Clean error message format (no Rust debug output) | ✅ |
| Fix 6 | Handle -v option properly (emit "unsupported specification" error) | ✅ |
| Fix 7 | Added POSIX_V6_* confstr variables on macOS | ✅ |
Files Modified
- sys/getconf.rs - Main implementation
- sys/Cargo.toml - Added errno dependency
Test Results
All tests pass and outputs match the system getconf:
- sysconf variables (ARG_MAX, NGROUPS_MAX, PAGESIZE, etc.)
- POSIX2_* compatibility names
- "undefined" handling for unsupported variables
- pathconf variables (NAME_MAX, PATH_MAX, etc.)
- confstr variables (PATH, POSIX_V6_WIDTH_RESTRICTED_ENVS, etc.)1 parent 0d0f27e commit ab446f3
3 files changed
+280
-68
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
0 commit comments