bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] tests: skip a root-only test when configured without libcap


From: Jim Meyering
Subject: [PATCH] tests: skip a root-only test when configured without libcap
Date: Thu, 02 Oct 2008 15:56:53 +0200

I noticed that one of the "root-only" tests failed when
libcap-devel is not installed.  This skips the test in that case.

>From 7eb15e1020590ebc1f39e5679feea8f1106d241c Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Thu, 2 Oct 2008 15:54:36 +0200
Subject: [PATCH] tests: skip a root-only test when configured without libcap

* tests/ls/capability: Test for HAVE_CAP definition in config.h.
---
 tests/ls/capability |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/tests/ls/capability b/tests/ls/capability
index f064348..6336ca1 100755
--- a/tests/ls/capability
+++ b/tests/ls/capability
@@ -24,6 +24,9 @@ fi
 . $srcdir/test-lib.sh
 require_root_

+grep '^#define HAVE_CAP 1$' $CONFIG_HEADER > /dev/null \
+  || skip_test_ "configured without libcap support"
+
 (setcap --help) 2>&1 |grep 'usage: setcap' > /dev/null \
   || skip_test_ "setcap utility not found"
 fail=0
--
1.6.0.2.307.gc427




reply via email to

[Prev in Thread] Current Thread [Next in Thread]