Quantcast

Re: autotest buglet/AIX awk limitation

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: autotest buglet/AIX awk limitation

Paul Eggert
Thanks for reporting that.  I installed this fix.

2005-06-02  Paul Eggert  <[hidden email]>

        * lib/autotest/general.m4 (AT_INIT): Don't create a regular
        expression of unbounded size when processing the --list
        option.  This runs afoul of a limit of 399 bytes per regular
        expression on AIX.  Problem reported by Ralf Wildenhues.

--- general.m4 20 May 2005 08:13:16 -0000 1.179
+++ general.m4 2 Jun 2005 23:30:13 -0000 1.180
@@ -442,12 +442,17 @@ AT_TESTSUITE_NAME test groups:
 
 _ATEOF
   # "  1 42  45 " => "^(1|42|45);".
-  at_groups_pattern=`echo "$at_groups" | sed 's/^  *//;s/  *$//;s/  */|/g'`
   echo "$at_help_all" |
-    awk 'BEGIN { FS = ";" }
- { if ($[1] !~ /^('"$at_groups_pattern"')$/) next }
- { if ($[1]) printf " %3d: %-18s %s\n", $[1], $[2], $[3]
-   if ($[4]) printf "      %s\n", $[4] } '
+    awk 'BEGIN {
+   for (n = split("'"$at_groups"'", a); n; n--) selected[[a[n]]] = 1
+   FS = ";"
+ }
+ {
+   if (selected[[$ 1]]) {
+     printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
+     if ($ 4) printf "      %s\n", $ 4
+   }
+ }'
   exit 0
 fi
 m4_divert_pop([HELP_END])dnl


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: autotest buglet/AIX awk limitation

Ralf Wildenhues
Hi Paul,

* Paul Eggert wrote on Fri, Jun 03, 2005 at 01:32:09AM CEST:
> Thanks for reporting that.  I installed this fix.

Thanks for this prompt response, and sorry for not providing a patch
myself.  Also, I believe there was no need to update documentation since
SUSv3 mentions (at least) 256 characters for a regex (in general, not
just awk).

However, this patch unfortunately does not fix it:

| $ ./testsuite --list
| GNU Autoconf 2.59c test suite test groups:
|
|  NUM: FILE-NAME:LINE     TEST-GROUP-NAME
|       KEYWORDS
|
|  awk: The string or regular expression beginning with
|         the characters " banner-1 " cannot contain more than 399 bytes.
|  The source line is 2.
|  The error context is
|                 3 74 75 76 banner-8 77 78 79 80 banner-9 81 82 83 banner-10 84 85 86 87 88 89 90 banner-11 91 92 93 94 95 96 97 98 99 100 101 >>>  1 <<< 02 103 banner-12 104 105 banner-13 106 107 108 109 110 111 112 banner-14 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 banner-15 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 banner-16 152 banner-17 153 154 155 156 157 158 159 160 161 162 163 164 165 166 banner-18 167 168 169 170 171 172 173 174 175 176 177 178 banner-19 179 180 181 182 183 184 185 186 187 banner-20 188 189 190 191 192 193 194 195 196 197 banner-21 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 banner-22 225 banner-23 226 banner-24 227", a); n; n--) selected[a[n]] = 1
|  syntax error The source line is 3.
|  awk: The statement cannot be correctly parsed.
|  The source line is 3.

I could try to work on a patch, but it will take a little while, sorry.

Regards,
Ralf, who'll eventually get back to his other pending issues as well..

> 2005-06-02  Paul Eggert  <[hidden email]>
>
> * lib/autotest/general.m4 (AT_INIT): Don't create a regular
> expression of unbounded size when processing the --list
> option.  This runs afoul of a limit of 399 bytes per regular
> expression on AIX.  Problem reported by Ralf Wildenhues.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: autotest buglet/AIX awk limitation

Stepan Kasal
Hi Ralf,

On Fri, Jun 03, 2005 at 09:55:44AM +0200, Ralf Wildenhues wrote:
> However, this patch unfortunately does not fix it:

my guess is that the testsuite script wasn't updated properly.
The brute force fix is to rm tests/testsuite and try again.

But I think I noticed a bug in tests/Makefile.am and I fixed it.

I commited the patch below.  The first change is just cosmetics.
The second hunk is the fix.

Have a nice day,
        Stepan

2005-06-03  Stepan Kasal  <[hidden email]>

        * tests/Makefile.am (check_SCRIPTS): Set to $(wrappers).
        (DISTCLEANFILES): Remove $(check_SCRIPTS).
        (testsuite): Make sure autotest.m4f is up-to-date before using it.

Index: tests/Makefile.am
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/Makefile.am,v
retrieving revision 1.93
diff -u -r1.93 Makefile.am
--- tests/Makefile.am 14 May 2005 07:00:40 -0000 1.93
+++ tests/Makefile.am 3 Jun 2005 13:36:19 -0000
@@ -25,9 +25,8 @@
      atlocal.in package.m4 wrapper.as
 
 # Running the uninstalled scripts.
-check_SCRIPTS = autoconf autoheader autoreconf autom4te autoscan autoupdate ifnames
-
-DISTCLEANFILES = atconfig atlocal $(TESTSUITE) $(check_SCRIPTS)
+check_SCRIPTS = $(wrappers)
+DISTCLEANFILES = atconfig atlocal $(TESTSUITE)
 MAINTAINERCLEANFILES = Makefile.in
 
 # Import the dependencies on Autotest and M4sh.
@@ -105,6 +104,7 @@
       local.at \
       $(TESTSUITE_AT) \
       $(autotest_m4f_dependencies)
+ cd $(top_builddir)/lib/autotest && $(MAKE) $(AM_MAKEFLAGS) autotest.m4f
  $(AUTOTEST) -I $(srcdir) suite.at -o $@.tmp
  mv $@.tmp $@
 


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: autotest buglet/AIX awk limitation

Ralf Wildenhues
Hi Stepan,

* Stepan Kasal wrote on Fri, Jun 03, 2005 at 03:48:15PM CEST:
> On Fri, Jun 03, 2005 at 09:55:44AM +0200, Ralf Wildenhues wrote:
> > However, this patch unfortunately does not fix it:
>
> my guess is that the testsuite script wasn't updated properly.

It was.  It's not possible to miss this, as it takes more than a minute on this
machine to update `testsuite'.

> The brute force fix is to rm tests/testsuite and try again.

| $ sed -n '/awk/,/exit/p' ./testsuite
|     awk 'BEGIN {
|            for (n = split("'"$at_groups"'", a); n; n--) selected[a[n]] = 1
|            FS = ";"
|          }
|          {
|            if (selected[$ 1]) {
|              printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
|              if ($ 4) printf "      %s\n", $ 4
|            }
|          }'
|   exit 0
| $ ./testsuite --list
| GNU Autoconf 2.59c test suite test groups:
|
|  NUM: FILE-NAME:LINE     TEST-GROUP-NAME
|       KEYWORDS
|
|  awk: The string or regular expression beginning with
|         the characters " banner-1 " cannot contain more than 399 bytes.
*snip*

Also note the different error message (quoted in my last messages).

For /this/ system, the use of AC_PROG_AWK would help.  For another
AIX-5.2 system I tested, it would not (as there is no gawk installed
there).

Regards,
Ralf


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: autotest buglet/AIX awk limitation

Stepan Kasal
Hello,

On Fri, Jun 03, 2005 at 07:01:24PM +0200, Ralf Wildenhues wrote:
> > my guess is that the testsuite script wasn't updated properly.
> It was.

Sorry.

> |  awk: The string or regular expression beginning with
> |         the characters " banner-1 " cannot contain more than 399 bytes.
..
> Also note the different error message (quoted in my last messages).

OK, I commited the patch attached to this message.
Hopefully it fixes it.

Have a nice day,
        Stepan

autoconf-20050604-at_groups.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: autotest buglet/AIX awk limitation

Ralf Wildenhues
Hi Stepan,

* Stepan Kasal wrote on Sat, Jun 04, 2005 at 09:32:49AM CEST:
> On Fri, Jun 03, 2005 at 07:01:24PM +0200, Ralf Wildenhues wrote:
>
> > |  awk: The string or regular expression beginning with
> > |         the characters " banner-1 " cannot contain more than 399 bytes.
> ..
> > Also note the different error message (quoted in my last messages).
>
> OK, I commited the patch attached to this message.
> Hopefully it fixes it.

Yes, it does.  Thank you!

Cheers,
Ralf

> 2005-06-04  Stepan Kasal  <[hidden email]>
>
> * doc/autoconf.texi (Limitations of Usual Tools): AIX awk cannot
>  swallow literals longer than 399.  Reported by Ralf Wildenhues.
> * lib/autotest/general.m4 (AT_INIT): Pass $at_groups though stdin,
>  to workaround this limitation.


Loading...