From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE7A3C433FE for ; Wed, 27 Oct 2021 13:22:58 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5E5C360041 for ; Wed, 27 Oct 2021 13:22:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5E5C360041 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 666B78329E; Wed, 27 Oct 2021 15:22:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="rQQorv8T"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B920F83230; Wed, 27 Oct 2021 15:22:54 +0200 (CEST) Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C19FF83230 for ; Wed, 27 Oct 2021 15:22:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x833.google.com with SMTP id c28so2351836qtv.11 for ; Wed, 27 Oct 2021 06:22:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Hae/1d5mi73yDLn9Jyq7fYUpKBCSn2DJbwlXm4675tk=; b=rQQorv8T2jvpF4RHsuP5gqvp2dzmwqo6FKb+Kn/1uE9x5pxOxa6or6/ibtShLTub5F SCehaVzm5EAXx+QpDR3T3L+bCGFCctiVeKqsBL1Jf8oqT7AJ8toQ7hTZiYh7KRz1OlX6 txa01ybm9B9m8tjkSFAV6uPOBm7/8kRqudRBE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Hae/1d5mi73yDLn9Jyq7fYUpKBCSn2DJbwlXm4675tk=; b=tiKeT5vN65EfRj89JxiC/bE8tVFC3OwkvkiFsp2KpeJQ4TfoQrsGdUnlgmHpecWbhU rFa5bqLBM0W453pTl752gEBTRFTolwlH9KX3D6cd6J0UxkWKwt+u7K1kqO1B6BfWOVcX C6dLX3V6GcbdFrXpYWZ8BoCRGRX6MsaexeA7EGyW1W0Y3ApfpF3HxfPXxWoMy/eyU7dt KcqJprx2NZkAP7ybqVYgbRpPyI+GiSjRxS2+4iiehaFfsoRqKYpw+Oguptx1E4R05x9G gE9BVo3juRhzLk6Hpv9qBjrHqG7jHQzRxGz91RYn0PdKXzlNOPmznCokNvEEqkrYYPCS qUDw== X-Gm-Message-State: AOAM531A9QoA5Hdsm+dcxq4ZNPFdOwpcS1i8c3fBwXv41qptJrkdDwmM 4uJywBCykqDVcOZ3TlzEUEYBT3/+PXqXiQ== X-Google-Smtp-Source: ABdhPJyiVifHwZ+h2p+AglJMh0vp6ciqz2cGwjKD12yAhxRVGi8wBkNragtFlk/b1/VLNdYulNNbCQ== X-Received: by 2002:ac8:5407:: with SMTP id b7mr32164910qtq.27.1635340969421; Wed, 27 Oct 2021 06:22:49 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-0044-6cb5-81ac-bb0c.res6.spectrum.com. [2603:6081:7b01:cbda:44:6cb5:81ac:bb0c]) by smtp.gmail.com with ESMTPSA id v12sm3171983qtw.57.2021.10.27.06.22.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 06:22:48 -0700 (PDT) Date: Wed, 27 Oct 2021 09:22:47 -0400 From: Tom Rini To: Bin Meng Cc: Simon Glass , U-Boot Mailing List Subject: Re: an off-by-one error in dm_test_rtc_set_get()? Message-ID: <20211027132247.GU8284@bill-the-cat> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TJ9V72hR/LoebVea" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean --TJ9V72hR/LoebVea Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 27, 2021 at 12:43:38PM +0800, Bin Meng wrote: > Hi Simon, >=20 > gitlab reported the following test error below: >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D FAILURES =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > __________________________ test_ut[ut_dm_rtc_set_get] ___________________= _______ > test/py/tests/test_ut.py:43: in test_ut > assert output.endswith('Failures: 0') > E AssertionError: assert False > E + where False =3D 0x7f3bb792dcb0>('Failures: 0') > E + where =3D > 'Test: dm_test_rtc_set_get: rtc.c\r\r\nexpected: 27/10/2021 > 03:38:15\r\r\nactual: 27/10/2021 03:38:14\r\r\ntest/dm/rtc...w, &cmp, > 1): Expected 0x0 (0), got 0xffffffea (-22)\r\r\nTest: > dm_test_rtc_set_get: rtc.c (flat tree)\r\r\nFailures: 1'.endswith > ----------------------------- Captured stdout call ----------------------= ------- > =3D> >=20 > See https://source.denx.de/u-boot/custodians/u-boot-x86/-/jobs/341905 >=20 > But the same branch same commit, azure test results passed: > https://dev.azure.com/bmeng/GitHub/_build/results?buildId=3D460&view=3Dre= sults >=20 > It looks like the error is an off-by-one where actual time is 1 second > behind the expected time? >=20 > expected: 27/10/2021 03:38:15 > actual: 27/10/2021 03:38:14 >=20 > Is this a known issue? Yes, which is why the test checks for a certain amount of "fuzz" around the return value. I've wondered about if we need to increase that value slightly sometimes, or just live with hitting the re-run failed jobs button on whatever CI system was a bit too slow sometimes. --=20 Tom --TJ9V72hR/LoebVea Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmF5UqYACgkQFHw5/5Y0 tyzS+Qv/X/bqEmDDq90lFAJdSd/cw3BYG7oyMu5+oz0D/yFEJcqwMhR85NC7Cokh rN1K7jdj2H+4+S2wHfw9H42b3O4yLu4od0/e5d3J0BbOqxHDWbHKke0tk3IUc4SM oaqczzTF+jaqlx+u9l2g0azg63bknIs6zfTOOHtdOz2SuARjIQG79dyzOl2L+Emi f44aQAET//JPfEs5fXqBXYPIN4t9u4iOkWngJfPu9WSQ+1sNBffBR4kCU1a4R5IV xkfNdzMpJY3I9twfMdPQB3BM6IvFO1yLz2EAhmuRaBCPlo6pMxfedogrb+ayS1rp 6E8lLOnvOTTSf9x2dynBPb3puq566IyAP55LSyEhmKY0U/O2DhucWIZ+vOItyk6S nVMWgQWIAL63fYg6G3hxFN6NAADZiQA73Tg7PrKClUwr2hbNE9VhK2/Iso6m24wj TM18w0jgIdSQYRgbmnTiavTT9kdIFLld9a8Y4bUVeiOp4uBD0nayjJe1GCYx4W5V 14Qhiei4 =CYQM -----END PGP SIGNATURE----- --TJ9V72hR/LoebVea--