From: "Pierre Muller" <muller@ics.u-strasbg.fr>
To: "'Daniel Jacobowitz'" <drow@false.org>, <gdb-patches@sourceware.org>
Subject: [RFA] gdb_ari.sh changes to discard some file types for specific tests
Date: Tue, 16 Oct 2007 13:56:00 -0000 [thread overview]
Message-ID: <000f01c80ff1$e2943d80$a7bcb880$@u-strasbg.fr> (raw)
UCASE and EditCase tests are currently polluted
by lex and yacc files.
This patch discards those bugs if the source
is a lex or yacc source.
The patch also contains the fixes for xasprintf and xvasprintf
that I already proposed yesterday.
I am new to AWK scripts,
so I am unsure if my changes are
standard.
Is this OK?
Pierre Muller
Pseudo ChangeLog:
2007-10-16 Pierre Muller <muller@ics.u-strasbg.fr>
* gdb_ari.sh (is_yacc_or_lex): New variable.
(FNR == 1): Set is_yacc_or_lex according to FILENAME
pattern matching;
(UCASE): Discard error if is_yacc_or_lex is set.
(editCase): Ditto. Give more precise documentation.
(xasprintf): Add known entries in defs.h and utils.c.
Switch to regression category.
(xvasprintf): Idem.
$ cvs diff -up gdb_ari.sh
Index: gdb_ari.sh
===================================================================
RCS file: /cvs/gdbadmin/ss/gdb_ari.sh,v
retrieving revision 1.75
diff -u -p -r1.75 gdb_ari.sh
--- gdb_ari.sh 10 Oct 2007 11:56:14 -0000 1.75
+++ gdb_ari.sh 16 Oct 2007 12:34:18 -0000
@@ -172,6 +172,13 @@ function fail(bug,supplement) {
FNR == 1 {
seen[FILENAME] = 1
+ if (match(FILENAME, "\\.[ly]$") || match(FILENAME, "-lex\\.c")) {
+ # FILENAME is a lex or yacc source, or a C file generated by lex
+ is_yacc_or_lex = 1
+ }
+ else {
+ is_yacc_or_lex = 0
+ }
}
END {
if (print_idx) {
@@ -455,15 +462,19 @@ Function name is uppercase."
category["UCASE function"] = ari_code
}
/^[A-Z][[:alnum:]_]*[[:space:]]*\(/ {
- fail("UCASE function")
+ if (is_yacc_or_lex == 0) {
+ fail("UCASE function")
+ }
}
BEGIN { doc["editCase function"] = "\
-Function name is uppercase."
+Function name starts lower case but has uppercased letters."
category["editCase function"] = ari_code
}
-/^[a-z][a-z0-0_]*[A-Z][a-z0-9A-Z_]*[[:space:]]*\(/ {
- fail("editCase function")
+/^[a-z][a-z0-9_]*[A-Z][a-z0-9A-Z_]*[[:space:]]*\(/ {
+ if (is_yacc_or_lex == 0) {
+ fail("editCase function")
+ }
}
BEGIN { doc["hash"] = "\
@@ -1300,7 +1311,9 @@ Do not use vasprintf(), instead use xstr
BEGIN { doc["xasprintf"] = "\
Do not use xasprintf(), instead use xstrprintf"
- category["xasprintf"] = ari_code
+ fix("xasprintf", "gdb/defs.h", 1)
+ fix("xasprintf", "gdb/utils.c", 1)
+ category["xasprintf"] = ari_regression
}
/(^|[^_[:alnum:]])xasprintf[[:space:]]*\(/ {
fail("xasprintf")
@@ -1308,7 +1321,9 @@ Do not use xasprintf(), instead use xstr
BEGIN { doc["xvasprintf"] = "\
Do not use xvasprintf(), instead use xstrvprintf"
- category["xvasprintf"] = ari_code
+ fix("xvasprintf", "gdb/defs.h", 1)
+ fix("xvasprintf", "gdb/utils.c", 1)
+ category["xvasprintf"] = ari_regression
}
/(^|[^_[:alnum:]])xvasprintf[[:space:]]*\(/ {
fail("xvasprintf")
next reply other threads:[~2007-10-16 12:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-16 13:56 Pierre Muller [this message]
2007-10-24 20:29 ` 'Daniel Jacobowitz'
2007-10-25 7:22 ` Pierre Muller
2007-10-25 13:23 ` 'Daniel Jacobowitz'
2007-10-25 21:55 ` Eli Zaretskii
2007-10-25 22:10 ` Eli Zaretskii
2007-10-26 7:44 ` Pierre Muller
2007-10-26 9:44 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000f01c80ff1$e2943d80$a7bcb880$@u-strasbg.fr' \
--to=muller@ics.u-strasbg.fr \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox