summaryrefslogtreecommitdiffstats
path: root/tests/check_klog.sh
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2017-09-23 20:37:16 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2017-09-23 20:37:16 +0200
commitc841101b3d73722c67f24127c3de26e94e53ce8a (patch)
tree521133cb639bf88e2033603355d88df41a59b0b3 /tests/check_klog.sh
parentdbd6853f3151930fcd75b0740eea4f233606fd62 (diff)
testsuite: Make sure it can be run over ssh :-)
Diffstat (limited to 'tests/check_klog.sh')
-rwxr-xr-xtests/check_klog.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/check_klog.sh b/tests/check_klog.sh
index a39da77..146e492 100755
--- a/tests/check_klog.sh
+++ b/tests/check_klog.sh
@@ -5,6 +5,12 @@ set -e
# arguments: ipaddr proto port setname ...
+test -f .loglines || exit 1
+loglines=$(<.loglines)
+if [ $loglines -ne 0 ]; then
+ loglines=$((loglines - 1))
+fi
+
expand_ipv6() {
# incomplete, but for our addresses it's OK
addr=
@@ -37,7 +43,7 @@ proto=`echo $1 | tr a-z A-Z`; shift
port=$1; shift
for setname in $@; do
- match=`dmesg| tail -n 2 | grep -e "in set $setname: .* SRC=$ipaddr .* PROTO=$proto SPT=$port .*"`
+ match=`tail -n +$loglines /var/log/kern.log | grep -e "in set $setname: .* SRC=$ipaddr .* PROTO=$proto SPT=$port .*"`
if [ -z "$match" ]; then
echo "no match!"
exit 1