[LTP] [PATCH v3] Use correct ioctl request for termios

Cyril Hrubis chrubis@suse.cz
Mon Sep 11 11:11:30 CEST 2023


Hi!
Applied, thanks.

>  static char *device;
> @@ -62,9 +65,6 @@ static void verify_ioctl(unsigned int i)
>  {
>  	TST_EXP_FAIL(ioctl(*(tcases[i].fd), tcases[i].request, tcases[i].s_tio),
>  		     tcases[i].error);

It would be nice to also print a nice description here instead of the
parameteres. The third parameter to the macro is a printf-like format
string. What we usually do in these tests is to put short description of
the testcase to the tcase structrure and print it here with
TST_EXP_FAIL(... "%s", tcases[i].desc);


And another improvement would be to create a tty with openpty() and use
the fd from these for the test instead of messing up with the system
ttys. I suppose that we could drop the needs_root flag in that case as
well.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list