See <http://build.squid-cache.org/job/3.HEAD-x64-debian-unstable/341/changes>
Changes: [Christos Tsantilas] Fix configuration file parsing bugs, related to quoted strings Try to fix 'comparison between signed and unsigned integer expression' compiler warning. [Christos Tsantilas] Fix configuration file parsing bugs, related to quoted strings This is patch try to fix problems discussed under the "[PATCH] Unknown cfg function" mail thread on squid-dev mailing list Fixes/changes: - The quoted tokens mode (configuration_includes_quoted_values parameter) is set to off by default - If configuration_includes_quoted_values is off the quoted tokens parsed using the ConfigParser::NextToken include the quotes, to keep compatibility with older releases. - The methods ConfigParser::RegexPattern() and ConfigParser::RegexStrtokFile() added to parse regex tokens. The regex tokens can not be quoted values but have their own syntax. - For the cases where quoted strings are required (wordlists, Notes parsing, Headers with acl), the new ConfigParser::NextQuotedToken method added. The old wordlists parser allowed escaping any character, this patch will return an error if you try to escape alphanumeric characters. The \r \n and \t have the C semantics. - Removes the ConfigParser::TokenUndo method. The new method ConfigParser::NextTokenPreview() which can be used to preview the next token is added. This method if the next token is invalid (eg unquoted with special characters) instead of calling self_destruct it will return the "[invalid token]" as token. - A set of new flags defined under ConfigParser class to define the type of parsing: ParseRegex_ (next token is regex) ParseQuotedOrToEOL_ (next token is quoted or to-EOL), PreviewMode_ (just do preview do not pop next token) - Currently parser read a line, and the tokens stored on this line and the line modified while parsed. This patch extracts the tokens from line and store them to ConfigParser::CfgLineTokens_ member. This method selected because 1) We may need to parse again the line so we do not want to modify it. For example call the ConfigParser::PeekAtToken method to check if it is a flag token ( eg "-i"), and if not call the ConfigParser::RegexPattern() method to read next regex expression. 2) The current line tokens must stored somewhere to support the following: char *name = ConfigParser::NextToken(); char *value = ConfigParser::NextToken(); The ConfigParser::CfgLineTokens_ reset when a new config line is read. TODO: - The ConfigParser::TokenPutBack method probably should removed in the future together with the ConfigParser::Undo_ and ConfigParser::Undo(). This method is currently used only in one place (acl regex). ------------------------------------------ [...truncated 8076 lines...] Testing ../../src/send-announce.h ...Ok. Testing ../../src/Server.h ...Ok. Testing ../../src/snmp_agent.h ...Ok. Testing ../../src/snmp_core.h ...Ok. Testing ../../src/SnmpRequest.h ...Ok. Testing ../../src/SquidConfig.h ...Ok. Testing ../../src/SquidDns.h ...Ok. Testing ../../src/SquidIpc.h ...Ok. Testing ../../src/SquidList.h ...Ok. Testing ../../src/SquidMath.h ...Ok. Testing ../../src/SquidString.h ...Ok. Testing ../../src/SquidTime.h ...Ok. Testing ../../src/StatCounters.h ...Ok. Testing ../../src/stat.h ...Ok. Testing ../../src/StatHist.h ...Ok. Testing ../../src/stmem.h ...Ok. Testing ../../src/StoreClient.h ...Ok. Testing ../../src/store_digest.h ...Ok. Testing ../../src/StoreEntryStream.h ...Ok. Testing ../../src/StoreFileSystem.h ...Ok. Testing ../../src/Store.h ...Ok. Testing ../../src/StoreHashIndex.h ...Ok. Testing ../../src/StoreIOBuffer.h ...Ok. Testing ../../src/StoreIOState.h ...Ok. Testing ../../src/store_key_md5.h ...Ok. Testing ../../src/store_log.h ...Ok. Testing ../../src/StoreMeta.h ...Ok. Testing ../../src/StoreMetaMD5.h ...Ok. Testing ../../src/StoreMetaObjSize.h ...Ok. Testing ../../src/StoreMetaSTD.h ...Ok. Testing ../../src/StoreMetaSTDLFS.h ...Ok. Testing ../../src/StoreMetaUnpacker.h ...Ok. Testing ../../src/StoreMetaURL.h ...Ok. Testing ../../src/StoreMetaVary.h ...Ok. Testing ../../src/store_rebuild.h ...Ok. Testing ../../src/StoreSearch.h ...Ok. Testing ../../src/StoreStats.h ...Ok. Testing ../../src/store_swapin.h ...Ok. Testing ../../src/StoreSwapLogData.h ...Ok. Testing ../../src/StrList.h ...Ok. Testing ../../src/SwapDir.h ...Ok. Testing ../../src/swap_log_op.h ...Ok. Testing ../../src/TimeOrTag.h ...Ok. Testing ../../src/tools.h ...Ok. Testing ../../src/typedefs.h ...Ok. Testing ../../src/unlinkd.h ...Ok. Testing ../../src/URL.h ...Ok. Testing ../../src/URLScheme.h ...Ok. Testing ../../src/urn.h ...Ok. Testing ../../src/wccp2.h ...Ok. Testing ../../src/wccp.h ...Ok. Testing ../../src/whois.h ...Ok. Testing ../../src/win32.h ...Ok. Testing ../../src/WinSvc.h ...Ok. Testing ../../src/wordlist.h ...Ok. Testing ../../src/YesNoNone.h ...Ok. Testing ../../src/DiskIO/DiskFile.h ...Ok. Testing ../../src/DiskIO/DiskIOModule.h ...Ok. Testing ../../src/DiskIO/DiskIOStrategy.h ...Ok. Testing ../../src/DiskIO/IORequestor.h ...Ok. Testing ../../src/DiskIO/ReadRequest.h ...Ok. Testing ../../src/DiskIO/WriteRequest.h ...Ok. Testing ../../src/DiskIO/AIO/AIODiskFile.h ...Ok. Testing ../../src/DiskIO/AIO/AIODiskIOModule.h ...Ok. Testing ../../src/DiskIO/AIO/AIODiskIOStrategy.h ...Ok. Testing ../../src/DiskIO/AIO/aio_win32.h ...Ok. Testing ../../src/DiskIO/AIO/async_io.h ...Ok. Testing ../../src/DiskIO/Blocking/BlockingDiskIOModule.h ...Ok. Testing ../../src/DiskIO/Blocking/BlockingFile.h ...Ok. Testing ../../src/DiskIO/Blocking/BlockingIOStrategy.h ...Ok. Testing ../../src/DiskIO/DiskDaemon/diomsg.h ...Ok. Testing ../../src/DiskIO/DiskDaemon/DiskdAction.h ...Ok. Testing ../../src/DiskIO/DiskDaemon/DiskDaemonDiskIOModule.h ...Ok. Testing ../../src/DiskIO/DiskDaemon/DiskdFile.h ...Ok. Testing ../../src/DiskIO/DiskDaemon/DiskdIOStrategy.h ...Ok. Testing ../../src/DiskIO/DiskThreads/CommIO.h ...Ok. Testing ../../src/DiskIO/DiskThreads/DiskThreadsDiskFile.h ...Ok. Testing ../../src/DiskIO/DiskThreads/DiskThreadsDiskIOModule.h ...Ok. Testing ../../src/DiskIO/DiskThreads/DiskThreads.h ...Ok. Testing ../../src/DiskIO/DiskThreads/DiskThreadsIOStrategy.h ...Ok. Testing ../../src/DiskIO/IpcIo/IpcIoDiskIOModule.h ...Ok. Testing ../../src/DiskIO/IpcIo/IpcIoFile.h ...Ok. Testing ../../src/DiskIO/IpcIo/IpcIoIOStrategy.h ...Ok. Testing ../../src/DiskIO/Mmapped/MmappedDiskIOModule.h ...Ok. Testing ../../src/DiskIO/Mmapped/MmappedFile.h ...Ok. Testing ../../src/DiskIO/Mmapped/MmappedIOStrategy.h ...Ok. PASS: testHeaders make[7]: Entering directory `<http://build.squid-cache.org/job/3.HEAD-x64-debian-unstable/ws/btlayer-00-default/squid-3.HEAD-BZR/_build/src'> make[7]: Nothing to be done for `tests/testRock.log'. make[7]: Nothing to be done for `tests/testUfs.log'. make[7]: Leaving directory `<http://build.squid-cache.org/job/3.HEAD-x64-debian-unstable/ws/btlayer-00-default/squid-3.HEAD-BZR/_build/src'> fatal: making test-suite.log: failed to create tests/testRock.trs fatal: making test-suite.log: failed to create tests/testRock.log fatal: making test-suite.log: failed to create tests/testUfs.trs fatal: making test-suite.log: failed to create tests/testUfs.log make[6]: *** [test-suite.log] Error 1 make[6]: Leaving directory `<http://build.squid-cache.org/job/3.HEAD-x64-debian-unstable/ws/btlayer-00-default/squid-3.HEAD-BZR/_build/src'> make[5]: *** [check-TESTS] Error 2 make[5]: Leaving directory `<http://build.squid-cache.org/job/3.HEAD-x64-debian-unstable/ws/btlayer-00-default/squid-3.HEAD-BZR/_build/src'> make[4]: *** [check-am] Error 2 make[4]: Leaving directory `<http://build.squid-cache.org/job/3.HEAD-x64-debian-unstable/ws/btlayer-00-default/squid-3.HEAD-BZR/_build/src'> make[3]: *** [check-recursive] Error 1 make[3]: Leaving directory `<http://build.squid-cache.org/job/3.HEAD-x64-debian-unstable/ws/btlayer-00-default/squid-3.HEAD-BZR/_build/src'> make[2]: *** [check] Error 2 make[2]: Leaving directory `<http://build.squid-cache.org/job/3.HEAD-x64-debian-unstable/ws/btlayer-00-default/squid-3.HEAD-BZR/_build/src'> make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `<http://build.squid-cache.org/job/3.HEAD-x64-debian-unstable/ws/btlayer-00-default/squid-3.HEAD-BZR/_build'> make: *** [distcheck] Error 1 buildtest.sh result is 2 BUILD: .././test-suite/buildtests/layer-00-default.opts configure: BUILD LIBRARIES: configure: BUILD EXTRA LIBRARIES: -lm -lnsl -lresolv -lcap -lrt -ldl -ldl configure: BUILD OBJECTS: configure: BUILD EXTRA OBJECTS: configure: BUILD C FLAGS: -Wall configure: BUILD EXTRA C FLAGS: -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wcomments -Wshadow -Werror -pipe -D_REENTRANT configure: BUILD C++ FLAGS: -g -O2 -march=native -std=c++0x configure: BUILD EXTRA C++ FLAGS: -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Wshadow -Werror -pipe -D_REENTRANT configure: BUILD LIBRARIES: configure: BUILD EXTRA LIBRARIES: -lm -lnsl -lresolv -lcap -lrt -ldl -ldl configure: BUILD OBJECTS: configure: BUILD EXTRA OBJECTS: configure: BUILD C FLAGS: -Wall configure: BUILD EXTRA C FLAGS: -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wcomments -Wshadow -Werror -pipe -D_REENTRANT configure: BUILD C++ FLAGS: -g -O2 -march=native -std=c++0x configure: BUILD EXTRA C++ FLAGS: -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Wshadow -Werror -pipe -D_REENTRANT checking for egrep... .././test-suite/../configure: line 7081: echo: write error: Broken pipe checking for fgrep... .././test-suite/../configure: line 7991: echo: write error: Broken pipe checking for egrep... ../configure: line 7081: echo: write error: Broken pipe checking for fgrep... ../configure: line 7991: echo: write error: Broken pipe # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 # XFAIL: 0 # FAIL: 0 FAIL: tests/testACLMaxUserIP FAIL: tests/testCacheManager FAIL: tests/testDiskIO FAIL: tests/testEvent FAIL: tests/testEventLoop FAIL: tests/test_http_range FAIL: tests/testHttpParser FAIL: tests/testHttpReply FAIL: tests/testHttpRequest FAIL: tests/testStore FAIL: tests/testString FAIL: tests/testURL FAIL: tests/testConfigParser FAIL: tests/testStatHist make[6]: *** [test-suite.log] Error 1 make[5]: *** [check-TESTS] Error 2 make[4]: *** [check-am] Error 2 make[3]: *** [check-recursive] Error 1 make[2]: *** [check] Error 2 make[1]: *** [check-recursive] Error 1 make: *** [distcheck] Error 1 Build FAILED. Build step 'Execute shell' marked build as failure