[Fuego] target_reboot during test_run

Bird, Timothy Tim.Bird at sony.com
Thu Jan 19 05:30:42 UTC 2017



> -----Original Message-----
> From: Maciej Pijanowski on Friday, January 13, 2017 10:30 AM
...
> I have changed all occurrences  of '/tmp' in above files to persistent storage.
> At this moment 'target_reboot` still causes test to fail. It seems to me that it
> is
> caused by:
> 
> ```
> 
> Write failed: Broken pipe
> Build step 'Execute shell' marked build as failure
> ```
> 
> I was able to overcome this by moving 'set +e' in 'target_reboot' to the
> top of this function [3]. Now both systemlogs and testlog are on host in
> test directory. 'Benchmark.Reboot' finishes with SUCCESS, however there is
> no
> plot because of missing modules ('ImportError: No module named
> matplotlib',
> 'ImportError: No module named simplejson'). It is a bit strange, since I've
> checked that these modules are installed for python2 inside fuego docker
> and this script seems to be executed by python2. I'll take a look into that.
> This test is not crucial for me, but I wanted to get default one working
> before experimenting with custom tests.
> 
> I came up with really simple test just to test this feature:
> 
> ```
> function test_run {
>     COMMAND="echo 123"
>     report "$COMMAND"
>     report_append "echo fail"
>     target_reboot 20
>     report_append "$COMMAND"
> }
> 
> function test_processing {
>     log_compare "$TESTDIR" "1" "^success" "p"
> }
> 
> ```
> 
> Testlog is on host and contains proper output from all 'report' and
> 'report_append' functions. I can even see the 'log_compare' result:
> 
> 
> ```
> Fuego error reason: Mismatch in expected (1) and actual (0) pos/neg (p)
> results.
> +++ check_create_functional_logrun failed
> +++ '[' '' ']'
> +++ false
> ```
> However, it always succeeds:
> 
> 
> ```
> 
> POST BUILD TASK : SUCCESS
> END OF POST BUILD TASK : 0
> Finished: SUCCESS
> ```
> 
> So it looks like renaming `/tmp` brought some improvements. Was my
> workaround for `target_reboot` appropriate? Any idea what may causing
> constant test success even in case as above?

Thanks very much for the thorough testing and feedback.  I've got a fix
on my local machine, that I'm pretty pleased with.  I had planned to check
it into the 'next' branch today, but stumbled onto another error that sidetracked
me.  I'll do some more testing on the fix and hopefully get it out tomorrow.

Regards,
 -- Tim


More information about the Fuego mailing list