* [LTP] [PATCH] pty/pty02.c: Fix compiler error
@ 2018-05-31 2:45 Jinhui huang
2018-06-05 3:36 ` Li Wang
0 siblings, 1 reply; 2+ messages in thread
From: Jinhui huang @ 2018-05-31 2:45 UTC (permalink / raw)
To: ltp
Compilation failed because of undefined EXTPROC on old distros(e.g. RHEL5/6).
Based on the fix patch[1] and added EXTPROC, tcgetattr() still could not detect
invalid EXTPROC on old distros. So we wanted to skip the case if EXTPROC was not
defined on current distros.
[1] http://lists.linux.it/pipermail/ltp/2018-May/008253.html
Signed-off-by: Jinhui huang <huangjh.jy@cn.fujitsu.com>
---
testcases/kernel/pty/pty02.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/testcases/kernel/pty/pty02.c b/testcases/kernel/pty/pty02.c
index fd3d26b..548f8d1 100644
--- a/testcases/kernel/pty/pty02.c
+++ b/testcases/kernel/pty/pty02.c
@@ -29,6 +29,8 @@
#include "tst_test.h"
+#ifdef EXTPROC
+
static void do_test(void)
{
struct termios io = { .c_lflag = EXTPROC | ICANON };
@@ -60,3 +62,7 @@ static void do_test(void)
static struct tst_test test = {
.test_all = do_test,
};
+
+#else
+ TST_TEST_TCONF("EXTPROC is not defined");
+#endif
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [LTP] [PATCH] pty/pty02.c: Fix compiler error
2018-05-31 2:45 [LTP] [PATCH] pty/pty02.c: Fix compiler error Jinhui huang
@ 2018-06-05 3:36 ` Li Wang
0 siblings, 0 replies; 2+ messages in thread
From: Li Wang @ 2018-06-05 3:36 UTC (permalink / raw)
To: ltp
On Thu, May 31, 2018 at 10:45 AM, Jinhui huang <huangjh.jy@cn.fujitsu.com>
wrote:
> Compilation failed because of undefined EXTPROC on old distros(e.g.
> RHEL5/6).
>
> Based on the fix patch[1] and added EXTPROC, tcgetattr() still could not
> detect
> invalid EXTPROC on old distros. So we wanted to skip the case if EXTPROC
> was not
> defined on current distros.
>
> [1] http://lists.linux.it/pipermail/ltp/2018-May/008253.html
>
> Signed-off-by: Jinhui huang <huangjh.jy@cn.fujitsu.com>
> ---
> testcases/kernel/pty/pty02.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/testcases/kernel/pty/pty02.c b/testcases/kernel/pty/pty02.c
> index fd3d26b..548f8d1 100644
> --- a/testcases/kernel/pty/pty02.c
> +++ b/testcases/kernel/pty/pty02.c
> @@ -29,6 +29,8 @@
>
> #include "tst_test.h"
>
> +#ifdef EXTPROC
>
This fix is fine. But image that a distribution defined both EXTPROC and
ICANON, if the ICANON(enables canonical input processing, also called line
mode) needs newline('\n') to ptmx there, this test will hung there forever.
> +
> static void do_test(void)
> {
> struct termios io = { .c_lflag = EXTPROC | ICANON };
> @@ -60,3 +62,7 @@ static void do_test(void)
> static struct tst_test test = {
> .test_all = do_test,
> };
> +
> +#else
> + TST_TEST_TCONF("EXTPROC is not defined");
> +#endif
> --
> 1.8.3.1
>
>
>
>
--
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20180605/3ee5cc39/attachment-0001.html>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-05 3:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-31 2:45 [LTP] [PATCH] pty/pty02.c: Fix compiler error Jinhui huang
2018-06-05 3:36 ` Li Wang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.