<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Jan,<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 31, 2018 at 9:35 PM, Jan Stancek <span dir="ltr"><<a href="mailto:jstancek@redhat.com" target="_blank">jstancek@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-"><br>
<br>
----- Original Message -----<br>
> + * Regression test for commit 966031f340185 ("n_tty: fix EXTPROC vs ICANON<br>
> + * interaction with TIOCINQ (aka FIONREAD)"). The test reproduces a hang<br>
> + * (infinite loop in the kernel) after a pseudoterminal is put in both<br>
> canonical<br>
> + * (ICANON) and external processing (EXTPROC) mode, some data is written to<br>
> the<br>
> + * master and read from the slave, and the FIONREAD ioctl is called on the<br>
> + * slave. This is simplified from a syzkaller-generated reproducer.<br>
> + */<br>
> +<br>
> +#include <stdlib.h><br>
> +#include <termio.h><br>
> +<br>
> +#include "tst_test.h"<br>
> +<br>
> +static void do_test(void)<br>
> +{<br>
> + struct termios io = { .c_lflag = EXTPROC | ICANON };<br>
<br>
</span>Hi,<br>
<br>
I'm running into compilation errors on older distros (RHEL5/6)<br>
with this test:<br>
<br>
pty02.c: In function ‘do_test’:<br>
pty02.c:34: error: ‘EXTPROC’ undeclared (first use in this function)<br>
pty02.c:34: error: (Each undeclared identifier is reported only once<br>
pty02.c:34: error: for each function it appears in.)<br>
make: *** [pty02] Error 1<br>
<br>
We should probably ifdef the test, because adding define to LAPI<br>
still makes it fail:<br></blockquote><div><br></div><div><div style="font-size:small" class="gmail_default"><br></div></div><div><div style="font-size:small" class="gmail_default">Xiao and I have also noticed this, beside the undefine issue, there are still</div><div style="font-size:small" class="gmail_default">other problems in pty02 test.<br></div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">The discuss is here:</div><div style="font-size:small" class="gmail_default"><a href="http://lists.linux.it/pipermail/ltp/2018-May/008253.html">http://lists.linux.it/pipermail/ltp/2018-May/008253.html</a><br></div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
tst_test.c:1015: INFO: Timeout per run is 0h 05m 00s<br>
pty02.c:44: BROK: tcsetattr() failed: EINVAL<br>
<br>
Regards,<br>
Jan<br>
<div class="gmail-HOEnZb"><div class="gmail-h5"><br>
-- <br>
Mailing list info: <a href="https://lists.linux.it/listinfo/ltp" rel="noreferrer" target="_blank">https://lists.linux.it/<wbr>listinfo/ltp</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div>
</div></div>