Skip to content

Commit 3527798

Browse files
committed
Check that '/proc/self' exists before using it for tests.
1 parent 48170cb commit 3527798

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

TestFoundation/TestNSData.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,9 @@ extension TestNSData {
926926

927927
func test_contentsOfZeroFile() {
928928
#if os(Linux)
929+
guard FileManager.default.fileExists(atPath: "/proc/self") else {
930+
return
931+
}
929932
let contents = NSData(contentsOfFile: "/proc/self/cmdline")
930933
XCTAssertNotNil(contents)
931934
if let contents = contents {

0 commit comments

Comments
 (0)