aboutsummaryrefslogtreecommitdiff
path: root/test/fuse_integration/posix_external_test.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2025-08-31 10:46:12 -0700
committerchrislu <chris.lu@gmail.com>2025-08-31 10:46:15 -0700
commit68991fdabc2ffe437cacbba80726e94828194a73 (patch)
tree34e9bb54cfd78b3572d3f0e412d242777a02a894 /test/fuse_integration/posix_external_test.go
parentee4a71d4c6ee1a924f2e8284d0c3debbaf6b17d2 (diff)
downloadseaweedfs-68991fdabc2ffe437cacbba80726e94828194a73.tar.xz
seaweedfs-68991fdabc2ffe437cacbba80726e94828194a73.zip
fixes
Diffstat (limited to 'test/fuse_integration/posix_external_test.go')
-rw-r--r--test/fuse_integration/posix_external_test.go47
1 files changed, 10 insertions, 37 deletions
diff --git a/test/fuse_integration/posix_external_test.go b/test/fuse_integration/posix_external_test.go
index 6d8cd60ba..821225c84 100644
--- a/test/fuse_integration/posix_external_test.go
+++ b/test/fuse_integration/posix_external_test.go
@@ -1,7 +1,6 @@
package fuse
import (
- "bufio"
"fmt"
"os"
"os/exec"
@@ -171,9 +170,17 @@ set -e
cd "$1"
echo "test" > original
ln original hardlink
-[ $(stat -c %h original) -eq 2 ]
+if [[ "$(uname)" == "Darwin" ]]; then
+ [ $(stat -f %l original) -eq 2 ]
+else
+ [ $(stat -c %h original) -eq 2 ]
+fi
rm hardlink
-[ $(stat -c %h original) -eq 1 ]
+if [[ "$(uname)" == "Darwin" ]]; then
+ [ $(stat -f %l original) -eq 1 ]
+else
+ [ $(stat -c %h original) -eq 1 ]
+fi
echo "PASS: Hard link counting works"
`,
},
@@ -530,37 +537,3 @@ func (s *ExternalPOSIXTestSuite) testEdgeCases(t *testing.T, mountPoint string)
}
})
}
-
-// ReportPOSIXCompliance generates a comprehensive POSIX compliance report
-func (s *ExternalPOSIXTestSuite) ReportPOSIXCompliance(t *testing.T) {
- reportPath := filepath.Join(s.workDir, "posix_compliance_report.txt")
- file, err := os.Create(reportPath)
- require.NoError(t, err)
- defer file.Close()
-
- writer := bufio.NewWriter(file)
- defer writer.Flush()
-
- fmt.Fprintf(writer, "SeaweedFS FUSE POSIX Compliance Report\n")
- fmt.Fprintf(writer, "=====================================\n")
- fmt.Fprintf(writer, "Generated: %s\n\n", time.Now().Format(time.RFC3339))
-
- fmt.Fprintf(writer, "Mount Point: %s\n", s.framework.GetMountPoint())
- fmt.Fprintf(writer, "Filer Address: %s\n\n", s.framework.GetFilerAddr())
-
- // This would be populated by running the actual tests and collecting results
- fmt.Fprintf(writer, "Test Results Summary:\n")
- fmt.Fprintf(writer, "--------------------\n")
- fmt.Fprintf(writer, "Basic File Operations: PASS\n")
- fmt.Fprintf(writer, "Directory Operations: PASS\n")
- fmt.Fprintf(writer, "Symlink Operations: PASS\n")
- fmt.Fprintf(writer, "Permission Tests: PASS\n")
- fmt.Fprintf(writer, "Timestamp Tests: PASS\n")
- fmt.Fprintf(writer, "Extended Attributes: CONDITIONAL\n")
- fmt.Fprintf(writer, "File Locking: PASS\n")
- fmt.Fprintf(writer, "Advanced I/O: PARTIAL\n")
- fmt.Fprintf(writer, "Memory Mapping: PASS\n")
- fmt.Fprintf(writer, "External Test Suites: VARIABLE\n")
-
- t.Logf("POSIX compliance report generated: %s", reportPath)
-}