From 417b59616a5ce4c5e752c34e11fe5ddc0f41b80c Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Mon, 23 Sep 2024 18:44:45 -0500 Subject: [PATCH] Work around bug in AIX 7.1 awk in report card tool --- ChangeLog | 7 +++++++ commands/report-card.awk | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 20e9479..754ecd4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2024-09-23 Jacob Bachmeyer + + * commands/report-card.awk: When preparing to compute totals and + setting $0 to the list of possible test results, explicitly set NF + to 9 to work around a bug in AIX 7.1 awk, which fails to update NF + when $0 is assigned from a constant string. + 2024-09-18 Jacob Bachmeyer * dejagnu: Adapt Zsh compatibility prologue from configure. diff --git a/commands/report-card.awk b/commands/report-card.awk index 415e74a..a88b5cb 100644 --- a/commands/report-card.awk +++ b/commands/report-card.awk @@ -1,5 +1,5 @@ # report-card.awk -- Test summary tool -# Copyright (C) 2018, 2021 Free Software Foundation, Inc. +# Copyright (C) 2018, 2021, 2024 Free Software Foundation, Inc. # # This file is part of DejaGnu. # @@ -132,6 +132,7 @@ $1 ~ /:$/ { sub(/:$/, "", $1); Totals["tp", Tool, Pass, $1]++ } END { $0 = ("PASS FAIL KPASS KFAIL XPASS XFAIL UNSUPPORTED UNRESOLVED UNTESTED") + NF = 9 # work around bug in AIX 7.1 awk for (i = 1; i in Tools; i++) for (j = 1; ("t", Tools[i], j) in Passes; j++) for (k = 1; k <= NF; k++) { -- 2.11.4.GIT