[Patch, PR 61720] Clear regex BFS match queue after every iteration

Jonathan Wakely jwakely@redhat.com
Wed Jul 9 08:08:00 GMT 2014


On 09/07/14 09:48 +0200, Paolo Carlini wrote:
>Hi,
>
>On 07/09/2014 03:53 AM, Tim Shen wrote:
>>+// This file is for general testcases in regex.
>>+// We use a single file for multiple testcases because it takes too long to
>>+// compile regex for each testcase in a single file.
>>+// Normal testcases in other files should be moved into this file in the future.
>Thus the plan would be *all* the regex testcases in a single file!?! 
>If I understand correctly, that certainly doesn't make sense. In any 

Jakub pointed out that there are lots of useful tests for regexes in
the glibc testsuite. I think it might make sense to have a file of
tests cases that contains separate fields such as the input string,
the regex, the flags, and the expected result. Then a test case could
loop over the contents of that file and run every test.

I don't think it makes sense to add all new tests to a single file,
but if we import hundreds of test cases at once we probably don't want
to add hundereds of separate files each testing a single input string
against a single regex.

>case, I don't want this detail to slow down fixing the bug, thus 
>please commit fix + normal testcase mainline and branch and then we'll 
>take our time discussing the testing issue (I'm also meeting Jon face 
>to face in a few days...) By the way, are we sure that the various 
>regex testcases are enabled to run in parallel in the testsuite?

All the 28_regex tests run as part of the same target:

          normal7) \
            dirs="`cd $$srcdir; echo 26_*/* 28_*/[c-z]*`";; \

I've tried moving the 26_numeric tests to a different target but it
doesn't make much difference, the regex tests still take longer than
any other target. We could try splitting up the 28_regex tests across
two targets, but the fact is that it takes 2-5 seconds to compile any
test using std::regex, so the more tests we add the slower the
testsuite gets.



More information about the Libstdc++ mailing list