From patchwork Mon Mar 13 13:56:09 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: 13172542 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 D56CCC6FD19 for ; Mon, 13 Mar 2023 13:57:15 +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=rYQhFxhKhoapAs+G2ffB98K79nWwokj7ZQThpCkFjFA=; b=G5z6jcfY1OjBA1 DUCOA99Z5e0EcXwF/av0CePFen0im9XicyOUsLcaTrwIaTWQqIpeogo2WUyacEocKwxBPzlRy6zCk nG7bDmU8+7ZBEAF4FKYuLy52SXrXcpNxGI93t5FT83x0Oi1nv7orRHn4MmKtYD6ivvyO6rRUnkeFU Lpa7+jBGzSyUweG7WLOF5DCIeJVhK3ks1vZ84AIaLoHcRc7SfmI0pDT2N6aqDaHe8rk0HTmRxSsUi Z/+oqf37Eh5TEIgxywvy0D31+RvtzuS9zpKC/dZBR114VPKWUs1EJBBVVRMAJPDDWe43SdskfkGGV Wmw2ONDnO1jUKcW10OKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbiey-0060fA-8V; Mon, 13 Mar 2023 13:56:20 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbiev-0060dD-2r for linux-arm-kernel@lists.infradead.org; Mon, 13 Mar 2023 13:56:18 +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 AF389B8112C; Mon, 13 Mar 2023 13:56:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91EEEC433D2; Mon, 13 Mar 2023 13:56:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678715773; bh=lwNDyirsOLX/1gzMo/KMEGrZVGoMdUl7WVD7PqcZeVk=; h=From:To:Cc:Subject:Date:From; b=SdAHjZD4Q+Xfpyh780M0HO/FZr+7H1jOadclJCst9hSAjktOqwq+/ZY53UXt3HGAs +tYNo18uBF3YoaNQ3P1d+VRDTea0qLyGZjcZwETWdnobaqtH0W46Bcifsd4NsJQtTJ cJTlEFQJHapbn/qw7h5Hm8Npvt9xUkhLq561I6G3FzHGEAQwzQacGC0wf6SCVcl0VC RZoMk7LrwZnCzBUCaQkGzwISzY3VlSKSdGAYq6Y48SlLtt2uyUx7THPuowSs81HmrA dlPXoRUUqrPsrJvhhljBD4kh93Hp8AmirXlAebQ3HezQnnpb9iK8ltMNQ7ZQTVJ4Ok PMURugHaB8y2w== 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] bootconfig: Fix testcase to increase max node Date: Mon, 13 Mar 2023 22:56:09 +0900 Message-Id: <167871576880.783280.2390717518955954275.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-20230313_065617_407597_CE988507 X-CRM114-Status: GOOD ( 12.34 ) 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) --- tools/bootconfig/test-bootconfig.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tools/bootconfig/test-bootconfig.sh b/tools/bootconfig/test-bootconfig.sh index f68e2e9eef8b..b1b77d76110d 100755 --- a/tools/bootconfig/test-bootconfig.sh +++ b/tools/bootconfig/test-bootconfig.sh @@ -14,10 +14,11 @@ ALIGN=4 INITRD=`mktemp ${TESTDIR}/initrd-XXXX` TEMPCONF=`mktemp ${TESTDIR}/temp-XXXX.bconf` OUTFILE=`mktemp ${TESTDIR}/tempout-XXXX` +AWKFILE=`mktemp ${TESTDIR}/temp-XXXX.awk` NG=0 cleanup() { - rm -f $INITRD $TEMPCONF $OUTFILE + rm -f $INITRD $TEMPCONF $OUTFILE $AWKFILE exit $NG } @@ -87,10 +88,16 @@ 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 +cat > $AWKFILE << EOF +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)) +} +EOF +awk -f "$AWKFILE" > $TEMPCONF + xpass $BOOTCONF -a $TEMPCONF $INITRD echo "badnode" >> $TEMPCONF