From patchwork Wed Mar 15 13:54:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Masami Hiramatsu (Google)" X-Patchwork-Id: 13175909 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BCD04C6FD1D for ; Wed, 15 Mar 2023 13:55:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=1VsFosq4etzq3TdrEdmiiUagkDoc2P4rFRvM684vMHw=; b=vcmTUbudkd/JYc 3D8QCGL8Y1UJ74FjtIl/NpUAUKkRRx4ereP1VC2EIYmSz+ksQ1a+CLMermk+UmtNF7JNUc3UmJWQ9 u15eeuXT7uSKX+Oy9LKQ9lBn5ki+JgEbLdjgLktVFBZoQPHcUzZku02KsaX/sa3omT5jeOo1rDMtg MkVi8bvbUdvTluF8n16JpROrB88rui1RQDKUc3TpFqimM0TFcHPjDktqHLOnsrv/QCcrztbUWmEjM nMSClvMmCimKZONEk8A/+LPV0RJFLiRw7mOuzRL4Qo7CcIXEEmxwnUjvrx3aIJiDrnL56N5OmpGye ypye3zZD93n3tbB1BgNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pcRa8-00DWt3-14; Wed, 15 Mar 2023 13:54:20 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pcRa4-00DWs3-0X for linux-arm-kernel@lists.infradead.org; Wed, 15 Mar 2023 13:54:17 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8FFF4B81E35; Wed, 15 Mar 2023 13:54:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CABAEC433EF; Wed, 15 Mar 2023 13:54:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678888453; bh=MeUXDq1IdFKnPC0Emxz8eivaGaiRcMqUYA0SAkpvH7M=; h=From:To:Cc:Subject:Date:From; b=kOqVUhOrBsS97XPXEH4mPaXOnze6wk6DENj5/ciEAbQqRH43FTcfX25SKJ1lVt9nE AvepeV56Se7O/Z1Yhq0tG6FVTzYhqrLC50gddTLerWCxOHsFLTmUJy+zU5gS0FBlpo QFjF8PCngkxGMN5grwRPfiFLmBOthskskDJb1UisHOGl/nSXClKcQNhI6ano0AGHOE KncDHxhRgX+HcghinIfdHFLxifvsdPLnCPBKJMgxvkDvcRR6n6ZpgH9DOCE1S8S3pX pc0P+2wmBB7kFSvT7PRWazkmLYwFC0jN/z4F0HfA3QXN/hHc+xsoWPWEDnyX2AIQEy AF5jUAKa8d/3Q== From: "Masami Hiramatsu (Google)" To: linux-trace-kernel@vger.kernel.org Cc: Heinz Wiesinger , andersson@kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, mhiramat@kernel.org, quic_rjendra@quicinc.com, quic_saipraka@quicinc.com, quic_sibis@quicinc.com Subject: [PATCH v2] bootconfig: Fix testcase to increase max node Date: Wed, 15 Mar 2023 22:54:08 +0900 Message-Id: <167888844790.791176.670805252426835131.stgit@devnote2> X-Mailer: git-send-email 2.25.1 User-Agent: StGit/0.19 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230315_065416_342514_7C1834B6 X-CRM114-Status: GOOD ( 12.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Masami Hiramatsu (Google) Since commit 6c40624930c5 ("bootconfig: Increase max nodes of bootconfig from 1024 to 8192 for DCC support") increased the max number of bootconfig node to 8192, the bootconfig testcase of the max number of nodes fails. To fix this issue, we can not simply increase the number in the test script because the test bootconfig file becomes too big (>32KB). To fix that, we can use a combination of three alphabets (26^3 = 17576). But with that, we can not express the 8193 (just one exceed from the limitation) because it also exceeds the max size of bootconfig. So, the first 26 nodes will just use one alphabet. With this fix, test-bootconfig.sh passes all tests. Reported-by: Heinz Wiesinger Link: https://lore.kernel.org/all/2463802.XAFRqVoOGU@amaterasu.liwjatan.org Fixes: 6c40624930c5 ("bootconfig: Increase max nodes of bootconfig from 1024 to 8192 for DCC support") Signed-off-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) --- tools/bootconfig/test-bootconfig.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/bootconfig/test-bootconfig.sh b/tools/bootconfig/test-bootconfig.sh index f68e2e9eef8b..a2c484c243f5 100755 --- a/tools/bootconfig/test-bootconfig.sh +++ b/tools/bootconfig/test-bootconfig.sh @@ -87,10 +87,14 @@ xfail grep -i "error" $OUTFILE echo "Max node number check" -echo -n > $TEMPCONF -for i in `seq 1 1024` ; do - echo "node$i" >> $TEMPCONF -done +awk ' +BEGIN { + for (i = 0; i < 26; i += 1) + printf("%c\n", 65 + i % 26) + for (i = 26; i < 8192; i += 1) + printf("%c%c%c\n", 65 + i % 26, 65 + (i / 26) % 26, 65 + (i / 26 / 26)) +} +' > $TEMPCONF xpass $BOOTCONF -a $TEMPCONF $INITRD echo "badnode" >> $TEMPCONF