Skip to content

Commit

Permalink
qemu-iotests: Fail test if explicit test case number is unknown
Browse files Browse the repository at this point in the history
When we expand a number range, we just print "$id - unknown test,
ignored", this is convenient if we want to run a range of tests.

When we designate a test case number explicitly, we shouldn't just
ignore it if the case script doesn't exist.

Print an error and fail the test.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
  • Loading branch information
Fam Zheng authored and kevmw committed Sep 25, 2014
1 parent 9aebf3b commit c9d17ad
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/qemu-iotests/common
Expand Up @@ -376,10 +376,16 @@ BEGIN { for (t='$start'; t<='$end'; t++) printf "%03d\n",t }' \
echo $id >>$tmp.list
else
# oops
echo "$id - unknown test, ignored"
if [ "$start" == "$end" -a "$id" == "$end" ]
then
echo "$id - unknown test"
exit 1
else
echo "$id - unknown test, ignored"
fi
fi
fi
done
done || exit 1
fi

done
Expand Down

0 comments on commit c9d17ad

Please sign in to comment.