feat: add 6 validators (batch 1/5) - cpuset_partition, sr_iov_{boolean,uint32}, managed_oom_mem_pressure_{limit,duration_sec}, dhcp_server_emit#445
Conversation
…anaged_oom_mem_pressure_{limit,duration_sec}, dhcp_server_emit (Resolves #444)
First of ~5 batches to extend the OptionValueTest burn-down buffer through July.
Each grammar mirrors the systemd C parser semantics:
- config_parse_cpuset_partition: enum member|root|isolated (DEFINE_CONFIG_PARSE_ENUM_WITH_DEFAULT)
- config_parse_sr_iov_boolean: plain parse_boolean
- config_parse_sr_iov_uint32: conservative uint32 (per-lvalue bounds skipped — no lvalue access)
- config_parse_managed_oom_mem_pressure_limit: parse_permyriad, ASCII % form (0..100(.NN)?%)
- config_parse_managed_oom_mem_pressure_duration_sec: parse_sec time value (>= 1s constraint
is semantic and not expressible in grammar)
- config_parse_dhcp_server_emit: whitespace-separated list of IPv4 addresses or _server_address;
used by DHCPServer.DNS=/NTP=/SIP=/POP3=/SMTP=/LPR= (not the EmitDNS= booleans)
OptionValueTest missing-function count drops 400 -> 394; found-key count rises 1744 -> 1780.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Test Results1 036 tests 1 036 ✅ 42s ⏱️ Results for commit fec6ab3. |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First of 5 planned batches to extend the
OptionValueTestburn-down buffer through July. Each grammar mirrors the systemd C parser semantics rather than guessing from man-page prose.config_parse_cpuset_partition(0)cgroup-util.c:134member/root/isolatedconfig_parse_sr_iov_boolean(0)netif-sriov.c:549parse_boolean— reuseBOOLEANconfig_parse_sr_iov_uint32(0)netif-sriov.c:393config_parse_managed_oom_mem_pressure_limit(0)load-fragment.c:4017parse_permyriad, ASCII % formconfig_parse_managed_oom_mem_pressure_duration_sec(0)load-fragment.c:4055parse_sectime value (TIME_VALUE)config_parse_dhcp_server_emit(0)networkd-dhcp-server.c:827_server_addressResolves #444.
Results
OptionValueTestmissing functions: 400 → 394 (−6)Test plan
OptionValueTestpassesSemanticDataRepositoryTestpasses./gradlew test -x generateDataFromManPages)Notes
dhcp_server_emitwas used byDHCPServer.DNS=/NTP=/SIP=/POP3=/SMTP=/LPR=(not theEmitDNS=-style booleans, which are separateconfig_parse_boolentries — easy mistake when looking at the function name).sr_iov_*tests target.linkfiles, not.network— the project only lists[SR-IOV]as a valid section in link files even though the gperf appears in both.managed_oom_mem_pressure_duration_secenforces>= 1sat the C semantic layer; that can't be expressed in the grammar, so a runtime warning at unit-load remains the only catch for values like500ms.Skipped from the original candidate list:
config_parse_set_status(0)— accepts list of exit codes + signal names, too many enum values to mirror cleanlyconfig_parse_delegate_subgroup(0)— needscg_needs_escapesemantics, hard to validate cheaply🤖 Generated with Claude Code