From patchwork Tue Jan 10 04:05:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Dilger X-Patchwork-Id: 1723794 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org (client-ip=150.107.74.76; helo=gandalf.ozlabs.org; envelope-from=srs0=bocs=5h=vger.kernel.org=linux-ext4-owner@ozlabs.org; receiver=) Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NrcgN0Nflz23fY for ; Tue, 10 Jan 2023 15:06:08 +1100 (AEDT) Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4NrcgL1ZR3z4xwl for ; Tue, 10 Jan 2023 15:06:06 +1100 (AEDT) Received: by gandalf.ozlabs.org (Postfix) id 4NrcgL1W53z4xwp; Tue, 10 Jan 2023 15:06:06 +1100 (AEDT) Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: gandalf.ozlabs.org; dmarc=none (p=none dis=none) header.from=dilger.ca Authentication-Results: gandalf.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=linux-ext4-owner@vger.kernel.org; receiver=) Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4NrcgL1R7Fz4xwl for ; Tue, 10 Jan 2023 15:06:06 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229738AbjAJEGD (ORCPT ); Mon, 9 Jan 2023 23:06:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229893AbjAJEFu (ORCPT ); Mon, 9 Jan 2023 23:05:50 -0500 Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6A44321B2 for ; Mon, 9 Jan 2023 20:05:48 -0800 (PST) Received: from shw-obgw-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTP id F1OEpw0HBl2xSF5tTpzuCk; Tue, 10 Jan 2023 04:05:47 +0000 Received: from centos7.dilger.int ([70.77.221.9]) by cmsmtp with ESMTP id F5tTpTtgQHFsOF5tTp3sNA; Tue, 10 Jan 2023 04:05:47 +0000 X-Authority-Analysis: v=2.4 cv=XZqaca15 c=1 sm=1 tr=0 ts=63bce41b a=2Y6h5+ypAxmHcsumz2f7Og==:117 a=2Y6h5+ypAxmHcsumz2f7Og==:17 a=RPJ6JBhKAAAA:8 a=USMdwZXE_HJfLks3l7QA:9 a=fa_un-3J20JGBB2Tu-mn:22 From: Andreas Dilger To: tytso@mit.edu Cc: linux-ext4@vger.kernel.org, Andreas Dilger Subject: [PATCH] tests: fix u_direct_io to work with older losetup Date: Mon, 9 Jan 2023 21:05:35 -0700 Message-Id: <1673323535-14317-1-git-send-email-adilger@dilger.ca> X-Mailer: git-send-email 1.8.3.1 X-CMAE-Envelope: MS4xfJQoH7odYORrg1V94Hdf/FUcPelDCeOUo6q4X8X4gDVroaqFAezadGtgNaXNKFbKFoZdiih6rAIu40S2yoIs8eLvq5uVqkL4FdIHSBc6ZPAnWdL0a9Oy A1s2sP2dOUDLoCNqP253rf76gW8b76wr2GX/LuDngJKGv+z/D9jOj7OqCur70iwPO/D6FQYqjEP1yttPJl9Efj2ztETTLrTvbVDjRsb9EOR3Uu47gyKOHSRA u3ZTd8yZ/OO0EFNJ66bQkA== X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Older losetup does not have --sector-size, but this isn't really needed for the test to work. Instead specify the filesystem block size directly to mke2fs, so that it works on all distros instead of being skipped. Change-Id: I5a0c82a9efdefd1b48f4d4288998c7725c9ae71e Signed-off-by: Andreas Dilger --- tests/u_direct_io/expect | 2 +- tests/u_direct_io/script | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/u_direct_io/expect b/tests/u_direct_io/expect index 830cbd752652..b1511ef10aa9 100644 --- a/tests/u_direct_io/expect +++ b/tests/u_direct_io/expect @@ -1,4 +1,4 @@ -mke2fs -F -o Linux -t ext4 -O ^metadata_csum,^uninit_bg -D $LOOP +mke2fs -F -b 4096 -o Linux -t ext4 -O ^metadata_csum,^uninit_bg -D $LOOP Creating filesystem with 32768 4k blocks and 32768 inodes Allocating group tables: done diff --git a/tests/u_direct_io/script b/tests/u_direct_io/script index b4f07752c89f..2f80e640293f 100644 --- a/tests/u_direct_io/script +++ b/tests/u_direct_io/script @@ -8,14 +8,14 @@ elif test ! -x $DEBUGFS_EXE; then echo "$test_name: $DESCRIPTION: skipped (no debugfs)" else dd if=/dev/zero of=$TMPFILE bs=1M count=128 > /dev/null 2>&1 - LOOP=$(losetup --show --sector-size 4096 -f $TMPFILE) + LOOP=$(losetup --show -f $TMPFILE 2>&1) if [ ! -b "$LOOP" ]; then echo "$test_name: $DESCRIPTION: skipped (no loop devices)" rm -f $TMPFILE exit 0 fi - echo mke2fs -F -o Linux -t ext4 -O ^metadata_csum,^uninit_bg -D \$LOOP > $OUT - $MKE2FS -F -o Linux -t ext4 -O ^metadata_csum,^uninit_bg -D $LOOP 2>&1 | \ + echo mke2fs -F -b 4096 -o Linux -t ext4 -O ^metadata_csum,^uninit_bg -D \$LOOP > $OUT + $MKE2FS -F -b 4096 -o Linux -t ext4 -O ^metadata_csum,^uninit_bg -D $LOOP 2>&1 | \ sed -f $cmd_dir/filter.sed >> $OUT echo debugfs -D -R stats \$LOOP >> $OUT