acl_test01: Add setfacl as an explicit dependency

Message ID 20180706152927.26646-1-punit.agrawal@arm.com
State Accepted
Delegated to: Petr Vorel
Headers show
Series
  • acl_test01: Add setfacl as an explicit dependency
Related show

Commit Message

Punit Agrawal July 6, 2018, 3:29 p.m.
acl_test01 calls setfacl during execution but does not explicitly
check for its presence during setup.

Add this dependency to correctly report the failure mode when setfacl
is not found.

Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
---
 testcases/kernel/fs/acls/acl_test01 | 1 +
 1 file changed, 1 insertion(+)

Comments

Jan Stancek July 10, 2018, 1:53 p.m. | #1
----- Original Message -----
> acl_test01 calls setfacl during execution but does not explicitly
> check for its presence during setup.
> 
> Add this dependency to correctly report the failure mode when setfacl
> is not found.
> 
> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>

Pushed.

Thanks,
Jan
Punit Agrawal July 10, 2018, 2:34 p.m. | #2
Jan Stancek <jstancek@redhat.com> writes:

> ----- Original Message -----
>> acl_test01 calls setfacl during execution but does not explicitly
>> check for its presence during setup.
>> 
>> Add this dependency to correctly report the failure mode when setfacl
>> is not found.
>> 
>> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
>
> Pushed.

Thanks!

Since sending this commit I've hit other tests which don't do a full
dependency check - many of them seem to be using 'killall'. I'll try and
collect all the patches and send them out together.

>
> Thanks,
> Jan

Patch

diff --git a/testcases/kernel/fs/acls/acl_test01 b/testcases/kernel/fs/acls/acl_test01
index c91eb5686..14b62e895 100755
--- a/testcases/kernel/fs/acls/acl_test01
+++ b/testcases/kernel/fs/acls/acl_test01
@@ -64,6 +64,7 @@  fi
 do_setup()
 {
 	tst_require_root
+	tst_check_cmds setfacl
 
 	if ! ( test -d $TMP/tacl || mkdir -m 777 $TMP/tacl) ; then
 		tst_brkm TBROK "Failed to create $TMP/tacl directory."