From 6faaff10ee9223529301cff8a13118027bf9d6cc Mon Sep 17 00:00:00 2001 From: Takeshi Nakatani Date: Thu, 26 Sep 2024 15:02:22 +0000 Subject: [PATCH] Fixed hardlink test for macos --- test/integration-test-main.sh | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/test/integration-test-main.sh b/test/integration-test-main.sh index b2128fd..1e460f8 100755 --- a/test/integration-test-main.sh +++ b/test/integration-test-main.sh @@ -784,18 +784,11 @@ function test_hardlink { echo foo > "${TEST_TEXT_FILE}" ( - if ! uname | grep -q Darwin; then - set +o pipefail - ln "${TEST_TEXT_FILE}" "${ALT_TEST_TEXT_FILE}" 2>&1 | grep -q -e 'Operation not supported' -e 'Not supported' - else - # [macos] fuse-t - # Not error return code, and no stderr - # - ln "${TEST_TEXT_FILE}" "${ALT_TEST_TEXT_FILE}" - if stat "${ALT_TEST_TEXT_FILE}" >/dev/null 2>&1; then - exit 1 - fi - fi + # [NOTE] + # macos-fuse-t returns 'Input/output error' + # + set +o pipefail + ln "${TEST_TEXT_FILE}" "${ALT_TEST_TEXT_FILE}" 2>&1 | grep -q -e 'Operation not supported' -e 'Not supported' -e 'Input/output error' ) rm_test_file