Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1lCw1U-00063C-8A for mharc-grub-devel@gnu.org; Thu, 18 Feb 2021 22:00:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCw1R-0005zf-Fw for grub-devel@gnu.org; Thu, 18 Feb 2021 22:00:01 -0500 Received: from mail-qk1-x72d.google.com ([2607:f8b0:4864:20::72d]:40498) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lCw1P-0005SQ-QE for grub-devel@gnu.org; Thu, 18 Feb 2021 22:00:01 -0500 Received: by mail-qk1-x72d.google.com with SMTP id t62so4345605qke.7 for ; Thu, 18 Feb 2021 18:59:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Qz3yb1ilLMqNrTg4vV09vdRGUOyLzGY3FunK1J9JDOs=; b=ILDhfzYeG/hNuoMJWU5ZM5Pi8TodCTc76mty7KiPCpZH4uioBwoAz+1HKL3amuwqxk arucpeTj1GAAxEgVPeB0TAlqCp1qRXKeyjrXCgkv2jU5mq78tglqdSYYnMsFy1ID0P5r 5TkpWcGehM2EnJlhQVglU5898oYqkIRrej4krGxljqT3R7pCcplTPffXcTqTHO7e/8FO cLHuxAk5t26Ug64XvWL3ivpRaBGMI6rqVL70ovn3Rf1Eh7Zjcq6SIRApC4V8ikwFYGla uUPZH42UYMnsNNkaDzPiAaMNcyRnZKozZ9PIx/LxMGWCavtc9P/E3JqNahwZXE8Yv+s1 YLcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Qz3yb1ilLMqNrTg4vV09vdRGUOyLzGY3FunK1J9JDOs=; b=IjjdX67bpkwofzI861uznar5JLq7pdnKgpsFB/qCbuuN0wIOKmNQS+rmaIcH95dmwi nJCFt5xJYBrCBdgSQB2pgBX4K8dVDvhdZjwge7JQl6nNkgINjywrM6WfOHp4dNKuraaq TjvwQ9vRj83ZTT37vSmfrQ7L1I36TWnEt5RdOSoj3d9Vxzpi3qKcbbb2DrN7h1fUtpOX znEPrNIoqV50AxgCn0NyIwz6H0X23bmC7KqcZID5XMQhlafH9N/J6bTo5ho04QDHpGIT RBWWSiEK6weVLA6FO0wHgnhEwVROfEWRWJX/TZMiNdQaYZRJESOeAJc/FRAiY9Co7hhL 0amA== X-Gm-Message-State: AOAM532dN9n4BPjrKJKrmxf+NnKohXjhGSp2aUdYggkQI2krZmmFXxc8 CnmA6W/wTKb7ONhXEmfrkCz2Ph+TzSqyBA== X-Google-Smtp-Source: ABdhPJyX1XYbNettMk7IgRNuOd2p7+yLmS67Av9a0uOupJCfWsN3uQFtmh1wC4hz/WwuQi+P2neyFw== X-Received: by 2002:a37:be86:: with SMTP id o128mr7387362qkf.481.1613703598646; Thu, 18 Feb 2021 18:59:58 -0800 (PST) Received: from localhost.localdomain ([2605:a601:aac5:3700:c323:c101:d96b:34f1]) by smtp.gmail.com with ESMTPSA id b17sm2468294qtq.56.2021.02.18.18.59.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 18:59:58 -0800 (PST) From: Glenn Washburn To: grub-devel@gnu.org Cc: Daniel Kiper , Glenn Washburn Subject: [CI 03/17] tests: When checking squashfs fstime, use superblock last modified time Date: Thu, 18 Feb 2021 20:59:22 -0600 Message-Id: <85e2fe15444bcf16baba759a0df2b1f097e0a508.1613698435.git.development@efficientek.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::72d; envelope-from=development@efficientek.com; helo=mail-qk1-x72d.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 03:00:01 -0000 Currently, the filesystem timestamp check in grub-fs-tester uses the squashfs image file's last modified timestamp and checks to see if that time stamp is within 3 seconds of the superblock timestamp as determined by grub. The image file's timestamp could be more than 3 seconds off if mksquashfs takes more than 3 seconds to generate the image, as is the case on a low power machine. Instead use squashfs tools to get the filesystem timestamp directly. Signed-off-by: Glenn Washburn --- tests/util/grub-fs-tester.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in index bfc425e1f..4213b7bfc 100644 --- a/tests/util/grub-fs-tester.in +++ b/tests/util/grub-fs-tester.in @@ -1351,6 +1351,12 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do # With some abstractions like mdraid flushing to disk # may be delayed for a long time. FSTIME="$UMOUNT_TIME";; + xsquash*) + # Creating the squash image may take more than a few + # seconds. Use the more accurate timestamp from the + # superblock. + FSTIME="$(unsquashfs -s "${FSIMAGEP}0.img" | grep ^Creation | awk '{print $6 " " $7 " " $8 " " $9 " " $10; }')" + FSTIME="$(date -d "$FSTIME" -u '+%Y-%m-%d %H:%M:%S')";; *) FSTIME="$(TZ=UTC ls --time-style="+%Y-%m-%d_%H:%M:%S" -l -d "${FSIMAGEP}0.img"|awk '{print $6; }'|sed 's,_, ,g')";; esac -- 2.27.0