[LTP] [PATCH v3] pty: Test data transmission with SLIP line discipline

Richard Palethorpe rpalethorpe@suse.de
Fri Mar 6 14:45:03 CET 2020


Hi,

Petr Vorel <pvorel@suse.cz> writes:

> Hi Richard,
>
> ...
>> +static int set_ldisc(int tty, struct ldisc_info *ldisc)
>> +{
>> +	TEST(ioctl(tty, TIOCSETD, &ldisc->n));
>> +
>> +	if (!TST_RET)
>> +		return 0;
>> +
>> +	if (TST_ERR == EINVAL) {
>> +		tst_res(TCONF | TTERRNO,
>> +			"You don't appear to have the %s TTY line discipline",
>> +			ldisc->name);
>> +	} else {
>> +		tst_res(TBROK | TTERRNO,
> This must be TFAIL now.
> This can be done by person who merges this patch.
>
> BTW as the same function (with corrected TBROK) is
> already in pty03.c (although struct ldisc_info is different).

HHmm, I suppose this also means I should also either check the return
value in open_pty or use tst_brk.


>
> Kind regards,
> Petr


-- 
Thank you,
Richard.


More information about the ltp mailing list