[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: testsuite failures with current git master M4
From: |
Eric Blake |
Subject: |
Re: testsuite failures with current git master M4 |
Date: |
Mon, 4 Jan 2010 21:55:40 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Eric Blake <ebb9 <at> byu.net> wrote on 2009-06-15:
> >>> Odd. All of these failures look like they are related to getopt; perhaps
> >>> there is some locale effect on the translation of the "`" in the getopt
> >>> strings when using glibc instead of gnulib's version? What version of
> >>> glibc is this?
> >> This is eglibc from Debian testing:
> >
> > However, the corresponding change to drop "`" from getopt error messages
> > is in upstream glibc as well:
>
> It sounds like it is thus time for us to resync glibc's getopt
> implementation into gnulib, and for me to relax m4's testsuite to accept
> either spelling.
Seven months later, I'm finally doing that (in part, because I've re-synced
glibc getopt over to gnulib, so now the testsuite failure would be on all
platforms where getopt is replaced, and not just those with modern glibc, the
moment I pull in the latest gnulib).
(It's a shame my m4 hacking time has been cut short lately, due to all my other
fun hacking on gnulib)
From: Eric Blake <address@hidden>
Date: Mon, 4 Jan 2010 12:02:04 -0700
Subject: [PATCH] Fix testsuite failure on newer glibc.
* tests/testsuite.at (AT_CHECK_M4): Tolerate alternate getopt
spellings.
* tests/options.at (deprecated options, unknown option)
(--debugmode): Adjust expected output accordingly.
Reported by Ralf Wildenhues.
Signed-off-by: Eric Blake <address@hidden>
---
ChangeLog | 11 ++++++++++-
tests/options.at | 8 ++++----
tests/testsuite.at | 14 ++++++++++++--
3 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d59f51a..f90f8fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-01-04 Eric Blake <address@hidden>
+
+ Fix testsuite failure on newer glibc.
+ * tests/testsuite.at (AT_CHECK_M4): Tolerate alternate getopt
+ spellings.
+ * tests/options.at (deprecated options, unknown option)
+ (--debugmode): Adjust expected output accordingly.
+ Reported by Ralf Wildenhues.
+
2009-11-26 Eric Blake <address@hidden>
Update to newer gnulib.
@@ -12052,7 +12061,7 @@
End:
Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2003,
- 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
Copying and distribution of this file, with or without
modification, are permitted provided the copyright notice
diff --git a/tests/options.at b/tests/options.at
index ad71f20..82185e0 100644
--- a/tests/options.at
+++ b/tests/options.at
@@ -1,5 +1,5 @@
# Hand crafted tests for GNU M4. -*- Autotest -*-
-# Copyright (C) 2001, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Copyright (C) 2001, 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
# Inc.
# This file is part of GNU M4.
@@ -29,7 +29,7 @@ AT_SETUP([deprecated options])
dnl -N/--diversions was removed after 1.4.x
AT_CHECK_M4([--diversions=1], [1], [], [stderr])
AT_CHECK([$SED 's/Try.*help/Try `m4 --help/' stderr], [0],
-[[m4: unrecognized option `--diversions=1'
+[[m4: bad option
Try `m4 --help' for more information.
]])
@@ -258,7 +258,7 @@ AT_SETUP([unknown option])
AT_CHECK_M4([--unknown], [1], [], [stderr])
AT_CHECK([$SED 's/Try.*help/Try `m4 --help/' stderr], [0],
-[[m4: unrecognized option `--unknown'
+[[m4: bad option
Try `m4 --help' for more information.
]])
@@ -474,7 +474,7 @@ m4trace: -1- id 6: divnum
dnl Test that shorter prefix is ambiguous.
AT_CHECK_M4([--debu], [1], [], [stderr])
AT_CHECK([$SED -e 's/Try.*--help/Try `m4 --help/' stderr], [0],
-[[m4: option `--debu' is ambiguous
+[[m4: bad option
Try `m4 --help' for more information.
]])
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 7ba56e5..857d9f0 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -1,8 +1,8 @@
# Process with autom4te to create an -*- Autotest -*- test suite.
# Test suite for GNU M4.
-# Copyright (C) 2001, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# Copyright (C) 2001, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
# This file is part of GNU M4.
#
@@ -71,6 +71,15 @@ fi]])
# m4:input.m4:7: cannot open module `no_such': no_such.so: cannot open
shared object file: No such file or directory
# or m4:input.m4:7: cannot open module `no_such': can't open the module
# to m4:input.m4:7: cannot open module `no_such'
+#
+# When encountering command line option errors, the error message is
+# platform-dependent, but contains " option ":
+# m4: unrecognized option `--diversions=1' # glibc 2.6
+# or m4: unrecognized option '--diversions=1' # glibc 2.11
+# or m4: unknown option -- --diversions # BSD
+# or m4: option '--debu' is ambiguous # glibc 2.11
+# or m4: ambiguous option -- --debu # BSD
+# to m4: bad option
m4_define([AT_CHECK_M4],
[AT_CHECK([$M4 m4_ifval([$6], [], [-d ])$1 ]m4_if([$5], [-], [<&-],
[< m4_default([$5], [/dev/null])]),
@@ -80,6 +89,7 @@ m4_case([$4], [], [], [ignore], [],
/^m4debug: module/s/opening file.*/opening file/
s/\(cannot open module [^:]*\):.*/\1/
s/Bad file number/Bad file descriptor/
+ s/^m4:.* option .*/m4: bad option/
' stderr >&2]], [0], [], [$4])])
])
--
1.6.4.2
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: testsuite failures with current git master M4,
Eric Blake <=