From 43e2b130e74390f85e29de1c19da66ceccb9cee2 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 15 Jan 2019 01:10:39 -0500 Subject: [PATCH 2/2] Trim security context when checking permissions. This fixes the umask tests on a file system that uses security context, as that prints out an extra dot in the permissions. Signed-off-by: Elliott Sales de Andrade --- t/t-umask.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/t-umask.sh b/t/t-umask.sh index fdbc2386..494d5420 100644 --- a/t/t-umask.sh +++ b/t/t-umask.sh @@ -15,7 +15,9 @@ clean_setup () { perms_for () { local file=$(echo "$1" | sed "s!^\(..\)\(..\)!.git/lfs/objects/\1/\2/\1\2!") - ls -l "$file" | awk '{print $1}' + local perms=$(ls -l "$file" | awk '{print $1}') + # Trim extended attributes: + echo ${perms:0:10} } begin_test "honors umask" -- 2.20.1