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

Joel Sherrill joel at rtems.org
Tue May 7 19:50:16 UTC 2019


Module:    rtems
Branch:    master
Commit:    7bd38f88c78d8a746a3a72ad7800c9f8b3ec6c6c
Changeset: http://git.rtems.org/rtems/commit/?id=7bd38f88c78d8a746a3a72ad7800c9f8b3ec6c6c

Author:    Jacob Shin <jacobshin313 at gmail.com>
Date:      Mon May  6 15:01:44 2019 -0400

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

---

 testsuites/psxtests/Makefile.am                   | 11 +++++
 testsuites/psxtests/psxhdrs/termios/cfgetispeed.c | 50 ++++++++++++++++++++++
 testsuites/psxtests/psxhdrs/termios/cfgetospeed.c | 50 ++++++++++++++++++++++
 testsuites/psxtests/psxhdrs/termios/cfsetispeed.c | 50 ++++++++++++++++++++++
 testsuites/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 ++++++++++++++++++++++
 testsuites/psxtests/psxhdrs/termios/tcgetattr.c   | 50 ++++++++++++++++++++++
 testsuites/psxtests/psxhdrs/termios/tcgetsid.c    | 49 ++++++++++++++++++++++
 testsuites/psxtests/psxhdrs/termios/tcsendbreak.c | 50 ++++++++++++++++++++++
 testsuites/psxtests/psxhdrs/termios/tcsetattr.c   | 51 +++++++++++++++++++++++
 12 files changed, 560 insertions(+)

diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
old mode 100644
new mode 100755
index 749258c..e7be09a
--- 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 0000000..e98a281
--- /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 0000000..b326a78
--- /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 0000000..b73dbff
--- /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 0000000..8377fc6
--- /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 0000000..1de8862
--- /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 0000000..5b7d1da
--- /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 0000000..4beccb8
--- /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 0000000..d00336b
--- /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 0000000..8700742
--- /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 0000000..7ef4de0
--- /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 0000000..e2bd698
--- /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




More information about the vc mailing list