Page MenuHomeFreeBSD

tests/sys/netgraph/ng_macfilter_test: Fix invalid TAP output
ClosedPublic

Authored by arichardson on Mar 4 2021, 9:51 AM.

Details

Summary

This should allow the test to pass in Jenkins. Testing it locally now
reports "passed" instead of "invalid TAP data".

While touching this file also fix some shellcheck warnings that were
pointed out by my IDE.

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

_test_next () { TSTNR=$((TSTNR + 1)); }

is incorrect. It should be $(($TSTNR + 1)).

_test_next () { TSTNR=$((TSTNR + 1)); }

is incorrect. It should be $(($TSTNR + 1)).

It's not incorrect, just an unnecessary change. I made that change because shellcheck pointed it out to me (https://github.com/koalaman/shellcheck/wiki/SC2004).

  • Fix remaining SC2004 warnings
  • Fix uses of undefined variables (noticed by shellcheck)

ping? This test has been failing for the past 294 builds. I'd really like to get Jenkins back to green so we can catch real regressions.

This revision is now accepted and ready to land.Mar 11 2021, 3:02 PM
lwhsu added inline comments.
tests/sys/netgraph/ng_macfilter_test.sh
232

I feel this is easy to be forgot, but also not easy to change. The better approach might be migrating the test cases to use atf-sh.