diff options
| author | chrislu <chris.lu@gmail.com> | 2025-08-31 12:58:52 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2025-08-31 12:58:52 -0700 |
| commit | a2378a29dcea338e598689344b139515db7814c4 (patch) | |
| tree | c22ecc530c708ac22df00dfbff2606a79f7e94c7 /test/fuse_integration/posix_compliance_test.go | |
| parent | f6cdb887a21589df96817e25d53b7bc53c006e76 (diff) | |
| download | seaweedfs-a2378a29dcea338e598689344b139515db7814c4.tar.xz seaweedfs-a2378a29dcea338e598689344b139515db7814c4.zip | |
fix
Diffstat (limited to 'test/fuse_integration/posix_compliance_test.go')
| -rw-r--r-- | test/fuse_integration/posix_compliance_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/fuse_integration/posix_compliance_test.go b/test/fuse_integration/posix_compliance_test.go index bb3f2a0a1..fbd2eef0b 100644 --- a/test/fuse_integration/posix_compliance_test.go +++ b/test/fuse_integration/posix_compliance_test.go @@ -257,16 +257,16 @@ func (s *POSIXComplianceTestSuite) TestPermissions(t *testing.T) { stat, err := os.Stat(testFile) require.NoError(t, err) - // Note: Some FUSE implementations may not preserve execute bits on regular files - // SeaweedFS FUSE mount typically masks execute bits for security + // Note: The final file permissions are affected by the system's umask. + // We check against the requested mode and the mode as affected by a common umask (e.g. 0022). actualMode := stat.Mode() & os.ModePerm expectedMode := os.FileMode(0642) - expectedModeNoExec := os.FileMode(0640) // 642 without execute bits + expectedModeWithUmask := os.FileMode(0640) // e.g., 0642 with umask 0002 or 0022 - // Accept either the exact permissions or permissions without execute bit - if actualMode != expectedMode && actualMode != expectedModeNoExec { + // Accept either the exact permissions or permissions as modified by umask + if actualMode != expectedMode && actualMode != expectedModeWithUmask { t.Errorf("Expected file permissions %o or %o, but got %o", - expectedMode, expectedModeNoExec, actualMode) + expectedMode, expectedModeWithUmask, actualMode) } }) |
