mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
validation-test/stlib/Glibc.swift was failing on powerpc64le due to the missing TIOCGWINSZ symbol. Since (from what I can tell) this is just a random tty ioctl, replace it with a different ioctl that should be more commonly defined. Signed-off-by: Russell Currey <ruscur@russell.cc>
34 lines
598 B
Swift
34 lines
598 B
Swift
// RUN: %target-run-simple-swift
|
|
// REQUIRES: executable_test
|
|
//
|
|
// UNSUPPORTED: OS=macosx
|
|
// UNSUPPORTED: OS=ios
|
|
// UNSUPPORTED: OS=tvos
|
|
// UNSUPPORTED: OS=watchos
|
|
// UNSUPPORTED: OS=linux-androideabi
|
|
|
|
// REQUIRES: OS=linux-gnu
|
|
|
|
import Swift
|
|
import StdlibUnittest
|
|
|
|
|
|
import Glibc
|
|
|
|
var GlibcTestSuite = TestSuite("Glibc")
|
|
|
|
GlibcTestSuite.test("errno") {
|
|
errno = 0
|
|
expectEqual(0, errno)
|
|
close(-1)
|
|
expectEqual(EBADF, errno)
|
|
}
|
|
|
|
var GlibcIoctlConstants = TestSuite("GlibcIoctlConstants")
|
|
|
|
GlibcIoctlConstants.test("tty ioctl constants availability") {
|
|
let aConstant = TIOCSTI
|
|
}
|
|
|
|
runAllTests()
|