[LTP] [PATCH 1/3] ioctl01: Add default tty device

Petr Vorel pvorel@suse.cz
Thu Feb 9 08:22:12 CET 2023


...
> > FYI I'm using S_ISCHR() in other patches, which check if device can be
> > used.
> > Implementing search looks like a good idea. Are useful files any /dev/tty*
> > (including /dev/tty, /dev/ttyACM0, /dev/ttyS0) or should I avoid any file
> > or include other paths?


> It seems not all char devices can be used here.
> The /dev/tty*Num* should be the first choice.
+1

I'd also use /dev/tty (in case there is no tty0).

> I tried some of them and only /dev/tty0-N works well,
> maybe we can just make use of them to avoid no tty0
> file failure should be enough. Because my only concern
> about the hard coding is that "/dev/tty0" is non-exist.

FYI On my system ioctl01 fail on /dev/ttyS0-N (EIO instead of other expected
errors). The rest /dev/tty, /dev/tty0-N, /dev/ttyACM0-N work.
/dev/ttyACM0-N are just on one of my system, let's not use it.

Kind regards,
Petr


More information about the ltp mailing list