mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
tests: fix feature test
Fixes: 81f0b84d
("tests: fix feature checking if it's a directory")
Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
This commit is contained in:
parent
210ad63cbf
commit
64c1eb9cda
1 changed files with 7 additions and 2 deletions
|
@ -70,9 +70,14 @@ kernel_features()
|
|||
# check if feature is in file
|
||||
feature=$(basename "$features_dir/$f")
|
||||
file=$(dirname "$features_dir/$f")
|
||||
if [ -f $file ] && ! grep -q $feature $file; then
|
||||
if [ -f $file ]; then
|
||||
if ! grep -q $feature $file; then
|
||||
echo "Required feature '$f' not available."
|
||||
return 2;
|
||||
fi
|
||||
else
|
||||
echo "Required feature '$f' not available."
|
||||
return 2;
|
||||
return 3;
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Add table
Reference in a new issue