Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1maSK8-0006DO-Pg for mharc-grub-devel@gnu.org; Tue, 12 Oct 2021 20:40:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36594) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maSJm-0005rN-2J for grub-devel@gnu.org; Tue, 12 Oct 2021 20:40:29 -0400 Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]:44003) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1maSJh-0000PT-DC for grub-devel@gnu.org; Tue, 12 Oct 2021 20:40:25 -0400 Received: by mail-qt1-x82b.google.com with SMTP id r17so1070266qtx.10 for ; Tue, 12 Oct 2021 17:40:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pzfT5W6WHPpm4w4HL00+aVoSd1rDRB/O9QZOAf6jsBA=; b=gcEcMA5oUf7Tf+YKhDfDGWeSWy41T+PSLGY8g4qN57EWj8AqAwk/Xpj6uPqAvWH91u CRHV5ui4XUS1F+zwDT0uF98r3uHiAxtHYC85QlYA61y6LDiFHk40aBYfxVdj6je82RMK PB5oYK5Ay+XA5YEMQ+RNBCv8UhY+VBmI+fmaiku0EYORzxnG+cXvn9hFtwamdyfB2dDi 6IpWWPH10hhiPoOCwK8gjMPh50+XbQnQRPafWZGrhVw0FUEqtSAE45CzRPKIByON6691 /FIlkPakSmbILV3/AFwb5ograwyN7T4qyL8ht0KmH0JnLlN1IuuzMl1qSJKyd8OlS/XY w1QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pzfT5W6WHPpm4w4HL00+aVoSd1rDRB/O9QZOAf6jsBA=; b=c47MEffZ3q7FYjsCROrggeJWilZpnY8OwRWcfizYMRHZq3l7/IzJPMasKLmc1XcZlx 6DQXB/5FA3SZmSiJC5f4qcu8SJGsCFBZKN5esEfY1ULnA5nlNB0AM+ErudoYbvhobhEr MuD/xwQ90rQWLaskQi9VE8wBVhBixedvfOch/nPAfXscFqbg6CAZz/JKPEX8Wl67IPxz kBvozHToNemJe6ryeCPuIgoKE0uGkcwvbNeyl+QlbFzdCTR/DGbttL1I8OZ50TrXTzFL +JMmRHymirqbNFVOoCGY3sjY+Rx1gAkKgpxllMvQj5OnYL3hZ9okiauGJ4/8O8RY4RXJ 88RQ== X-Gm-Message-State: AOAM530CTOcTgQKYzadk8xfKKAXnnMNYzjLDcM8GU9y89ejzUQLZI+2C gcxyxGT5LjuCXVbf2V5PIvjul+6Lmt7+NQ== X-Google-Smtp-Source: ABdhPJxoU3mIKvalQ0n+eQ4V5cS/DRBq5+AkChTuZPiUMuOy6ywSQLUVKLJ/pFfUk7t+Chg/pj+kmQ== X-Received: by 2002:a05:622a:1105:: with SMTP id e5mr23890982qty.97.1634085620475; Tue, 12 Oct 2021 17:40:20 -0700 (PDT) Received: from localhost.localdomain ([37.218.244.251]) by smtp.gmail.com with ESMTPSA id x18sm6682367qkx.94.2021.10.12.17.40.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 17:40:20 -0700 (PDT) From: Glenn Washburn To: grub-devel@gnu.org, Daniel Kiper Cc: Glenn Washburn Subject: [PATCH v4 2/9] tests: When checking squashfs fstime, use superblock last modified time Date: Tue, 12 Oct 2021 19:39:56 -0500 Message-Id: <3da044f569f726ad9c7f04ab1b2f328b2581c4d3.1634084103.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::82b; envelope-from=development@efficientek.com; helo=mail-qt1-x82b.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: Wed, 13 Oct 2021 00:40:32 -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 a28e07295..cba94233d 100644 --- a/tests/util/grub-fs-tester.in +++ b/tests/util/grub-fs-tester.in @@ -1356,6 +1356,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