All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: Rasmus Villemoes <rasmus.villemoes@prevas.dk>, u-boot@lists.denx.de
Cc: Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com>,
	Wolfgang Denk <wd@denx.de>
Subject: Re: [PATCH v6 12/12] sandbox: add test of wdt-uclass' watchdog_reset()
Date: Tue, 31 Aug 2021 17:03:22 +0200	[thread overview]
Message-ID: <7e5f8342-2507-4d0b-58b8-c5577c0ad9cf@denx.de> (raw)
In-Reply-To: <d5661f8d-182a-717c-0e9f-d3d0455514ac@prevas.dk>

On 31.08.21 11:29, Rasmus Villemoes wrote:
> On 31/08/2021 10.17, Stefan Roese wrote:
>> Hi Rasmus,
>>
>> I've pulled this patchset now into next [1] and have run it through
>> CI via Azure. Here an error occurs:
>>
>> https://dev.azure.com/sr0718/u-boot/_build/results?buildId=109&view=logs&j=50449d1b-398e-53ae-48fa-6bf338edeb51&t=97605dd2-f5a5-5dd7-2118-315ffdc8bcd6&l=533
>>
>>
>> Could you please take a look at this?
> 
> I'm pretty confident that has nothing to do with my patches, but is a
> broken (or, to put it more gently, fragile) test.
> 
> It does
> 
> // fetch the emulated device's current base_time value, setting it to 0
>          old_base_time = sandbox_i2c_rtc_get_set_base_time(emul, 0);
> 
> // fetch the emuluated device's current base_time value, don't (-1) set
> // a new value, check that we got 0
>          ut_asserteq(0, sandbox_i2c_rtc_get_set_base_time(emul, -1));
> 
> // call the device's ->reset method
>          /* Resetting the RTC should put he base time back to normal */
>          ut_assertok(dm_rtc_reset(dev));
> // fetch the new base_time value, without altering it
>          base_time = sandbox_i2c_rtc_get_set_base_time(emul, -1);
> // and check that the base time was put back to "normal"
>          ut_asserteq(old_base_time, base_time);
> 
> The thing is, the ->reset method does
> 
> static void reset_time(struct udevice *dev)
> {
>          struct sandbox_i2c_rtc_plat_data *plat = dev_get_plat(dev);
>          struct rtc_time now;
> 
>          os_localtime(&now);
>          plat->base_time = rtc_mktime(&now);
> 
> It's inevitable that this will cause occasional spurious failures. I can
> trivially reproduce it with
> 
> => while ut dm rtc_reset ; do echo . ; done
> 
> it fails after a few screenfuls of successes.

Thanks for looking into this.

Thanks,
Stefan

      parent reply	other threads:[~2021-08-31 15:03 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-19  9:56 [PATCH v6 00/12] handling all DM watchdogs in watchdog_reset() Rasmus Villemoes
2021-08-19  9:56 ` [PATCH v6 01/12] watchdog: wdt-uclass.c: use wdt_start() in wdt_expire_now() Rasmus Villemoes
2021-08-19  9:56 ` [PATCH v6 02/12] watchdog: wdt-uclass.c: introduce struct wdt_priv Rasmus Villemoes
2021-08-19  9:56 ` [PATCH v6 03/12] watchdog: wdt-uclass.c: neaten UCLASS_DRIVER definition Rasmus Villemoes
2021-08-19  9:56 ` [PATCH v6 04/12] watchdog: wdt-uclass.c: refactor initr_watchdog() Rasmus Villemoes
2021-08-19  9:56 ` [PATCH v6 05/12] watchdog: wdt-uclass.c: keep track of each device's running state Rasmus Villemoes
2021-08-19 11:35   ` Wolfgang Denk
2021-08-19  9:57 ` [PATCH v6 06/12] sandbox: disable CONFIG_WATCHDOG_AUTOSTART Rasmus Villemoes
2021-08-19  9:57 ` [PATCH v6 07/12] watchdog: wdt-uclass.c: add wdt_stop_all() helper Rasmus Villemoes
2021-08-19 11:37   ` Wolfgang Denk
2021-08-19  9:57 ` [PATCH v6 08/12] board: x530: switch to wdt_stop_all() Rasmus Villemoes
2021-08-19  9:57 ` [PATCH v6 09/12] watchdog: wdt-uclass.c: handle all DM watchdogs in watchdog_reset() Rasmus Villemoes
2021-08-19 11:43   ` Wolfgang Denk
2021-08-19  9:57 ` [PATCH v6 10/12] watchdog: add gpio watchdog driver Rasmus Villemoes
2021-08-19 11:46   ` Wolfgang Denk
2021-08-19 12:09     ` Rasmus Villemoes
2021-08-19 12:32       ` Wolfgang Denk
2021-08-19 12:35         ` Tom Rini
2021-08-19 13:03           ` Wolfgang Denk
2021-08-19 13:08             ` Tom Rini
2021-08-19 14:16               ` Wolfgang Denk
2021-08-19 14:44                 ` Simon Glass
2021-08-19 14:57                   ` Wolfgang Denk
2021-08-20 15:02                     ` Simon Glass
2021-08-23 11:07                       ` Wolfgang Denk
2021-08-23 17:25                         ` Simon Glass
2021-08-20  6:22         ` Rasmus Villemoes
2021-08-20 18:22           ` Simon Glass
2021-08-19  9:57 ` [PATCH v6 11/12] sandbox: add test of wdt_gpio driver Rasmus Villemoes
2021-08-19  9:57 ` [PATCH v6 12/12] sandbox: add test of wdt-uclass' watchdog_reset() Rasmus Villemoes
2021-08-31  8:17   ` Stefan Roese
2021-08-31  9:29     ` Rasmus Villemoes
2021-08-31 12:44       ` Tom Rini
2021-08-31 15:03       ` Stefan Roese [this message]

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=7e5f8342-2507-4d0b-58b8-c5577c0ad9cf@denx.de \
    --to=sr@denx.de \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=wd@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.