Skip to content

Commit 6e0aa3a

Browse files
committed
Test fixes for RedHat
- SR-7747: FileManager.attributesOfFileSystem(forPath:) may return .systemNumber as 0 on some systems (eg tmpfs on Redhat). - SR-7748: Avoid using a symlinked directory for 'pwd' test.
1 parent 151ec1d commit 6e0aa3a

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

TestFoundation/TestFileManager.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ class TestFileManager : XCTestCase {
279279

280280
let systemNumber = attrs[.systemNumber] as? NSNumber
281281
XCTAssertNotNil(systemNumber)
282-
XCTAssertNotEqual(systemNumber!.uint64Value, 0)
283282

284283
let systemFreeSize = attrs[.systemFreeSize] as? NSNumber
285284
XCTAssertNotNil(systemFreeSize)

TestFoundation/TestProcess.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,8 @@ class TestProcess : XCTestCase {
280280
let previousWorkingDirectory = FileManager.default.currentDirectoryPath
281281

282282
// Darwin Foundation requires the full path to the executable (.launchPath)
283-
let (output, _) = try runTask(["/bin/bash", "-c", "pwd"], currentDirectoryPath: "/bin")
284-
XCTAssertEqual(output.trimmingCharacters(in: .newlines), "/bin")
283+
let (output, _) = try runTask(["/bin/bash", "-c", "pwd"], currentDirectoryPath: "/")
284+
XCTAssertEqual(output.trimmingCharacters(in: .newlines), "/")
285285
XCTAssertEqual(previousWorkingDirectory, FileManager.default.currentDirectoryPath)
286286
} catch let error {
287287
XCTFail("Test failed: \(error)")

0 commit comments

Comments
 (0)