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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 7DE4BC00144 for ; Mon, 1 Aug 2022 13:59:02 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5809C83F9A; Mon, 1 Aug 2022 15:59:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="Bvef2pbC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 46EC281115; Mon, 1 Aug 2022 15:58:58 +0200 (CEST) Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232]) (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 F1CB48440A for ; Mon, 1 Aug 2022 15:58:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-oi1-x232.google.com with SMTP id c185so13110892oia.7 for ; Mon, 01 Aug 2022 06:58:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=nRJJT5aaAAoK+IS9JXUUocwxOykInfrqCDDJpPm+hNs=; b=Bvef2pbC/SzacxxhvYUnSlEAvvrAfHUkr8D3n9tNGcuN2Qi9CVZl4zw33HAIDpzCWj Gij/2VoqUYPL3+lnXJY6ykBVDXcRE1Mtrr6t4je5tVtILW2nybxI+d2xzxRc2pX39pTN 9GQ3tTsuzpNDrq1yUg6ZXWX4ckui+NIYB0h94= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=nRJJT5aaAAoK+IS9JXUUocwxOykInfrqCDDJpPm+hNs=; b=CSehd2m8lQHbFAiNtrAOP0UoiOSIblGzFa5YrPcuxjKMTMtszxmMxpG3jAdcnjz2yb q8KyHy3dbIZ0cxfM6WRJ0m9LStdFjHtc95wTJHQL58/82lkS/tgyu+pm9b4/hVuUM9gh FLYUnLtv2Z+VwvH5QEEvutiGVyaWM6lml6rjWsZKEgHS/i1gR4pOKABID5rKQdD/2xD7 kgvUq04penhTgMvB4l/RRqZT52DDytNzLWNZUu9NBOIVu85XnTxf76yCqp1bU6sqQxMr iIvDlIP9MouiTc8ZlHDvBbQCsMe9omWFvSqbKrGXpQfXZfHuPDTfF6h4RLYsUmEsw/zy 4YFw== X-Gm-Message-State: AJIora/WK71purYcuZkVk/IxhO3mHW6Q/StjSvLCsrD1AVvAH50nhnEx KB3oWjtT9yYJ2XjxLOT2yFCs+YQYUflvDg== X-Google-Smtp-Source: AGRyM1t6lz/8d4gxKLHXmAH/PT7wzF6l++savCOIBL5fwuw0yDT3ym208ciiqJjP2yu7MfeNhmCfSQ== X-Received: by 2002:aca:3016:0:b0:33a:e991:54ce with SMTP id w22-20020aca3016000000b0033ae99154cemr6601261oiw.107.1659362334496; Mon, 01 Aug 2022 06:58:54 -0700 (PDT) Received: from sjg1.lan (c-67-190-102-125.hsd1.co.comcast.net. [67.190.102.125]) by smtp.gmail.com with ESMTPSA id a14-20020a9d3e0e000000b0061cf85b2a0csm2743161otd.5.2022.08.01.06.58.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Aug 2022 06:58:54 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Tom Rini , Simon Glass , Andrew Scull , Marek Vasut , Pavel Herrmann , Rui Miguel Silva Subject: [PATCH 0/5] rtc: Work around race conditions Date: Mon, 1 Aug 2022 07:58:43 -0600 Message-Id: <20220801135848.992449-1-sjg@chromium.org> X-Mailer: git-send-email 2.37.1.455.g008518b4e5-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean This series includes some patches to work around race conditions in the rtc tests, as well as a mechanism to run unit tests more than once. With 1000 runs I normally see three failures in the tests addressed here. With this series no failures are seen. This also includes a work-around for the daylight-saving changeover. Simon Glass (5): dm: rtc: Make use of ut_assertnonnull() test: Allow running tests multiple times dm: rtc: Avoid a race in the rtc_reset test dm: rtc: Try to avoid a race in rtc_set_get test dm: rtc: Try to handle the localtime() race arch/sandbox/cpu/spl.c | 2 +- doc/develop/tests_sandbox.rst | 24 ++++++++++++++++ include/test/test.h | 2 ++ include/test/ut.h | 3 +- test/cmd_ut.c | 12 ++++++-- test/dm/rtc.c | 53 +++++++++++++++++++++++++---------- test/dm/test-dm.c | 13 +++++++-- test/test-main.c | 14 +++++++-- 8 files changed, 98 insertions(+), 25 deletions(-) -- 2.37.1.455.g008518b4e5-goog