tests: fix stats-dump.t failure
Since https://review.gluster.org/#/c/17452, the statistics are appended to the same file instead of overwritten over the previous stats. This was causing the .t to fail since it checks for only the presence of a non zero aggr.fop.write.count assuming the latest statistics will overwrite the previous ones. Fix it by checking for that the latest value of aggr.fop.write.count is non zero. Change-Id: I858011f343966a5d1c19d66dcc64b8cd26315df7 BUG: 1468432 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: https://review.gluster.org/17721 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
This commit is contained in:
parent
f28b5d1007
commit
b0d8afa2d2
@ -28,18 +28,11 @@ done
|
||||
sleep 2
|
||||
|
||||
# Verify we have non-zero write counts from the bricks, gNFSd
|
||||
# and the FUSE mount
|
||||
BRICK_OUTPUT="$(grep 'aggr.fop.write.count": "0"' ${GLUSTERD_WORKDIR}/stats/glusterfsd__d_backends_patchy?.dump)"
|
||||
BRICK_RET="$?"
|
||||
NFSD_OUTPUT="$(grep 'aggr.fop.write.count": "0"' ${GLUSTERD_WORKDIR}/stats/glusterfs_nfsd.dump)"
|
||||
NFSD_RET="$?"
|
||||
FUSE_OUTPUT="$(grep 'aggr.fop.write.count": "0"' ${GLUSTERD_WORKDIR}/stats/glusterfs_patchy.dump)"
|
||||
FUSE_RET="$?"
|
||||
|
||||
TEST [ 0 -ne "$BRICK_RET" ]
|
||||
TEST [ 0 -ne "$NFSD_RET" ]
|
||||
TEST [ 0 -ne "$FUSE_RET" ]
|
||||
# and the FUSE mount.
|
||||
TEST [ $(grep 'aggr.fop.write.count' ${GLUSTERD_WORKDIR}/stats/glusterfs_nfsd.dump|tail -1|cut -d: -f2) != "0," ]
|
||||
TEST [ $(grep 'aggr.fop.write.count' ${GLUSTERD_WORKDIR}/stats/glusterfs_patchy.dump|tail -1|cut -d: -f2) != "0," ]
|
||||
TEST [ $(grep 'aggr.fop.write.count' ${GLUSTERD_WORKDIR}/stats/glusterfsd__d_backends_patchy0.dump|tail -1|cut -d: -f2) != "0," ]
|
||||
TEST [ $(grep 'aggr.fop.write.count' ${GLUSTERD_WORKDIR}/stats/glusterfsd__d_backends_patchy1.dump|tail -1|cut -d: -f2) != "0," ]
|
||||
TEST [ $(grep 'aggr.fop.write.count' ${GLUSTERD_WORKDIR}/stats/glusterfsd__d_backends_patchy2.dump|tail -1|cut -d: -f2) != "0," ]
|
||||
|
||||
cleanup;
|
||||
#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=1468432
|
||||
#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=1468432
|
||||
|
Loading…
x
Reference in New Issue
Block a user