diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-06-22 14:33:15 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-06-22 14:33:15 +0300 |
commit | f7f08b5714cf610d05ea045fed27213d29e8aed2 (patch) | |
tree | 7e114524d76a3e18e0e4937b82cdfdcbead12a31 | |
parent | 56ea298ec30d8ca6496101d6666aed9e85313be9 (diff) | |
download | slb-f7f08b5714cf610d05ea045fed27213d29e8aed2.tar.gz slb-f7f08b5714cf610d05ea045fed27213d29e8aed2.tar.bz2 |
New testcase.
* tests/overflow.at: New file.
* tests/Makefile.am: Add overflow.at
* tests/testsuite.at: Include overflow.at.
-rw-r--r-- | tests/Makefile.am | 1 | ||||
-rw-r--r-- | tests/overflow.at | 64 | ||||
-rw-r--r-- | tests/testsuite.at | 1 |
3 files changed, 66 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 4aa3430..537360c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -57,6 +57,7 @@ TESTSUITE_AT = \ min.at\ max.at\ or.at\ + overflow.at\ round.at\ sqrt.at\ ternarith.at\ diff --git a/tests/overflow.at b/tests/overflow.at new file mode 100644 index 0000000..be70842 --- /dev/null +++ b/tests/overflow.at @@ -0,0 +1,64 @@ +# This file is part of SLB -*- Autotest -*- +# Copyright (C) 2011 Sergey Poznyakoff +# +# SLB is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# SLB is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SLB. If not, see <http://www.gnu.org/licenses/>. + +AT_SETUP([counter overflow]) +AT_KEYWORDS([overflow]) + +AT_DATA([input],[srv1: +.1.3.6.1.2.1.2.2.1.11.3 c 1000000000 +.1.3.6.1.2.1.2.2.1.17.3 c 4293738000 + +srv1: +.1.3.6.1.2.1.2.2.1.11.3 c 1000009450 +.1.3.6.1.2.1.2.2.1.17.3 c 4293738948 + +srv1: +.1.3.6.1.2.1.2.2.1.11.3 c 1000012036 +.1.3.6.1.2.1.2.2.1.17.3 c 256775 + +srv1: +.1.3.6.1.2.1.2.2.1.11.3 c 1000028903 +.1.3.6.1.2.1.2.2.1.17.3 c 257891 + +srv1: +.1.3.6.1.2.1.2.2.1.11.3 c 1000045984 +.1.3.6.1.2.1.2.2.1.17.3 c 259120 + +]) + +SLB_TEST([input], +[wakeup 30; +expression pkts "d(in) + d(out)"; +output-format "%i %w\n"; + +server "srv1" { + host "192.168.0.1"; + community "public"; + variable in "1.3.6.1.2.1.2.2.1.11.3"; + variable out ".1.3.6.1.2.1.2.2.1.17.3"; + expression "@pkts"; +} +], +[srv1 346.600000 +srv1 610.333333 +], +[slb: [[WARNING]] nothing to output +slb: [[NOTICE]] server srv1: variable out overflow (old=4293738948.000000, new=256775.000000) +slb: [[WARNING]] nothing to output +slb: [[WARNING]] nothing to output +]) + +AT_CLEANUP
\ No newline at end of file diff --git a/tests/testsuite.at b/tests/testsuite.at index e999a34..0958748 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -85,5 +85,6 @@ m4_include([floor.at]) m4_include([trunc.at]) m4_include([round.at]) m4_include([la.at]) +m4_include([overflow.at]) # End of testsuite.at |