]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
270: check for setcap availability
authorDmitry Monakhov <dmonakhov@openvz.org>
Thu, 10 Nov 2011 11:15:06 +0000 (11:15 +0000)
committerChristoph Hellwig <hch@lst.de>
Thu, 10 Nov 2011 11:15:06 +0000 (11:15 +0000)
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@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
270

diff --git a/270 b/270
index ed1e31e62a6f6644fa023b784371d63951aee3b5..90e24f51562ee6743d990524990c83663121a1ee 100755 (executable)
--- 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