This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix spurious conform test failures


String literals in the preprocessor output causes spurious test failures
because the tokenizer doesn't know how to skip over them, for example:

  Checking the namespace of "arpa/inet.h"... FAIL
    ------------------------------------------------------------------
    Namespace violation: "d"
    Namespace violation: "ror"
    Namespace violation: "swap"
    Namespace violation: "w"
    ------------------------------------------------------------------

Installed as obvious.

Andreas.

	* conform/conformtest.pl (checknamespace): Filter out string
	literals while tokenizing.
---
 conform/conformtest.pl | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/conform/conformtest.pl b/conform/conformtest.pl
index a8a27f5..cc0944a 100644
--- a/conform/conformtest.pl
+++ b/conform/conformtest.pl
@@ -275,9 +275,8 @@ sub checknamespace {
     } else {
       # We have to tokenize the line.
       my($str) = $_;
-      my($index) = 0;
-      my($len) = length ($str);
 
+      $str =~ s/"[^"]*"//g;
       foreach $token (split(/[^a-zA-Z0-9_]/, $str)) {
 	if ($token ne "") {
 	  newtoken ($token, @allow);
-- 
2.4.6

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]