Opened 5 years ago

Last modified 5 years ago

#13228 new Bugs

argument parsing errors when unit_test_main() is called in a loop more than ones

Reported by: claus.klein@… Owned by: Gennadiy Rozental
Milestone: To Be Determined Component: test
Version: Boost 1.65.0 Severity: Problem
Keywords: Cc:

Description

I want to run my test suit in a loop to detect race conditions in a multi threading environment. You may see at my example test suit.

The problems does not occur with long options!

Claus-MBP:AgentProV4 clausklein$ ./demo_test -l all -2
loops requested: 2
0: ./demo_test
1: -l
2: all
Running 1 test case...
Entering test module "Demo"
demo_test.cpp:11: Entering test case "QueuedThreadPoolLoad_test"
simple compare
demo_test.cpp:16: info: check i == 0 has passed
demo_test.cpp:11: Leaving test case "QueuedThreadPoolLoad_test"; testing time: 88us
Leaving test module "Demo"; testing time: 133us

*** No errors detected
0: ./demo_test
1: -l
2: all
loops left: 1
Boost.Test WARNING: token "all" does not correspond to the Boost.Test argument 
                    and should be placed after all Boost.Test arguments and the -- separator.
                    For example: demo_test --random -- all
Boost.Test WARNING: token "all" does not correspond to the Boost.Test argument 
                    and should be placed after all Boost.Test arguments and the -- separator.
                    For example: demo_test --random -- all
Running 1 test case...

*** No errors detected
Claus-MBP:AgentProV4 clausklein$ ./demo_test --random --run_test=QueuedThreadPoolLoad_test -2
loops requested: 2
0: ./demo_test
1: --random
2: --run_test=QueuedThreadPoolLoad_test
Running 1 test case...

*** No errors detected
0: ./demo_test
1: --random
2: --run_test=QueuedThreadPoolLoad_test
loops left: 1
Running 1 test case...

*** No errors detected

Claus-MBP:AgentProV4 clausklein$ ./demo_test -i
0: ./demo_test
1: -i
Running 1 test case...
Platform: Mac OS
Compiler: Clang version 8.0.0 (clang-800.0.42.1)
STL     : libc++ version 3700
Boost   : 1.65.1

*** No errors detected
Claus-MBP:AgentProV4 clausklein$

Attachments (1)

demo_test.cpp (1.5 KB ) - added by claus.klein@… 5 years ago.

Download all attachments as: .zip

Change History (2)

by claus.klein@…, 5 years ago

Attachment: demo_test.cpp added

comment:1 by claus.klein@…, 5 years ago

Summary: argument parsing errors when unit_test_main() call in a loop more than onesargument parsing errors when unit_test_main() is called in a loop more than ones
Note: See TracTickets for help on using tickets.