mirror of
https://github.com/firehol/firehol.git
synced 2024-06-28 18:02:33 +00:00
Further unit test hardening
This commit is contained in:
parent
022c26ddb2
commit
a6a9008c43
@ -33,6 +33,7 @@ endif
|
||||
TOOLS = \
|
||||
README.md \
|
||||
tools/clean-class \
|
||||
tools/clean-filter \
|
||||
tools/clean-iptables \
|
||||
tools/clean-qdisc \
|
||||
tools/clean-rules \
|
||||
|
@ -2,5 +2,6 @@
|
||||
|
||||
while (<>) {
|
||||
s/Kbit/000bit/g;
|
||||
if (/8000/) { s/ prio r/ prio 1 r/g; } else { s/ prio r/ prio 0 r/g; }
|
||||
print;
|
||||
}
|
||||
|
7
tests/tools/clean-filter
Executable file
7
tests/tools/clean-filter
Executable file
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
while (<>) {
|
||||
s/chain 0 //;
|
||||
s/ not_in_hw//;
|
||||
print;
|
||||
}
|
@ -3,6 +3,7 @@
|
||||
my @lines;
|
||||
while (<>) {
|
||||
s/ memory_limit [^ ]*//g;
|
||||
s/ default 32768 / default 8000 /g;
|
||||
push @lines, $_;
|
||||
}
|
||||
|
||||
|
@ -301,6 +301,7 @@ do
|
||||
CACHE_DIR=/var/run/firehol/update-ipsets/cache
|
||||
LIB_DIR=/var/run/firehol/update-ipsets/lib
|
||||
WEB_DIR=/var/run/firehol/webdir
|
||||
FIREQOS_INTERFACE_DEFAULT_CLASSID=8000
|
||||
export PATH=
|
||||
!
|
||||
|
||||
@ -385,9 +386,10 @@ do
|
||||
fireqos)
|
||||
tc qdisc show dev veth0 > "$outqdisc.raw"
|
||||
tc class show dev veth0 > "$outclass".raw
|
||||
tc filter show dev veth0 > "$outfilter"
|
||||
tc filter show dev veth0 > "$outfilter".raw
|
||||
$dirname/tools/clean-qdisc "$outqdisc".raw > "$outqdisc"
|
||||
$dirname/tools/clean-class "$outclass".raw > "$outclass"
|
||||
$dirname/tools/clean-filter "$outfilter".raw > "$outfilter"
|
||||
if ! cmp "$audqdisc" "$outqdisc"
|
||||
then
|
||||
errors=$((errors + 1))
|
||||
|
Loading…
Reference in New Issue
Block a user