All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <monstr@monstr.eu>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 1/7] test/py: Implement pytest infrastructure
Date: Mon, 4 Jan 2016 13:41:21 +0100	[thread overview]
Message-ID: <568A6871.5030802@monstr.eu> (raw)
In-Reply-To: <56745177.9040400@wwwdotorg.org>

On 18.12.2015 19:33, Stephen Warren wrote:
> On 12/18/2015 07:50 AM, Michal Simek wrote:
>> Hi Stephen,
>>
>>>>               Finally, the example scripts support two boards; my
>>>>          home/laptop dev
>>>>               setup that uses a Numato relay board to control the
>>>> signals
>>>>          to the
>>>>               board I use there, and my work desktop dev setup that
>>>> uses our
>>>>               "PM342" debug board to controll the signals. The latter
>>>> works
>>>>               logically the same as the numato relay board, except it
>>>>          contains
>>>>               electronic switches driven by an FTDI chip.
>>>>
>>>>          I expect this is FTDI chip on the target right?
>>>>
>>>>
>>>>      It's actually a separate common debug board. Most/all of our
>>>>      development boards (and perhaps some production boards) have a
>>>>      standardized connector into which the common debug board plugs.
>>>>
>>>>
>>>>
>>>> ok.
>>>> I think my setup is not that far from what you are using and I expect
>>>> that others SoCs will be very similar.
>>>> Do you have any other testcases which you are running and you haven't
>>>> sent?
>>>
>>> Not at present.
>>>
>>> As an FYI, I typically publish my local work-in-progress branch at:
>>> git://github.com/swarren/u-boot.git tegra_dev
>>
>> I have looked at your patches and no problem to get it work on
>> microblaze and zynq board. I do use kermit without any problem.
>> I used cu on Microblaze.
> 
> Great!


btw: Is there any reason that you don't allow to clone your git repos?

> 
>> - What I do miss is power off functionality because it is not practical
>> to keep board always on. On can be solved via reset script.
> 
> Yes, I would expect that the flash or reset script would turn the board
> on. It should be easy to add an extra hook script at the end which turns
> the board off. Or, whatever automation system you use to invoke test.py
> could simply do that right after running test.py.
> 
>> - Then place tests to separate folder for better separation.
> 
> You mean e.g. test/py/tests/ ?

yes.


>> - Is there any way to handle timeouts or stucks? For example to
>> recognize if sleep 60 fails or just takes long. It means setting up
>> timeouts will be good.
> 
> ubspawn.py:expect() does have a timeout capability, and
> uboot_console_base.py:ensure_spawned() sets this to 30s by default.
> There isn't currently any example of modifying or saving/restoring the
> timeout, or running commands that are expected to have a timeout,
> although either should be pretty easy to add. I expect the result would
> look something like this in a test:
> 
> with uboot_console.push_timeout(60000 + some_margin):
>     uboot_console.run_command("sleep 60")
> # Perhaps the actual time taken should be validated here too
> 
> with uboot_console.timeout_is_expected(10000):
>     # code that is expected to time out
> # Perhaps the following command would be integrated into the
> # timeout_is_expected() implementation, since I think it's the only
> # way you could recover from this situation?
> uboot_console.ctrlc()
> 
> ... both modelled after the existing uboot_console.disable_check() code.

I think this should be the part of sleep testing.

> 
>> I will have more comments when I spend more time with it but it looks
>> pretty good for start.

Then I see incorrect timeout reporting with tftpboot

Loading:
*%08#################################################################
	 ######################
	 2.4 MiB/s

Regarding board-identity parameter. If not setup you are using "na" but
I think CONFIG_IDENT_STRING can be used instead.
Also I would like to have this parameter available in test because for
ethernet testing will be good to have several folders with golden images
for testing.

Also is there a way to run one particular test for easier developing. I
know that I can simply remove all testing files but better option will
be useful.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160104/27c9d594/attachment.sig>

  parent reply	other threads:[~2016-01-04 12:41 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-02 22:18 [U-Boot] [PATCH V2 1/7] test/py: Implement pytest infrastructure Stephen Warren
2015-12-02 22:18 ` [U-Boot] [PATCH V2 2/7] test/py: test that sandbox exits when asked Stephen Warren
2015-12-19 22:24   ` Simon Glass
2015-12-02 22:18 ` [U-Boot] [PATCH V2 3/7] test/py: add test of setenv/printenv/echo Stephen Warren
2015-12-18 13:50   ` Michal Simek
2015-12-18 18:09     ` Stephen Warren
2016-01-04  8:36       ` Michal Simek
2015-12-19 22:24   ` Simon Glass
2015-12-02 22:18 ` [U-Boot] [PATCH V2 4/7] test/py: test the md/mw commands Stephen Warren
2015-12-18 13:51   ` Michal Simek
2015-12-18 18:15     ` Stephen Warren
2015-12-19 22:24   ` Simon Glass
2015-12-02 22:18 ` [U-Boot] [PATCH V2 5/7] test/py: add test of basic shell functionality Stephen Warren
2015-12-19 22:24   ` Simon Glass
2015-12-02 22:18 ` [U-Boot] [PATCH V2 6/7] test/py: test the shell if command Stephen Warren
2015-12-19 22:24   ` Simon Glass
2016-01-04 21:18     ` Stephen Warren
2015-12-02 22:18 ` [U-Boot] [PATCH V2 7/7] test/py: test the ums command Stephen Warren
2015-12-19 22:24   ` Simon Glass
2016-01-04 21:19     ` Stephen Warren
2015-12-03  6:47 ` [U-Boot] [PATCH V2 1/7] test/py: Implement pytest infrastructure Heiko Schocher
2015-12-07 21:51   ` Stephen Warren
2015-12-08  5:42     ` Heiko Schocher
2015-12-09 16:32 ` Stephen Warren
2015-12-16 15:11   ` Michal Simek
2015-12-16 16:27     ` Stephen Warren
2015-12-16 17:43       ` Michal Simek
2015-12-16 18:09         ` Stephen Warren
2015-12-16 18:32           ` Michal Simek
2015-12-16 18:41             ` Stephen Warren
2015-12-18 14:50               ` Michal Simek
2015-12-18 18:33                 ` Stephen Warren
2015-12-18 22:36                   ` Stephen Warren
2016-01-04  8:50                     ` Michal Simek
2016-01-04 12:41                   ` Michal Simek [this message]
2016-01-04 20:34                     ` Stephen Warren
2015-12-17  5:45       ` Heiko Schocher
2016-01-14 23:12         ` Simon Glass
2016-01-16  6:29           ` [U-Boot] U-Boot: using tbot for U-Boot tests was: " Heiko Schocher
2016-01-19  3:42             ` Simon Glass
2016-01-19 11:42               ` Heiko Schocher
2015-12-19 22:24 ` [U-Boot] " Simon Glass
2016-01-04 21:16   ` Stephen Warren
2016-01-04 22:23   ` Stephen Warren

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=568A6871.5030802@monstr.eu \
    --to=monstr@monstr.eu \
    --cc=u-boot@lists.denx.de \
    /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.