[Fuego] target_reboot during test_run

Maciej Pijanowski maciej.pijanowski at 3mdeb.com
Thu Jan 12 22:44:06 UTC 2017


Hello,

Recenty we've started to use Fuego as a test framework for our project. 
We had
some success with first tests, but then we began to struggle when it 
came to test
our system upgrade process. It requires us to perform target reboot 
during test.
For example, a part of a test (or one of tests) would be to check current
mounted rootfs partition, perform target reboot, and after reboot check 
again
which one from the rootfs partitions has been mounted. Few issues have been
spotted there:

   - systemlogs.before were missing - I understand that the reason is that
     systemlogs are stored under /tmp and transferred to host in post_test
     function; if reboot occours /tmp is being cleared and logs are gone
   - there are no testlogs on host
   - overall test fails due to connection loss; after reboot it enters 
post_test
     function immediately - commands inside test_deploy function located 
after
     target_reboot command are never executed

The same failure happens when trying to run default Benchmark.Reboot 
test with
default testplan. To be more specific: after reboot it enters post_test
function and report function never is never executed.

function test_run {
     # MAX_REBOOT_RETRIES can be defined in the board's file.
     # Otherwise, the default is 20 retries
     retries=${MAX_REBOOT_RETRIES:-20}
     target_reboot $retries
     report "cd $FUEGO_HOME/fuego.$TESTDIR; ./reboot"
}

 From what I've found there [1] it looks like Benchmark.Reboot is (used 
to) work
properly.

I've also found FIXME note in documentation regarding report function 
[2]. Does
this apply in my case?

My question is: what is the current state of target_reboot during
test_run phase? Maybe I'm missing something or not running Benchmark.Reboot
properly - if so, what would be the correct way?

Thanks for any advice.

[1] 
https://lists.linuxfoundation.org/pipermail/fuego/2016-November/000100.html
[2] http://bird.org/fuego/function_report


-- 
Maciej Pijanowski
Embedded Systems Engineer
http://3mdeb.com | @3mdeb_com



More information about the Fuego mailing list