[PATCH] psxhdrs: Add POSIX API Signature Compliance Tests for termios.h

Jacob Shin jacobshin313 at gmail.com
Mon May 6 19:01:44 UTC 2019


---
 testsuites/psxtests/Makefile.am               | 11 ++++
 .../psxtests/psxhdrs/termios/cfgetispeed.c    | 50 ++++++++++++++++++
 .../psxtests/psxhdrs/termios/cfgetospeed.c    | 50 ++++++++++++++++++
 .../psxtests/psxhdrs/termios/cfsetispeed.c    | 50 ++++++++++++++++++
 .../psxtests/psxhdrs/termios/cfsetospeed.c    | 50 ++++++++++++++++++
 testsuites/psxtests/psxhdrs/termios/tcdrain.c | 49 ++++++++++++++++++
 testsuites/psxtests/psxhdrs/termios/tcflow.c  | 50 ++++++++++++++++++
 testsuites/psxtests/psxhdrs/termios/tcflush.c | 50 ++++++++++++++++++
 .../psxtests/psxhdrs/termios/tcgetattr.c      | 50 ++++++++++++++++++
 .../psxtests/psxhdrs/termios/tcgetsid.c       | 49 ++++++++++++++++++
 .../psxtests/psxhdrs/termios/tcsendbreak.c    | 50 ++++++++++++++++++
 .../psxtests/psxhdrs/termios/tcsetattr.c      | 51 +++++++++++++++++++
 12 files changed, 560 insertions(+)
 mode change 100644 => 100755 testsuites/psxtests/Makefile.am
 create mode 100755 testsuites/psxtests/psxhdrs/termios/cfgetispeed.c
 create mode 100755 testsuites/psxtests/psxhdrs/termios/cfgetospeed.c
 create mode 100755 testsuites/psxtests/psxhdrs/termios/cfsetispeed.c
 create mode 100755 testsuites/psxtests/psxhdrs/termios/cfsetospeed.c
 create mode 100755 testsuites/psxtests/psxhdrs/termios/tcdrain.c
 create mode 100755 testsuites/psxtests/psxhdrs/termios/tcflow.c
 create mode 100755 testsuites/psxtests/psxhdrs/termios/tcflush.c
 create mode 100755 testsuites/psxtests/psxhdrs/termios/tcgetattr.c
 create mode 100755 testsuites/psxtests/psxhdrs/termios/tcgetsid.c
 create mode 100755 testsuites/psxtests/psxhdrs/termios/tcsendbreak.c
 create mode 100755 testsuites/psxtests/psxhdrs/termios/tcsetattr.c

diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
old mode 100644
new mode 100755
index 749258cc0c..e7be09a0e9
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -1832,6 +1832,17 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \
 ## lib_a_SOURCES += psxhdrs/ulimit/ulimit.c
 ## lib_a_SOURCES += psxhdrs/monetary/strfmon.c
 ## lib_a_SOURCES += psxhdrs/monetary/strfmon_l.c
+## lib_a_SOURCES += psxhdrs/termios/cfgetispeed.c
+## lib_a_SOURCES += psxhdrs/termios/cfsetispeed.c
+## lib_a_SOURCES += psxhdrs/termios/tcdrain.c
+## lib_a_SOURCES += psxhdrs/termios/tcflush.c
+## lib_a_SOURCES += psxhdrs/termios/tcgetsid.c
+## lib_a_SOURCES += psxhdrs/termios/tcsetattr.c
+## lib_a_SOURCES += psxhdrs/termios/cfgetospeed.c
+## lib_a_SOURCES += psxhdrs/termios/cfsetospeed.c
+## lib_a_SOURCES += psxhdrs/termios/tcflow.c
+## lib_a_SOURCES += psxhdrs/termios/tcgetattr.c
+## lib_a_SOURCES += psxhdrs/termios/tcsendbreak.c
 
 ## Specific issues that tickets are tracking
 ## lib_a_SOURCES += psxhdrs/dirent/dirfd.c               See ticket #3371
diff --git a/testsuites/psxtests/psxhdrs/termios/cfgetispeed.c b/testsuites/psxtests/psxhdrs/termios/cfgetispeed.c
new file mode 100755
index 0000000000..4b2b88bc6d
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/termios/cfgetispeed.c
@@ -0,0 +1,50 @@
+/**
+ *  @file
+ *  @brief cfgetispeed() API Conformance Test
+ */
+
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2019 Jacob Shin
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <termios.h>
+
+int test( void );
+
+int test( void )
+{
+  struct termios term;
+  speed_t rate;
+  
+  rate = cfgetispeed(&term);
+
+  (void) rate;
+  return 0;
+}
\ No newline at end of file
diff --git a/testsuites/psxtests/psxhdrs/termios/cfgetospeed.c b/testsuites/psxtests/psxhdrs/termios/cfgetospeed.c
new file mode 100755
index 0000000000..4c55229645
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/termios/cfgetospeed.c
@@ -0,0 +1,50 @@
+/**
+ *  @file
+ *  @brief cfgetospeed() API Conformance Test
+ */
+
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2019 Jacob Shin
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <termios.h>
+
+int test( void );
+
+int test( void )
+{
+  struct termios term;
+  speed_t rate;
+  
+  rate = cfgetospeed(&term);
+
+  (void) rate;
+  return 0;
+}
\ No newline at end of file
diff --git a/testsuites/psxtests/psxhdrs/termios/cfsetispeed.c b/testsuites/psxtests/psxhdrs/termios/cfsetispeed.c
new file mode 100755
index 0000000000..3af199c5e6
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/termios/cfsetispeed.c
@@ -0,0 +1,50 @@
+/**
+ *  @file
+ *  @brief cfsetispeed() API Conformance Test
+ */
+
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2019 Jacob Shin
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <termios.h>
+
+int test( void );
+
+int test( void )
+{
+  int result;
+  struct termios term;
+  speed_t speed = B0;
+  
+  result = cfsetispeed(&term, speed);
+
+  return result;
+}
\ No newline at end of file
diff --git a/testsuites/psxtests/psxhdrs/termios/cfsetospeed.c b/testsuites/psxtests/psxhdrs/termios/cfsetospeed.c
new file mode 100755
index 0000000000..4f2707ef6e
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/termios/cfsetospeed.c
@@ -0,0 +1,50 @@
+/**
+ *  @file
+ *  @brief cfsetospeed() API Conformance Test
+ */
+
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2019 Jacob Shin
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <termios.h>
+
+int test( void );
+
+int test( void )
+{
+  int result;
+  struct termios term;
+  speed_t speed = B0;
+  
+  result = cfsetospeed(&term, speed);
+
+  return result;
+}
\ No newline at end of file
diff --git a/testsuites/psxtests/psxhdrs/termios/tcdrain.c b/testsuites/psxtests/psxhdrs/termios/tcdrain.c
new file mode 100755
index 0000000000..1de8862f65
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/termios/tcdrain.c
@@ -0,0 +1,49 @@
+/**
+ *  @file
+ *  @brief tcdrain() API Conformance Test
+ */
+
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2019 Jacob Shin
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <termios.h>
+
+int test( void );
+
+int test( void )
+{
+  int result;
+  int fildes = 0;
+
+  result = tcdrain(fildes);
+
+  return result;
+}
\ No newline at end of file
diff --git a/testsuites/psxtests/psxhdrs/termios/tcflow.c b/testsuites/psxtests/psxhdrs/termios/tcflow.c
new file mode 100755
index 0000000000..5b7d1dab39
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/termios/tcflow.c
@@ -0,0 +1,50 @@
+/**
+ *  @file
+ *  @brief tcflow() API Conformance Test
+ */
+
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2019 Jacob Shin
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <termios.h>
+
+int test( void );
+
+int test( void )
+{
+  int result;
+  int fildes = 0;
+  int action = TCOOFF;
+
+  result = tcflow(fildes, action);
+
+  return result;
+}
\ No newline at end of file
diff --git a/testsuites/psxtests/psxhdrs/termios/tcflush.c b/testsuites/psxtests/psxhdrs/termios/tcflush.c
new file mode 100755
index 0000000000..4beccb89d5
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/termios/tcflush.c
@@ -0,0 +1,50 @@
+/**
+ *  @file
+ *  @brief tcflush() API Conformance Test
+ */
+
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2019 Jacob Shin
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <termios.h>
+
+int test( void );
+
+int test( void )
+{
+  int result;
+  int fildes = 0;
+  int queue_selector = TCIFLUSH;
+
+  result = tcflush(fildes, queue_selector);
+
+  return result;
+}
\ No newline at end of file
diff --git a/testsuites/psxtests/psxhdrs/termios/tcgetattr.c b/testsuites/psxtests/psxhdrs/termios/tcgetattr.c
new file mode 100755
index 0000000000..d00336b214
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/termios/tcgetattr.c
@@ -0,0 +1,50 @@
+/**
+ *  @file
+ *  @brief tcgetattr() API Conformance Test
+ */
+
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2019 Jacob Shin
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <termios.h>
+
+int test( void );
+
+int test( void )
+{
+  int result;
+  int fildes = 0;
+  struct termios term;
+
+  result = tcgetattr(fildes, &term);
+
+  return result;
+}
\ No newline at end of file
diff --git a/testsuites/psxtests/psxhdrs/termios/tcgetsid.c b/testsuites/psxtests/psxhdrs/termios/tcgetsid.c
new file mode 100755
index 0000000000..8700742166
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/termios/tcgetsid.c
@@ -0,0 +1,49 @@
+/**
+ *  @file
+ *  @brief tcgetsid() API Conformance Test
+ */
+
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2019 Jacob Shin
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <termios.h>
+
+int test( void );
+
+int test( void )
+{
+  pid_t result;
+  int fildes = 0;
+
+  result = tcgetsid(fildes);
+
+  return (int) result;
+}
\ No newline at end of file
diff --git a/testsuites/psxtests/psxhdrs/termios/tcsendbreak.c b/testsuites/psxtests/psxhdrs/termios/tcsendbreak.c
new file mode 100755
index 0000000000..7ef4de0b7f
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/termios/tcsendbreak.c
@@ -0,0 +1,50 @@
+/**
+ *  @file
+ *  @brief tcsendbreak() API Conformance Test
+ */
+
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2019 Jacob Shin
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <termios.h>
+
+int test( void );
+
+int test( void )
+{
+  int result;
+  int fildes = 0;
+  int duration = 0;
+
+  result = tcsendbreak(fildes, duration);
+
+  return result;
+}
\ No newline at end of file
diff --git a/testsuites/psxtests/psxhdrs/termios/tcsetattr.c b/testsuites/psxtests/psxhdrs/termios/tcsetattr.c
new file mode 100755
index 0000000000..e2bd6980a9
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/termios/tcsetattr.c
@@ -0,0 +1,51 @@
+/**
+ *  @file
+ *  @brief tcsetattr() API Conformance Test
+ */
+
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2019 Jacob Shin
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <termios.h>
+
+int test( void );
+
+int test( void )
+{
+  int result;
+  int fildes = 0;
+  int optional_actions = 0;
+  struct termios term;
+
+  result = tcsetattr(fildes, optional_actions, &term);
+
+  return result;
+}
\ No newline at end of file
-- 
2.17.1



More information about the devel mailing list