From 9d5cf8a15e90a36b301bf4420dd892eddf729279 Mon Sep 17 00:00:00 2001 From: Alain Spineux Date: Thu, 3 Dec 2020 14:37:59 +0100 Subject: [PATCH] regress: test custom symlink permissions on FreeBSD and macOS --- regress/tests/weird-files-test | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/regress/tests/weird-files-test b/regress/tests/weird-files-test index 601bce798..f3577981b 100755 --- a/regress/tests/weird-files-test +++ b/regress/tests/weird-files-test @@ -34,6 +34,13 @@ cd weird-files perl socket.pl cd .. +# some system like MacOS & FreeBSD have a lchmod() system call +# and the chmod command has a "-h" option to not follow the symlink +# lets try to use the "-h" option and ignore the error +if ! chmod -h 751 "${cwd}/weird-files"/soft-file2 2> /dev/null ; then + true # ignore the error +fi + start_test cat <tmp/bconcmds -- 2.47.3