[PATCH] xfstests: 270'th test want use setcap(8)

Dmitry Monakhov dmonakhov at openvz.org
Sun Nov 6 23:07:57 CST 2011


It wants to grant CAP_CHOWN to fsstress, without this capability
chown(2) will fail due to EPERM. Since chown(2) is one of the most
error prone places of quota accounting this makes 270'th
test almost useless, so it is better to simply skip it.

Signed-off-by: Dmitry Monakhov <dmonakhov at openvz.org>
---
 270 |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/270 b/270
index ed1e31e..90e24f5 100755
--- a/270
+++ b/270
@@ -52,6 +52,9 @@ _workout()
 	echo "fsstress $args" >> $here/$seq.full
 	# Grant chown capability 
 	cp $FSSTRESS_PROG  $tmp.fsstress.bin
+	if [ "`whereis setcap`" == "setcap:" ]; then
+            _notrun "setcap not installed."
+	fi
 	setcap cap_chown=epi  $tmp.fsstress.bin
 
 	(su $qa_user -c "$tmp.fsstress.bin $args" &) > /dev/null 2>&1
-- 
1.7.1


--=-=-=

> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--=-=-=--




More information about the xfs mailing list