[Fuego] target_reboot during test_run

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


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 
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 
     function immediately - commands inside test_deploy function located 
     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
     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

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.

[2] http://bird.org/fuego/function_report

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

More information about the Fuego mailing list