calliope-edu / CalliopEO_AstroPi

MIT License
1 stars 2 forks source link

testcase 08a fails occasionally: check of MD5 for .data files not okay #74

Closed rzbrk closed 3 years ago

rzbrk commented 3 years ago

Output says:

Start #10 ./testcases/08a_data-limit.sh
---------------------------------
Test: Handle data limit threshold
---------------------------------

-=# CalliopEO #=-
Unpacked /home/calliope/src/CalliopEO_AstroPi/01.zip

programming: /home/calliope/src/CalliopEO_AstroPi/run_20210810-184855/01.hex
done
open serial port
Calliope Mini found on /dev/ttyACM0  ..........
done
reading data

Start @ 2021/08/10-18:49:11; Will stop @ 2021/08/10-21:54:11

Sending @START@

Sending @START@

Received @START@
*****************************************************************************************************************************************************************************
**************************************
Max file size achieved

done
############################################################################################################

Check 1/6: Return code is 0 ... PASSED
Check 2/6: ZIP archive renamed to .done ... PASSED
Check 3/6: Folder run_* created ... PASSED
Check 4/6: Created two .data files ... PASSED
Check5/6: MD5 checksum in folder ./run_20210810-184855 ... md5sum: WARNING: 1 computed checksum did NOT match
NOT PASSED
Check 6/6: First .data meets the size threshold (8000 bytes) ... PASSED
Testcase failed.
---------------------------------
Finished #10 ./testcases/08a_data-limit.sh
rzbrk commented 3 years ago

@Amerlander : Can you reproduce it on your system?

rzbrk commented 3 years ago

Mmmh, this problem seems to occur only sometimes ...

I think it is related to the high data rate on the serial port using burst.hex.

rzbrk commented 3 years ago

Okay, I think I found the problem. This is how the .data file looks like, when the testcase 08a fails:

...
2000/01/01-00:00:00.000000 plzkillme!
2000/01/01-00:00:00.000000 plzkillme!
2000/01/01-00:00:00.000000 plzkillme!
2000/01/01-00:00:00.000000 plzkillme!                 me!
2000/01/01-00:00:00.000000 plzkillme!
2000/01/01-00:00:00.000000 plzkillme!
2000/01/01-00:00:00.000000 plzkillme!
2000/01/01-00:00:00.000000 plzkillme!
...

One line contains additional characters that will spoil the md5 checksum test.

I already speed down burst.hex by introducing a control.waitMicros(1000) after the serial.writeLine().

rzbrk commented 3 years ago

I increased control.waitMicros() to 100 ms and now it seems to work. made multiple runs, all successful! :)

rzbrk commented 3 years ago

Can be closed if PR #75 is merged.