From patchwork Wed Apr 13 16:44:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Disseldorp X-Patchwork-Id: 12812246 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85CF9C4332F for ; Wed, 13 Apr 2022 16:45:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236995AbiDMQrZ (ORCPT ); Wed, 13 Apr 2022 12:47:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237047AbiDMQrD (ORCPT ); Wed, 13 Apr 2022 12:47:03 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB6473B2A4 for ; Wed, 13 Apr 2022 09:44:32 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 52E84210DD; Wed, 13 Apr 2022 16:44:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1649868271; h=from:from:reply-to: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=6ZeaAY/xvoAhNyah9CoB19X9VkIzjTjylmwiEeYqFdw=; b=s9Zzf4zm8E228HQ0MYLw+zjpZM4zOK40olkLl2h5eoqG8GFub1LLtpW/7aS+VJjDAOt5Wc jw4Bt3g+KX202yU6KL00cXbloy4h9oM0GdzlpQfC45/f0YLRV+ySUSzMw3hzhrKq/aNLl/ J+QZwDST4Za2Brm7wr7glFQSIvp1QeU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1649868271; h=from:from:reply-to: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=6ZeaAY/xvoAhNyah9CoB19X9VkIzjTjylmwiEeYqFdw=; b=A+6vda1qqaXnb1Sw96aNotLW2f3QVFMeXHL1ZNr4LUbC/c67qclwPDEbh2L/bfsm58vwGT Lrr6jQU0nVyfOWCA== Received: from echidna.suse.de (unknown [10.163.47.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 3606DA3BA8; Wed, 13 Apr 2022 16:44:31 +0000 (UTC) From: David Disseldorp To: fstests@vger.kernel.org Cc: dchinner@redhat.com, David Disseldorp Subject: [PATCH v3 4/4] generic/020: fix max_attrval_size output filter Date: Wed, 13 Apr 2022 18:44:22 +0200 Message-Id: <20220413164422.30077-5-ddiss@suse.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220413164422.30077-1-ddiss@suse.de> References: <20220413164422.30077-1-ddiss@suse.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org The current attr -g "$max_attrval_name" output filter is broken if $max_attrval_size isn't 16-byte aligned, due to od's duplicate suppression behaviour. Fix it by having od only dump one byte per line. Signed-off-by: David Disseldorp Reviewed-by: Dave Chinner --- tests/generic/020 | 2 +- tests/generic/020.out | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/generic/020 b/tests/generic/020 index f50a4f87..d8648e96 100755 --- a/tests/generic/020 +++ b/tests/generic/020 @@ -230,7 +230,7 @@ dd if=/dev/zero bs=1 count=$max_attrval_size 2>/dev/null \ | _attr -s "$max_attrval_name" $testfile >/dev/null OCTAL_SIZE=`echo "obase=8; $max_attrval_size" | bc` -_attr -q -g "$max_attrval_name" $testfile | od -t x1 \ +_attr -q -g "$max_attrval_name" $testfile | od -w1 -t x1 \ | sed -e "s/^0*$OCTAL_SIZE$/ATTRSIZE/" _attr -r "$max_attrval_name" $testfile >/dev/null diff --git a/tests/generic/020.out b/tests/generic/020.out index 7e3e65bd..0dc5e09f 100644 --- a/tests/generic/020.out +++ b/tests/generic/020.out @@ -47,7 +47,7 @@ user.snrub="fish2\012" user.snrub="fish2\012" *** really long value -0000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +0000000 00 * ATTRSIZE *** set/get/remove really long names (expect failure)