From 8281d48d75d77386e3dee0614f54b33e0655feca Mon Sep 17 00:00:00 2001 From: fsgqa Date: Tue, 29 Jun 2004 02:16:00 +0000 Subject: [PATCH] Fixed bench marking of other filesystems. Added error message if bonnie++ is not installed. --- common.bonnie | 6 ++++++ common.dbench | 6 ++++++ common.rc | 14 +++++++++++--- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/common.bonnie b/common.bonnie index 7414c0f0..ffdb146c 100644 --- a/common.bonnie +++ b/common.bonnie @@ -1,5 +1,11 @@ ##/bin/sh +#check bonnie is installed +if [ "`whereis bonnie++`" == "bonnie++:"]; then + echo $0 error bonnie not installed. + exit +fi + run_bonnie() { # dir, no hostname, quiet, fast (no per-char), ram (no sz checks) diff --git a/common.dbench b/common.dbench index f4d7d151..eec6262f 100755 --- a/common.dbench +++ b/common.dbench @@ -1,5 +1,11 @@ ##/bin/sh +#check dbench is installed +if [ "`whereis dbench`" == "dbench:"]; then + echo $0 error dbench not installed. + exit +fi + _run_dbench() { mkdir ./dbench || exit 1 diff --git a/common.rc b/common.rc index 28b316a5..13401c32 100644 --- a/common.rc +++ b/common.rc @@ -1,5 +1,4 @@ ##/bin/sh - # # Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. # @@ -187,9 +186,18 @@ _scratch_mkfs() nfs*) # do nothing for nfs ;; - udf|*) + udf*) $MKFS_PROG -t $FSTYP $MKFS_OPTIONS $* > /dev/null ;; + ext2) + mkfs.ext2 $MKFS_OPTIONS $* $SCRATCH_DEV > /dev/null + ;; + ext3) + mkfs.ext3 $MKFS_OPTIONS $* $SCRATCH_DEV > /dev/null + ;; + reiserfs) + mkfs.reiserfs $MKFS_OPTIONS $* $SCRATCH_DEV > /dev/null + ;; esac } @@ -520,7 +528,7 @@ _require_scratch() _notrun "this test requires a valid \$SCRATCH_DEV" fi ;; - nfs*) + nfs*|ext2|ext3|reiserfs) echo $SCRATCH_DEV | grep -q ":" > /dev/null 2>&1 if [ ! -z "$SCRATCH_DEV" -a ! -b "$SCRATCH_DEV" -a "$?" != "0" ] then -- 2.39.5