Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1lLcqb-0004Yq-RW for mharc-grub-devel@gnu.org; Sun, 14 Mar 2021 22:20:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLcqa-0004V0-4a for grub-devel@gnu.org; Sun, 14 Mar 2021 22:20:44 -0400 Received: from mail-oi1-x229.google.com ([2607:f8b0:4864:20::229]:43444) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lLcqV-00045F-Hn for grub-devel@gnu.org; Sun, 14 Mar 2021 22:20:43 -0400 Received: by mail-oi1-x229.google.com with SMTP id d20so33053557oiw.10 for ; Sun, 14 Mar 2021 19:20:37 -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=vYZL2O3U4gmdQ+GyMroQ7oTwajUwVZEZfmxxydp6pFLKoZ0/IIQVFVjVFbJTHNDkbQ a+ZDPUO73/6WoEk7+yAzTYlJYJ0ilOFZ7/djFAQrWlp998hPVzUys988ejrbrsFqceT9 X3VqeMNB+I3FvLVLI/Wq6Pb1AmGVraPpTXtT+nfPgucm7do3boSS2axBATJ/kdQCFJb9 8KBHael5fG+xgMAjLFC2VSMJHvzzPUDzf6Z3lcgvi5aHMyAD7/e3Y5z6wSjq4fdP8A0K 00nN/q29GXTvzHk/1Vo1oaJqB+W8DLvidNAIE/2QxSJSFSADdZB4Q02r2ZutDM9MGj+K bAqw== 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=GMxqQsZV6x+uYgV4Us6V+a4ju/tB0JVnexhE3g1WVushknjZlumygvTpnA6bMbgcUY gIuZFaGqNJMx3ZGIWlXhxRd+8xqJAb5WaQrWM0dFfVaaecdraXmi6tT4zlo7ajF+3EAN oUCg+4v8hQvTRlTST4hyEbTekVN0NZbyVcED/Ez2X+uyknWsdgymFBSN+iURvwnqFkEn b++7stv0TjAXZ5q4JLYo8q7S8Clg+w43CsQJDov1uT8pWLwrynvIKI7PU4G9NhSpUile DlrLYcDVDfNnJm3Sxb0CZeITXmfdi7TPkcgQBbv35daBmlA28ys4mFOwPJx+twrXj3mm /QaQ== X-Gm-Message-State: AOAM532xFp08lU3r0I3sVjx7YCtDau6kf1cSXQS9TXODWziCKBdmlb/o goxAHWWwHBMBPREkhDAbjKaJqqXvKumXNw== X-Google-Smtp-Source: ABdhPJz6NCs1JWr5fksQjaNJo/p3uvsMyOVFxvm80ZRmwUmwZyf82NLcTeo3Wwzgbfyii7RmMdJnjQ== X-Received: by 2002:aca:3286:: with SMTP id y128mr16630572oiy.145.1615774836824; Sun, 14 Mar 2021 19:20:36 -0700 (PDT) Received: from localhost.localdomain ([2605:a601:aac5:3700:b5e5:83e3:99ae:e6e8]) by smtp.gmail.com with ESMTPSA id t22sm6733206otl.49.2021.03.14.19.20.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Mar 2021 19:20:36 -0700 (PDT) From: Glenn Washburn To: grub-devel@gnu.org, Daniel Kiper Cc: Glenn Washburn Subject: [PATCH 3/8] tests: When checking squashfs fstime, use superblock last modified time Date: Sun, 14 Mar 2021 21:20:18 -0500 Message-Id: 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::229; envelope-from=development@efficientek.com; helo=mail-oi1-x229.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: Mon, 15 Mar 2021 02:20:44 -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