Currently, error_ignore calls error_noexit with a status of IGNORE
and a message/comment. error_noexit writes the comment to
the $LOGDIR/err file. If there is an err file, the pass
routine assumes the test failed and reports the test status as FAIL.
So, for errors that should be ignored, we don't want to be
writing the comment out to the err file.
Now, any message with an "IGNORE" status is written to
$LOGDIR/ignore file and, thus, the test will no longer be
classified as FAIL and the error will really be ignored.
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I30f5387105f6cbce54050682b16387f73ab541d6
Reviewed-on: http://review.whamcloud.com/7782
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
if [ -z "$*" ]; then
echo "error() without useful message, please fix" > $LOGDIR/err
else
if [ -z "$*" ]; then
echo "error() without useful message, please fix" > $LOGDIR/err
else
- echo "$@" > $LOGDIR/err
+ if [[ `echo $TYPE | grep ^IGNORE` ]]; then
+ echo "$@" > $LOGDIR/ignore
+ else
+ echo "$@" > $LOGDIR/err
+ fi
local name=${TESTSUITE}.test_${1}.test_log.$(hostname -s).log
local test_log=$LOGDIR/$name
rm -rf $LOGDIR/err
local name=${TESTSUITE}.test_${1}.test_log.$(hostname -s).log
local test_log=$LOGDIR/$name
rm -rf $LOGDIR/err
rm -rf $LOGDIR/skip
local SAVE_UMASK=`umask`
umask 0022
rm -rf $LOGDIR/skip
local SAVE_UMASK=`umask`
umask 0022
(run_one $1 "$2") 2>&1 | tee -i $test_log
local RC=${PIPESTATUS[0]}
(run_one $1 "$2") 2>&1 | tee -i $test_log
local RC=${PIPESTATUS[0]}
- [ $RC -ne 0 ] && [ ! -f $LOGDIR/err ] && \
+ [ $RC -ne 0 ] && [ ! -f $LOGDIR/err ] &&
echo "test_$1 returned $RC" | tee $LOGDIR/err
duration=$((`date +%s` - $BEFORE))
echo "test_$1 returned $RC" | tee $LOGDIR/err
duration=$((`date +%s` - $BEFORE))
if [[ -f $LOGDIR/err ]]; then
TEST_ERROR=$(cat $LOGDIR/err)
if [[ -f $LOGDIR/err ]]; then
TEST_ERROR=$(cat $LOGDIR/err)
+ elif [[ -f $LOGDIR/ignore ]]; then
+ TEST_ERROR=$(cat $LOGDIR/ignore)
elif [[ -f $LOGDIR/skip ]]; then
TEST_ERROR=$(cat $LOGDIR/skip)
fi
elif [[ -f $LOGDIR/skip ]]; then
TEST_ERROR=$(cat $LOGDIR/skip)
fi