From 7988979a722b4cdf287b2093956a76a3f19b9897 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 24 Oct 2016 20:22:12 +0200 Subject: add uClibc-ng test directory --- test/termios/Makefile | 8 ++++++++ test/termios/termios.c | 25 +++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 test/termios/Makefile create mode 100644 test/termios/termios.c (limited to 'test/termios') diff --git a/test/termios/Makefile b/test/termios/Makefile new file mode 100644 index 0000000..098cca6 --- /dev/null +++ b/test/termios/Makefile @@ -0,0 +1,8 @@ +# uClibc termios tests +# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + +top_builddir=../../ +top_srcdir=../../ +include ../Rules.mak +-include Makefile.in +include ../Test.mak diff --git a/test/termios/termios.c b/test/termios/termios.c new file mode 100644 index 0000000..5fbc344 --- /dev/null +++ b/test/termios/termios.c @@ -0,0 +1,25 @@ +#include +#include +#include +#include +#include +#include + +int main(int argc,char *argv[]) +{ + struct termios t; + int ret; + + printf("TCGETS = 0x%08x\n",TCGETS); + printf("sizeof(struct termios) = %ld\n",(long)sizeof(struct termios)); + + ret = ioctl(fileno(stdout),TCGETS,&t); + + if(ret<0){ + perror("ioctl"); + }else{ + printf("ioctl returned %d\n",ret); + } + + return 0; +} -- cgit v1.2.3