Skip to content

pbr-1.2.4: make the IPv4 validation test check is_ipv4() - #208

Merged
stangri merged 1 commit into
mossdef-org:1.2.4from
egc112:pbr-1.2.4-tests-ipv4-validation
Nov 9, 2026
Merged

stangri merged 1 commit into
mossdef-org:1.2.4from
egc112:pbr-1.2.4-tests-ipv4-validation

Conversation

@egc112

@egc112 egc112 commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

The test built a table of cases and looped over it without calling anything, then printed the package name and version. It passed with is_ipv4() hard-wired to true and hard-wired to false. Its comments said is_ipv4() is not exported, which stopped being true when the validators moved to their own module.

Call is_ipv4() through create_validators(), as the domain test does, and fail on any difference. The 17 original cases stay, with boundaries added for every branch of the pattern in both octet groups, and for the prefix length. filter_options() is covered too, as that is how pbr sorts a policy's addresses by family.

Reported by the review of openwrt/packages#31156.

Assisted-by: Claude:claude-opus-5-5

The test built a table of cases and looped over it without calling
anything, then printed the package name and version. It passed with
is_ipv4() hard-wired to true and hard-wired to false. Its comments said
is_ipv4() is not exported, which stopped being true when the validators
moved to their own module.

Call is_ipv4() through create_validators(), as the domain test does, and
fail on any difference. The 17 original cases stay, with boundaries added
for every branch of the pattern in both octet groups, and for the prefix
length. filter_options() is covered too, as that is how pbr sorts a
policy's addresses by family.

Reported by the review of openwrt/packages#31156.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Erik Conijn <egc112@msn.com>
@stangri
stangri merged commit 7b43563 into mossdef-org:1.2.4 Nov 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants