All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bird, Timothy" <Tim.Bird@sony.com>
To: Rafael Gago Castano <RGC@hms.se>
Cc: "fuego@lists.linuxfoundation.org" <fuego@lists.linuxfoundation.org>
Subject: Re: [Fuego] First steps with fuego
Date: Fri, 12 May 2017 18:39:09 +0000	[thread overview]
Message-ID: <ECADFF3FD767C149AD96A924E7EA6EAF1FA88C0A@USCULXMSG01.am.sony.com> (raw)
In-Reply-To: <HE1PR06MB30365DD87F5942695ED855B7C2E20@HE1PR06MB3036.eurprd06.prod.outlook.com>


> -----Original Message-----
> From: Rafael Gago Castano Friday, May 12, 2017 7:34 AM
> To: Bird, Timothy <Tim.Bird@sony.com>
> Cc: fuego@lists.linuxfoundation.org
> Subject: Re: First steps with fuego
> 
> As I have no infinite budget to investigate fuego, I decided to skip looking at
> that signal error on "ls" and to assume that we can do communication tests
> with fuego, it may need some refinements but there isn't any big barrier.

OK good.  Don't hesitate to ask questions.  We don't want people to burn
out trying to understand Fuego (which is admittedly a bit complicated),
and it's very helpful for us to see what issues come up and what
questions people have, so we can improve Fuego.

> As a matter of fact for our use case it's simpler than by using LAVA multinode
> tests.
That's good to hear.  Hopefully we can add some synchronization primitives
to match the functionality available with LAVA more easily.

> 
> Then I started looking at the device "power off + power off + flashing + wait
> for boot" procedure. I tried to do it as a test but it had a problem, when the
> device is rebooting it hasn't connectivity, so it does fail:
> 
> SDKTARGETSYSROOT=/opt/slp/dingo-next/sdk/sysroots/cortexa9hf-neon-
> oe-linux-gnueabi
> Target_PreCleanup=true
> _=/usr/bin/env
> ssh: connect to host 192.168.1.2 port 22: No route to host
> ssh: connect to host 192.168.1.2 port 22: No route to host
> 
> *** ABORTED ***
> 
> Fuego error reason: Cannot connect to 192.168.1.2 via ssh
> 
> in signal_handler
> ##### doing fuego phase: post_test ########
> 
> I guess that to do "power off + power off + flashing + wait for boot" would
> require a different approach than writing a test.
> 
> At first I thought about having two new types of tests: setup and teardown,
> but these aren't conceptually tests. IMO these belong to the board, so just
> adding an optional "setup" and "teardown" functions to the board file could
> be a good starting point.
> 
> Then the problem would be to decide when to run them. Running them as a
> test (of a new type) makes very explicit to see and control when they run.
> Having them on the board file would need rules or maybe flags for "ftc",
> because the setup/teardown functions should definitely run as the first and
> last actions of a testplan/batch, but they would be detrimental when
> developing tests.
It sounds like this is the best approach.  See below for some existing 
fuego functionality that might be useful for this.

> 
> Then the third approach would be to leave the board setup and teardown to
> the Jenkins side and let the user handle the integration. This makes the user
> to have more scattered configuration (configure boards in two places) but
> keeps Fuego simpler. I'm not very fluent  with Jenkins hacking but it seems
> doable too.
> 
> Which approach seems the best?

There are variables now, that you can define on a board, to handle
link setup and link teardown.  I think these could be also be used for
the purpose of system redeploy and board boot.

If you define TARGET_SETUP_LINK in your board file, as the name
of a function, then Fuego will call that function during the 'pre_test' phase.

This is not well-documented on the wiki (there's one obscure
reference to it on this page: http://bird.org/fuego/function_pre_test  )
The reason this is  not well-documented yet is that this functionality
is currently undergoing some change.  We are switching to using
explicit transport routines, which can be overridden in the board file.
That is, I've just added support for new routines ov_transport_connect
and ov_transport_disconnect that are intended to replace this
functionality.  However, we plan on leaving in support for this
functionality for legacy reasons, and you should be able to use the
current technique to do anything you want to get the board
operational and ready for network communication (including build,
system deploy, and boot), in your own custom routine.

Here's an example (I haven't tested):
You put this in your <board>.board file for the DUT.

function my_custom_board_bringup {
  echo "do a bunch of interesting stuff here"
}
TARGET_SETUP_LINK="my_custom_board_bringup"

By default, things defined in the board file will be executed for
every test. However, you might make the setup conditional
by testing some condition inside your custom setup function, to decide
when the operation is needed.  For example, maybe you could set
a variable in a spec file that is examined in the custom routine to decide
whether to skip it.

Note that similar functionality for link teardown (or board shutdown)
is available using TARGET_TEARDOWN_LINK, which is called in the
post_test phase by Fuego.

I hope this addresses what you need.
 -- Tim


  reply	other threads:[~2017-05-12 18:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-09  9:49 [Fuego] First steps with fuego Rafael Gago Castano
2017-05-09 19:04 ` Bird, Timothy
2017-05-10  6:32   ` Rafael Gago Castano
2017-05-10 13:12   ` Rafael Gago Castano
2017-05-10 19:30     ` Bird, Timothy
     [not found]       ` <HE1PR06MB3036959D51FD5FBFC02208C8C2ED0@HE1PR06MB3036.eurprd06.prod.outlook.com>
     [not found]         ` <ECADFF3FD767C149AD96A924E7EA6EAF1FA88A98@USCULXMSG01.am.sony.com>
2017-05-12  9:38           ` Rafael Gago Castano
2017-05-12 18:05             ` Bird, Timothy
2017-05-15  8:21               ` Rafael Gago Castano
2017-05-12 14:33         ` Rafael Gago Castano
2017-05-12 18:39           ` Bird, Timothy [this message]
2017-05-15 13:57             ` Rafael Gago Castano
2017-05-15 22:37               ` Bird, Timothy
2017-05-16 14:38                 ` Rafael Gago Castano
2017-05-17  5:06                   ` Bird, Timothy
2017-05-17  6:35                     ` Rafael Gago Castano
2017-05-17 15:33                       ` Bird, Timothy
2017-05-22  8:23                         ` Rafael Gago Castano
2017-05-22 20:51                           ` Bird, Timothy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ECADFF3FD767C149AD96A924E7EA6EAF1FA88C0A@USCULXMSG01.am.sony.com \
    --to=tim.bird@sony.com \
    --cc=RGC@hms.se \
    --cc=fuego@lists.linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.