From: Dmitry Monakhov Date: Thu, 10 Nov 2011 11:15:06 +0000 (+0000) Subject: 270: check for setcap availability X-Git-Tag: v2022.05.01~3651 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e58aa1bac13c2a75d2055a7a731f031f9901c21c;p=users%2Fhch%2Fxfstests-dev.git 270: check for setcap availability 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 Signed-off-by: Christoph Hellwig --- diff --git a/270 b/270 index ed1e31e62..90e24f515 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