Thread (3 messages) 3 messages, 2 authors, 2023-03-15

Re: [PATCH] bootconfig: Fix testcase to increase max node

From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Date: 2023-03-15 07:59:14
Also in: linux-arm-kernel, linux-arm-msm, lkml

On Tue, 14 Mar 2023 11:12:13 -0400
Steven Rostedt [off-list ref] wrote:
On Mon, 13 Mar 2023 22:56:09 +0900
"Masami Hiramatsu (Google)" [off-list ref] wrote:
quoted
@@ -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
Do you need this extra file?
quoted
-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
Couldn't the above just be:

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

and not need the extra file?
Indeed. Let me update this.

Thank you!
-- Steve

quoted
 xpass $BOOTCONF -a $TEMPCONF $INITRD
 
 echo "badnode" >> $TEMPCONF

-- 
Masami Hiramatsu (Google) [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help