diff options
author | pjd <pjd@FreeBSD.org> | 2008-11-23 19:50:20 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2008-11-23 19:50:20 +0000 |
commit | 7bf77219f33c53f9bbb9ce3d29f913b318561744 (patch) | |
tree | 0fb6df99a06dd4f04eb3266f490faa570cc8ff38 | |
parent | 3da37e1610682d8bfb4b4c833bb07f9a0030fab1 (diff) | |
download | FreeBSD-src-7bf77219f33c53f9bbb9ce3d29f913b318561744.zip FreeBSD-src-7bf77219f33c53f9bbb9ce3d29f913b318561744.tar.gz |
fstest for Linux:
- Use /dev/urandom, it is more portable.
- Implement todo() function which allows to mark known failures.
-rw-r--r-- | tools/regression/fstest/tests/misc.sh | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/tools/regression/fstest/tests/misc.sh b/tools/regression/fstest/tests/misc.sh index 1b742a0..76233d7 100644 --- a/tools/regression/fstest/tests/misc.sh +++ b/tools/regression/fstest/tests/misc.sh @@ -27,7 +27,12 @@ expect() if [ $? -eq 0 ]; then echo "ok ${ntest}" else - echo "not ok ${ntest} - tried '$*', expected ${e}, got ${r}" + if [ -z "${todomsg}" ]; then + echo "not ok ${ntest} - tried '$*', expected ${e}, got ${r}" + else + echo "not ok ${ntest} # TODO ${todomsg}" + todomsg="" + fi fi ntest=`expr $ntest + 1` } @@ -43,7 +48,12 @@ jexpect() if [ $? -eq 0 ]; then echo "ok ${ntest}" else - echo "not ok ${ntest} - tried '$*', expected ${e}, got ${r}" + if [ -z "${todomsg}" ]; then + echo "not ok ${ntest} - tried '$*', expected ${e}, got ${r}" + else + echo "not ok ${ntest} # TODO ${todomsg}" + todomsg="" + fi fi ntest=`expr $ntest + 1` } @@ -53,14 +63,27 @@ test_check() if [ $* ]; then echo "ok ${ntest}" else - echo "not ok ${ntest}" + if [ -z "${todomsg}" ]; then + echo "not ok ${ntest}" + else + echo "not ok ${ntest} # TODO ${todomsg}" + todomsg="" + fi fi ntest=`expr $ntest + 1` } +todo() +{ + echo "${os}" | grep -iq "${1}" + if [ $? -eq 0 ]; then + todomsg="${2}" + fi +} + namegen() { - echo "fstest_`dd if=/dev/random bs=1k count=1 2>/dev/null | openssl md5`" + echo "fstest_`dd if=/dev/urandom bs=1k count=1 2>/dev/null | openssl md5`" } quick_exit() |