2020-06-13 02:34:05 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This source file is part of the SwiftNIO open source project
|
|
|
|
//
|
2021-08-16 23:50:40 +08:00
|
|
|
// Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors
|
2020-06-13 02:34:05 +08:00
|
|
|
// Licensed under Apache License v2.0
|
|
|
|
//
|
|
|
|
// See LICENSE.txt for license information
|
|
|
|
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2023-02-18 02:05:43 +08:00
|
|
|
#if !os(iOS) && !os(tvOS) && !os(watchOS)
|
2021-08-16 23:50:40 +08:00
|
|
|
import NIOPosix
|
2020-06-13 02:34:05 +08:00
|
|
|
import Foundation
|
|
|
|
|
|
|
|
fileprivate let group = MultiThreadedEventLoopGroup(numberOfThreads: 1)
|
|
|
|
|
|
|
|
struct SystemCrashTests {
|
|
|
|
let testEBADFIsUnacceptable = CrashTest(
|
2021-02-24 16:41:27 +08:00
|
|
|
regex: "Precondition failed: unacceptable errno \(EBADF) Bad file descriptor in", {
|
2020-06-13 02:34:05 +08:00
|
|
|
_ = try? NIOPipeBootstrap(group: group).withPipes(inputDescriptor: .max, outputDescriptor: .max - 1).wait()
|
|
|
|
})
|
|
|
|
}
|
2023-02-18 02:05:43 +08:00
|
|
|
#endif
|