Pinery new UniTESK features
New features of UniTESK technology are implemented in the Pinery tool. This tool implements automatic complex test data generation based on grammars describing data structure.

The main component of the tool is complex data generator, which takes description of data structure in RNG language and produces the required data in the form of XML documents.

Pinery supports several widely used notations for data structure description (like BNF) and for output data representation, and both these notations can be specified by user. For this purpose Pinery can be supplied with plug-ins translating the input notation into RNG or generated XML data into the required representation (see the next figure).


Pinery in combination with CTESK, implementing UniTESK for C software, was used to develop tests for POSIX functions working with regular exceptions. The functions under test are described in the file <regex.h> and include the following ones.

  • regcomp compiles a regular expression and provides required by POSIX standard diagnostics of invalid.
  • regexec checks whether a given string matches an already compiled regular expression.

Parameters of these functions are regular expressions and strings, both matching the given expression and not matching it.

Specifications of the functions under test were developed using CTESK. Test data generation was implemented with the help of Pinery. The scheme of the test system is shown on the next figure.


To generate test data for regcomp function Pinery BNF-input plug-in was used. Generator was executed in several different configurations to get both valid and invalid regular expressions according to basic or extended POSIX format.

To generate test data for regexec function Pinery regular expressions-input plug-in was used. Each expression used as regcomp argument was also used as data structure description for Pinery to produce a set of strings matching or not matching this expression.

Testing results are the following.

  • One previously unknown bug found in regcomp implementation.
  • One inconsistency between POSIX requirements and regcomp implementation was found. This inconsistency can be interpreted both as a bug, and as an ambiguity of the requirements.
  • In addition three ambiguous POSIX requirements on error codes were detected.
 
Copyright © 2014 Institute for System Programming of the Russian Academy of Sciences