summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/basic/afr/entry-self-heal.t2
-rw-r--r--tests/include.rc10
2 files changed, 11 insertions, 1 deletions
diff --git a/tests/basic/afr/entry-self-heal.t b/tests/basic/afr/entry-self-heal.t
index ce542383e29..8c072ef9949 100644
--- a/tests/basic/afr/entry-self-heal.t
+++ b/tests/basic/afr/entry-self-heal.t
@@ -194,7 +194,7 @@ TEST ! stat spb_me/0
TEST ! stat source_deletions_me/fifo
TEST ! stat $B0/${V0}0/source_deletions_me/fifo
TEST ! stat $B0/${V0}1/source_deletions_me/fifo
-TEST ! stat source_deletions_me/block b 0 0
+TEST ! stat source_deletions_me/block
TEST ! stat $B0/${V0}0/source_deletions_me/block
TEST ! stat $B0/${V0}1/source_deletions_me/block
TEST ! stat source_deletions_me/char
diff --git a/tests/include.rc b/tests/include.rc
index cd5d07f2629..ab26755c639 100644
--- a/tests/include.rc
+++ b/tests/include.rc
@@ -324,6 +324,16 @@ stat -c %s /dev/null > /dev/null 2>&1 || {
exit 2;
fi
+ # %t/%T should return 0 for non devices.
+ case "${format}" in
+ *%t*|*%T*)
+ `which stat` -f '%HT' $f | grep -q 'Device$' || \
+ format=`echo "${format}" | sed 's/%t/0/g; s/%T/0/g;'`
+ ;;
+ *)
+ ;;
+ esac
+
if [ "x${format}" = "x" ] ; then
`which stat` $f
else