Skip to content

fix policy routing (PBR) test for known priority

Thomas Haller requested to merge th/pbr-fixed-priority into master

The step "Create PBR files for profile..." wrote rules without specifying a priorty. When omitting the priority with ip rule add, kernel automatically chooses a priority (one less than the lowest existing priority).

The test breaks if there are unexpected rules there. That can be the case when the VRF module is loaded (which adds a rule "1000:from all lookup [l3mdev-table]").

Avoid that by explicitly selecting the rule priority.

While at it, reduce the sleep(3) to sleep(1). That really should suffice, especially because the behave step only writes a file. It's unclear why we sleep there at all.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1851762

Merge request reports