From: Peter Stamfest Date: Mon, 17 Mar 2014 07:41:02 +0000 (+0100) Subject: Modify tests to match new "tune" command X-Git-Tag: v1.5.0-rc1~117^2~2^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a68a286ec083f0e022ab6b7842950d76397daa34;p=thirdparty%2Frrdtool-1.x.git Modify tests to match new "tune" command --- diff --git a/tests/modify1 b/tests/modify1 index 2ff9eebd..45a87209 100755 --- a/tests/modify1 +++ b/tests/modify1 @@ -3,7 +3,7 @@ . $(dirname $0)/functions BASE=$BASEDIR/modify-test1 - +DIFF="diff -u" $RRDTOOL create ${BASE}a.rrd --start 1300000000 --step 60 DS:a:GAUGE:120:0:U RRA:AVERAGE:0.5:1:10 RRA:AVERAGE:0.5:5:10 # add 50 values to N=10 @@ -12,10 +12,9 @@ for T in $(seq 1300000020 60 1300003020) ; do let N=$N+10 done -$RRDTOOL dump ${BASE}a.rrd | diff - $BASEDIR/modify-test1.create.dump && ok "create" || fail "create" +$RRDTOOL dump ${BASE}a.rrd | $DIFF - $BASEDIR/modify-test1.create.dump && ok "create" || fail "create" # extend base RRA, refill from coarse RRA -$RRDTOOL modify ${BASE}a.rrd ${BASE}b.rrd RRA#0:+10 || fail "modify" - -$RRDTOOL dump ${BASE}b.rrd | diff - $BASEDIR/modify-test1.mod1.dump && ok "extend base RRA" || fail "extend base RRA" - +cp ${BASE}a.rrd ${BASE}b.rrd +$RRDTOOL tune ${BASE}b.rrd RRA#0:+10 || fail "tune" +$RRDTOOL dump ${BASE}b.rrd | $DIFF - $BASEDIR/modify-test1.mod1.dump && ok "extend base RRA" || fail "extend base RRA" diff --git a/tests/modify2 b/tests/modify2 index 78da8f4c..1b17c43e 100755 --- a/tests/modify2 +++ b/tests/modify2 @@ -18,12 +18,13 @@ done $RRDTOOL dump ${BASE}a.rrd | $DIFF ${BASE}a-create.dump - report create -$RRDTOOL modify ${BASE}a.rrd ${BASE}b.rrd RRA#1:+10 RRA#2:+10 RRA#3:+10 RRA#4:+10 || fail modify - +cp ${BASE}a.rrd ${BASE}b.rrd +$RRDTOOL tune ${BASE}b.rrd RRA#1:+10 RRA#2:+10 RRA#3:+10 RRA#4:+10 || fail modify $RRDTOOL dump ${BASE}b.rrd | $DIFF ${BASE}b-mod1.dump - report "simultaneously extend aggregate RRAs" -$RRDTOOL modify ${BASE}a.rrd ${BASE}c.rrd RRA:AVERAGE:0.5:2:10 || fail modify +cp ${BASE}a.rrd ${BASE}c.rrd +$RRDTOOL tune ${BASE}c.rrd RRA:AVERAGE:0.5:2:10 || fail modify $RRDTOOL dump ${BASE}c.rrd | $DIFF ${BASE}c-mod1.dump - report "add RRA with intermediate pdp_cnt" diff --git a/tests/modify3 b/tests/modify3 index 8bad9434..aa9707e6 100755 --- a/tests/modify3 +++ b/tests/modify3 @@ -15,7 +15,8 @@ done $RRDTOOL dump ${BASE}a.rrd | diff - $BASEDIR/modify-test3.create.dump && ok "create" || fail "create" # extend base RRA, refill from coarse RRA -$RRDTOOL modify ${BASE}a.rrd ${BASE}b.rrd DEL:a RRA#0:+10 || fail modify +cp ${BASE}a.rrd ${BASE}b.rrd +$RRDTOOL tune ${BASE}b.rrd DEL:a RRA#0:+10 || fail modify $RRDTOOL dump ${BASE}b.rrd | diff - $BASEDIR/modify-test3.mod1.dump && ok "extend base RRA" || fail "extend base RRA" diff --git a/tests/modify4 b/tests/modify4 index a493acfc..b2c76bd5 100755 --- a/tests/modify4 +++ b/tests/modify4 @@ -27,12 +27,14 @@ report create 1 $RRDTOOL dump ${BASE}a2.rrd | $DIFF ${BASE}a2-create.dump - report create 2 -$RRDTOOL modify ${BASE}a2.rrd ${BASE}b2.rrd DELRRA:5 || fail modify +cp ${BASE}a2.rrd ${BASE}b2.rrd +$RRDTOOL tune ${BASE}b2.rrd DELRRA:5 || fail modify $RRDTOOL dump ${BASE}b2.rrd | $DIFF ${BASE}a1-create.dump - report "remove additional RRA from second - must then be equal original first" -$RRDTOOL modify ${BASE}a1.rrd ${BASE}b1.rrd RRA:AVERAGE:0.5:4:10 || fail modify +cp ${BASE}a1.rrd ${BASE}b1.rrd +$RRDTOOL tune ${BASE}b1.rrd RRA:AVERAGE:0.5:4:10 || fail modify $RRDTOOL dump ${BASE}b1.rrd | $DIFF ${BASE}a2-create.dump - report "add additional RRA to first - must then be equal original second" diff --git a/tests/modify5 b/tests/modify5 index 5a9f7b96..331cddc3 100755 --- a/tests/modify5 +++ b/tests/modify5 @@ -41,13 +41,15 @@ do $RRDTOOL dump ${BASE}a2.rrd > ${BASE}a2-mod.dump # remove RRA 5 from second RRD, should now match first RRD - $RRDTOOL modify ${BASE}a2.rrd ${BASE}b2.rrd DELRRA:5 + cp ${BASE}a2.rrd ${BASE}b2.rrd + $RRDTOOL tune ${BASE}b2.rrd DELRRA:5 $RRDTOOL dump ${BASE}b2.rrd | $DIFF ${BASE}a1-mod.dump - report "remove additional RRA from second - must then be equal original first" # add RRA to first RRD, should now match second RRD - $RRDTOOL modify ${BASE}a1.rrd ${BASE}b1.rrd RRA:AVERAGE:0.5:4:10 + cp ${BASE}a1.rrd ${BASE}b1.rrd + $RRDTOOL tune ${BASE}b1.rrd RRA:AVERAGE:0.5:4:10 $RRDTOOL dump ${BASE}b1.rrd | $DIFF ${BASE}a2-mod.dump - report "add additional RRA to first - must then be equal original second"