From: Wolfgang Stöggl Date: Mon, 4 Apr 2022 16:28:19 +0000 (+0200) Subject: Add test for rrd_first() X-Git-Tag: v1.9.0~31^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1169%2Fhead;p=thirdparty%2Frrdtool-1.x.git Add test for rrd_first() Make use of existing test "create-from-template-1", which already creates, updates and dumps rrds and add a test for rrdtool first. - This is a test for issue #1140 --- diff --git a/tests/create-from-template-1 b/tests/create-from-template-1 index ac4f9c6a..ea8c9bf5 100755 --- a/tests/create-from-template-1 +++ b/tests/create-from-template-1 @@ -33,6 +33,10 @@ rm -f ${PREFIX}*.rrd ${PREFIX}*.xml $RRDTOOL create ${PREFIX}ax1.rrd --start $(($ST-1)) --step 60 DS:a:GAUGE:120:0:U DS:b:COUNTER:120:0:U $RRA report createax1 +# Test rrd_first(), #1140 +RRD_FIRST=$($RRDTOOL first ${PREFIX}ax1.rrd) +[ $RRD_FIRST = 1299994020 ] ; report rrdtool first == $RRD_FIRST + cp ${BASE}ax1.rrd ${BASE}ax1-copy.rrd UPDATEAx1=