From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1mImyC-0002ul-Ic for mharc-grub-devel@gnu.org; Wed, 25 Aug 2021 03:05:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54594) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mImy3-0002iB-Lq for grub-devel@gnu.org; Wed, 25 Aug 2021 03:04:59 -0400 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]:39504) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mImxy-0002Z2-5n for grub-devel@gnu.org; Wed, 25 Aug 2021 03:04:59 -0400 Received: by mail-qt1-x82d.google.com with SMTP id d2so19029671qto.6 for ; Wed, 25 Aug 2021 00:04:53 -0700 (PDT) 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=8TkqHcsgEG+OuTBDs5hHyd+ywC9awyZnzCMb+J5t4S0=; b=vr0tPCvF1DYLB7ueBVfDkdKMOH9jcUpeopgV5bvZeXmpLrS2XiPZy7rZNaxpP3D9OR DA6ejLkRCmEajTsk44Tx6Mt1NjDxeO+zvWtbXmdRNslA4Ja3oiXe4LDpjqc/Rqv0e6fD 6hbAcz8ZVJjyWQ7gcM8F+2Bq3VNF25VAEaEF1ETw8x4fX+EZxcGsYnpJeXDxCg0ZD03i FpthNyC8qVC1/R8ZNhK1+sZ0dkeeee5HN6J8CjL2pLC0z/ZmWfSjdC7LSH/ffdh/BUtc ma42ioFsesjyYWQ7tGRkmAI4M//cADP8lK7ThvCHqRaz6a1NDhOguG33bHrSGpP5zWbA +reA== 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=8TkqHcsgEG+OuTBDs5hHyd+ywC9awyZnzCMb+J5t4S0=; b=TogmEB9KWtE6ozuNbi2cY60AhzW0a76XS+hBa42nAShe4Evk94ET4t/5xzwIGVhI3f KRkFIOTVP3Ciz+pPtR0w7NAsPPVgCngbjRAi/4zoq2zPgzo4aP3EUiSexhJljRmNRpr/ ZEXAiHPzrIKs5paKZXL9CfZnlClo/SB8Kn3m3GAbSXSAgy6yJbVY0E0+K7mucu0TxYgD WEFUYAk/E9tCYPaUwlCMr/EogwxAgeadn2VLuF84R9XSkYJLSAlPiF95CnBkFtYJdFoF 3+y/7CftQ6Av9SirFiEyzvL/vw/OTplx7KAhC/nJ+qLxr51OV3qjM0RJxziHA9ixTDAw Ntpg== X-Gm-Message-State: AOAM530qoNnkLRcnFqItWvRvvjTIKkCHhkkLqXK1ZCjryul2PNiMVjN2 ltvXKpGiEnE2pDartz+a9iiPoaCQEM9sjqi8 X-Google-Smtp-Source: ABdhPJwiqhm1xUNWMDcvgzVjhoh83A0qgA8eX2MmIN2kSMWLWcHl4OQBPYAYgYZtEXt6Fc5Dyg80Ag== X-Received: by 2002:ac8:5bd6:: with SMTP id b22mr39058063qtb.193.1629875093161; Wed, 25 Aug 2021 00:04:53 -0700 (PDT) Received: from localhost.localdomain ([199.58.83.11]) by smtp.gmail.com with ESMTPSA id g1sm12444585qkd.89.2021.08.25.00.04.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Aug 2021 00:04:52 -0700 (PDT) From: Glenn Washburn To: grub-devel@gnu.org, Daniel Kiper Cc: Glenn Washburn Subject: [PATCH v2 3/8] tests: When checking squashfs fstime, use superblock last modified time Date: Wed, 25 Aug 2021 02:03:57 -0500 Message-Id: <066486e22c757aada6ec05914f900923cbddfd07.1629874373.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::82d; envelope-from=development@efficientek.com; helo=mail-qt1-x82d.google.com X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) 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: Wed, 25 Aug 2021 07:05:00 -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 virtual 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