The test utility code contains a testutil_parse_opts that parses a command line to recognize commonly used options by test programs. However, some test programs don't use this, because they need additional options that might not be appropriate for the general case. Unfortunately for our project, none of test/format, test/checkpoint timestamp_abort, schema_abort use argument parsing in testutil. We have started to put tiered storage options into testutil_parse_opts , so on one hand it makes sense to "convert" these programs to use it. On the other hand, the list of options they use conflict with each other, or with existing options.
There are various ways of thinking of "multilevel" getopt calls, but they seem somewhat complicated. Perhaps better is having a testutil_parse_opt call (note singular vs plural), that parses a single option. Then the main program (e.g. schema_abort), can use its own option parsing, and for common options, it can call into testutil_parse_opt on an individual basis.
- related to
-
WT-9896 Coverity analysis defect 133850: Resource leak
- Closed