Elder Costa wrote:
> When I run the ioctl test (e.g. ./ioctl02 -D /dev/tty8) I get the same
> error Veerendra C reported last 18th or September. I tried with previous
> versions of the kernel and the test succeeds. Any hints of what could
> cause this?
>
> Bellow the results of uname -a and ioctl02 with three kernel versions.
>
> Linux coreduo 2.6.20-17-generic #2 SMP Wed Aug 20 16:47:34 UTC 2008 i686
> GNU/Linux
> ioctl02 0 INFO : termio values are set as expected
> ioctl02 1 PASS : TCGETA/TCSETA tests SUCCEEDED
>
> Linux coreduo 2.6.23.1-eit-080606a #1 SMP PREEMPT Fri Aug 15 10:48:32
> BRT 2008 i686 GNU/Linux
> ioctl02 0 INFO : termio values are set as expected
> ioctl02 1 PASS : TCGETA/TCSETA tests SUCCEEDED
>
> Linux coreduo 2.6.25.15-eit-081003a-cpufreq #1 SMP PREEMPT Fri Oct 3
> 16:06:49 BRT 2008 i686 GNU/Linux
> ioctl02 0 INFO : cflag has incorrect value. 4277
> ioctl02 1 FAIL : TCGETA/TCSETA tests FAILED with 1 error
>
>
> Thanks for any hint.
>
> Elder.
Hi. I digged through kernel code to figure out why this happen. It turns
out drivers/char/tty_ioctl.c changes from 2.6.23 to 2.6.24 were
significant. Specifically the culprit is the function reproduced bellow:
===== begin code snippet
void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old)
{
/* The bits a dumb device handles in software. Smart devices need
to always provide a set_termios method */
new->c_cflag &= HUPCL | CREAD | CLOCAL;
new->c_cflag |= old->c_cflag & ~(HUPCL | CREAD | CLOCAL);
new->c_ispeed = old->c_ispeed;
new->c_ospeed = old->c_ospeed;
}
====== end code snippet
AFAICT one has control only over the mask (i.e HUPCL | CREAD | CLOCAL)
bits. Thus the second test will fail with kernel 2.6.24 or newer.
There are two possible approaches to work it around: set only the
aforementioned bits or do not perform the check part att all (add -f to
the script). Neither is good IMO.
I may live with this fail as its cause is understood and I deem this
fail as acceptable in my system verification procedure.
I hope this small report may be of some use to some of you that face the
same problem.
Regards.
Elder.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list