From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-172.mta0.migadu.com (out-172.mta0.migadu.com [91.218.175.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44DE93BB69A for ; Mon, 20 Jul 2026 16:43:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784565784; cv=none; b=F29uGc5kK9OeQQzgCAx/hFB1Ce/vnjzTMAWbokddfkuehyBkcou4cskLzgIaX1mU6cszOP9+IoX4yX5ZlXY0NagJGxEp98oGvq/beC8SmeG8kW7R8p8rYmy09DjYE+gfQz28UFkoPsqfYo7O+4OqUOB7frLnwVBANoiILkqLE2s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784565784; c=relaxed/simple; bh=8L4GmUs9b5mB0Ko0900E38twdOYPWnxWBr4hCBGuy3I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NO46ovmnj+it/k0zTlXFTMDPriKtpC4p852vDhIfCKXhUk0uATluGjhtZtHYH1Wz0FAa7pJaexbw6N1yUaZgUVLnftrEX/cEvcrdZeEEQTkXq6cJPTKT3crP4zds5ao3lPVwzwsoYQv6qgvCdzl7zVCBeFYzYplV83QUHkmVxBw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=chenxiaosong.com; spf=pass smtp.mailfrom=chenxiaosong.com; dkim=pass (2048-bit key) header.d=chenxiaosong.com header.i=@chenxiaosong.com header.b=QH//iycK; arc=none smtp.client-ip=91.218.175.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=chenxiaosong.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chenxiaosong.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=chenxiaosong.com header.i=@chenxiaosong.com header.b="QH//iycK" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chenxiaosong.com; s=key1; t=1784565781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BFD3DRsLOyPAHyvLun2YgU5mtFFWrTwLfhCRofhghv4=; b=QH//iycKUS/AA2um/S3UE17OC4o6Fgmkn2f778fD+0b4A4JA7jDiphLO2zSFhukyjqomG/ rNdsYdk3kR5uVXeQ71yRkrbha70FoEGDPWc36cOwmkrGMYh1Sqf/y7hkOboBYWH0yBYAtQ eGX7Zvr5HnCedSzJJS8V3+bhL6P2sBcH0ss45PlPozOtgt3HN8V6qQFTo6h+DwogIyXVpL kwlBdI2ez3j3SGaoAB0UrPbmuBFAYmdwPit/cJbj2iVbDkIYQq3w/q6QpF7glW0uC8oX4R JQOoGpQwy04RaOgTi0fvVPJDqVrLhqjiLggKCWAuY1bkhTNAdK0rB/E0c/4AIA== From: ChenXiaoSong To: smfrench@gmail.com, linkinjeon@kernel.org, pc@manguebit.org, ronniesahlberg@gmail.com, sprasad@microsoft.com, tom@talpey.com, bharathsm@microsoft.com, senozhatsky@chromium.org, dhowells@redhat.com, metze@samba.org, zlang@kernel.org, lukas@herbolt.com Cc: linux-cifs@vger.kernel.org, fstests@vger.kernel.org, ChenXiaoSong Subject: [PATCH v2 xfstests resend 2/3] generic/002: clean up the test Date: Mon, 20 Jul 2026 16:42:06 +0000 Message-ID: <20260720164207.732522-3-chenxiaosong@chenxiaosong.com> In-Reply-To: <20260720164207.732522-1-chenxiaosong@chenxiaosong.com> References: <20260720164207.732522-1-chenxiaosong@chenxiaosong.com> Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT From: ChenXiaoSong Add the hardlink group and use shorter loops. Use _exit() and change the success text to "Silence is golden". Suggested-by: Zorro Lang Signed-off-by: ChenXiaoSong --- tests/generic/002 | 16 ++++++---------- tests/generic/002.out | 2 +- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/tests/generic/002 b/tests/generic/002 index 6df57a7a..9b210705 100755 --- a/tests/generic/002 +++ b/tests/generic/002 @@ -2,12 +2,12 @@ # SPDX-License-Identifier: GPL-2.0 # Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved. # -# FS QA Test No. 002 +# FS QA Test 002 # # simple inode link count test for a regular file # . ./common/preamble -_begin_fstest metadata udf auto quick +_begin_fstest metadata udf auto quick hardlink # Import common functions. . ./common/filter @@ -17,14 +17,11 @@ status=0 # success is the default! _require_test _require_hardlinks -echo "Silence is goodness ..." - # ensure target directory exists mkdir `dirname $TEST_DIR/tmp` 2>/dev/null touch $TEST_DIR/tmp.1 -for l in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 -do +for ((l = 2; l <= 20; l++)); do ln $TEST_DIR/tmp.1 $TEST_DIR/tmp.$l x=`$here/src/lstat64 $TEST_DIR/tmp.1 | sed -n -e '/ Links: /s/.*Links: *//p'` if [ "$l" -ne $x ] @@ -35,8 +32,7 @@ do fi done -for l in 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 -do +for ((l = 20; l >= 1; l--)); do x=`$here/src/lstat64 $TEST_DIR/tmp.1 | sed -n -e '/ Links: /s/.*Links: *//p'` if [ "$l" -ne $x ] then @@ -47,5 +43,5 @@ do rm -f $TEST_DIR/tmp.$l done -# success, all done -exit +echo "Silence is golden" +exit $status diff --git a/tests/generic/002.out b/tests/generic/002.out index 11426b54..61705c7c 100644 --- a/tests/generic/002.out +++ b/tests/generic/002.out @@ -1,2 +1,2 @@ QA output created by 002 -Silence is goodness ... +Silence is golden -- 2.43.0