[LTP] [PATCH 2/2] device_drivers/uart01: Add uart01 test

Cixi Geng gengcixi@gmail.com
Wed Apr 8 06:15:30 CEST 2020


> Cyril Hrubis <chrubis@suse.cz> 于2020年4月2日周四 下午7:22写道:
>>
>> Hi!
>> > I am sorry that when I run the serialcheck on my laptop,
>> > there always has some error as follow,which mean I cannot
>> > verify the serialcheck on my computer for now.
>> > Failed to ioctl(,TIOCGICOUNT,)  -- test ttyUSB0
>>
>> This one can be ignored, that just means that the counters are not
>> implemented and the statistics are not printed at the test end.
>>
>> > tcgetattr() failed: Input/output error -- test ttyS0
>> > I am trying to find available machine and then run test.
>>
>> That looks like there is no UART to begin with.
>>
>> --
>> Cyril Hrubis
>> chrubis@suse.cz

Hi Cyril:
I would like to know how is it going? lastweek I send the test data .
hope it will helpful.
In my test result  we can found if Rx Tx in different rate,  the test will fail.

1. test ttyUSB0 in loopback use the same baudrate of Rx and Tx , test
pass with 5loop
root@Y50:/home/gcx/project/serialcheck# serialcheck  -b 115200 -d
/dev/ttyUSB0 -f binary -l 5 -m r -k
Needed 64 reads 0 writes loops 5 / 5
Failed to ioctl(,TIOCGICOUNT,)
gcx@Y50:~/project/serialcheck$ serialcheck -b 115200 -d /dev/ttyUSB0
-f binary -m t -l 5 -k
Needed 0 reads 1 writes loops 5 / 5
Failed to ioctl(,TIOCGICOUNT,)
2. test ttyUSB0 in loopback use different baudrate ,Error at the fist loop
root@Y50:/home/gcx/project/serialcheck# serialcheck  -b 9600 -d
/dev/ttyUSB0 -f binary -l 5 -m r -k &
[1] 20764
gcx@Y50:~/project/serialcheck$ serialcheck -b 115200 -d /dev/ttyUSB0
-f binary -m t -l 5 -k
Needed 0 reads 1 writes loops 5 / 5
Failed to ioctl(,TIOCGICOUNT,)
Needed 64 reads 0 writes Oh oh, inconsistency at pos 502 (0x1f6).

Original sample:
000001c0: 91 95 eb b6 82 e9 2a e6  16 5a da a3 c2 51 c4 c9   ......*..Z...Q..
000001d0: c5 51 e1 b7 c9 76 67 d5  09 57 80 77 eb bf 6d d7   .Q...vg..W.w..m.
000001e0: 08 a6 7b fd 52 1b 12 8e  f2 50 c1 b7 a7 52 35 39   ..{.R....P...R59
000001f0: 54 d4 50 96 49 55 35 30  33 52 80 89 8e a9 1e a2   T.P.IU503R......
00000200: 2c a5 0d 1a 26 f6 ea 77  a4 4a b9 69 34 17 cc bc   ,...&..w.J.i4...
00000210: e2 6e 0c f9 e1 11 39 9f  fd ce 94 9e 19 30 f4 1c   .n....9......0..

Received sample:
000001c0: 91 95 eb b6 82 e9 2a e6  16 5a da a3 c2 51 c4 c9   ......*..Z...Q..
000001d0: c5 51 e1 b7 c9 76 67 d5  09 57 80 77 eb bf 6d d7   .Q...vg..W.w..m.
000001e0: 08 a6 7b fd 52 1b 12 8e  f2 50 c1 b7 a7 52 35 39   ..{.R....P...R59
000001f0: 54 d4 50 96 49 55 06 9a  92 01 89 8e a9 1e a2 2c   T.P.IU.........,
00000200: a5 0d 1a 26 f6 ea 77 a4  4a b9 69 34 17 cc bc e2   ...&..w.J.i4....
00000210: 6e 0c f9 e1 11 39 9f fd  ce 94 9e 19 30 f4 1c 74   n....9......0..t
loops 1 / 5


More information about the ltp mailing list