-
Notifications
You must be signed in to change notification settings - Fork 137
swift test fails on FreeBSD #295
Copy link
Copy link
Closed
Description
Summary
swift test fails on FreeBSD.
- FreeBSD 15.0-RELEASE-p1 x86_64
- Swift version 6.3-dev (LLVM b58b2a34d509492, Swift cf535d8b998d09b) (Swift on FreeBSD Preview)
- Target: x86_64-unknown-freebsd14.3
- Build config: +assertions
- swift-system main branch 7e474cb
Logs
After fixing #293:
$ swift test
...
Test Suite 'debug.xctest' passed at 2026-01-28 20:35:29.778
Executed 52 tests, with 0 failures (0 unexpected) in 2.013 (2.013) seconds
Test Suite 'All tests' passed at 2026-01-28 20:35:29.778
Executed 52 tests, with 0 failures (0 unexpected) in 2.013 (2.013) seconds
◇ Test run started.
↳ Testing Library Version: 6.3-dev (98430f2d6cb8d81)
↳ Target Platform: x86_64-unknown-freebsd
◇ Suite "Stat" started.
◇ Suite "FileMode" started.
◇ Test permissions() started.
◇ Test followSymlinkInits() started.
◇ Test flags() started.
◇ Test basics() started.
◇ Test times() started.
◇ Test basics() started.
◇ Test invalidInput() started.
✔ Test invalidInput() passed after 0.001 seconds.
✔ Test basics() passed after 0.001 seconds.
✔ Suite "FileMode" passed after 0.001 seconds.
✔ Test permissions() passed after 0.003 seconds.
✔ Test basics() passed after 0.003 seconds.
✘ Test flags() recorded an issue at StatTests.swift:387:11: Expectation failed: (fchflags(fd.rawValue, UInt(flags.rawValue)) → -1) == 0
↳ Operation not supported
✘ Test flags() failed after 0.004 seconds with 1 issue.
✘ Test followSymlinkInits() recorded an issue at StatTests.swift:121:7: Expectation failed: (symlinkStat.sizeAllocated → 512) < (targetStat.sizeAllocated → 512)
✘ Test followSymlinkInits() failed after 0.004 seconds with 1 issue.
✔ Test times() passed after 0.043 seconds.
✘ Suite "Stat" failed after 0.043 seconds with 2 issues.
✘ Test run with 7 tests in 2 suites failed after 0.044 seconds with 2 issues.✘ Test flags() recorded an issue at StatTests.swift:387:11: Expectation failed: (fchflags(fd.rawValue, UInt(flags.rawValue)) → -1) == 0
↳ Operation not supported
This occurs since I use ZFS as a root file system. UF_IMMUTABLE, UF_APPEND, UF_OPAQUE, UF_NOUNLINK, and UF_REPARSE are not supported on ZFS. Although this may pass successfully on other file systems, ZFS is popular on FreeBSD. Thus, those flags should be omitted from the test case for FreeBSD.
✘ Test followSymlinkInits() recorded an issue at StatTests.swift:121:7: Expectation failed: (symlinkStat.sizeAllocated → 512) < (targetStat.sizeAllocated → 512)
On FreeBSD, the value of st_blocks of a symlink is usually not zero. On the other hand, on linux, it is.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels