Testing LibElf

LibElf development is proceeding side-by-side with that of a test suite.

Pre-requisites

The test suite needs the following tools:

The elfc translator

This script in ts/tset/bin/elfc converts a textual (YAML) description of an ELF file to an equivalent binary file of the appropriate class and endianness. It offers nearly complete control over the contents of the generated ELF file.

It is used by the test suite to generate both well-formed and malformed ELF files for use by test cases.

For example:

% cat t.yaml
ehdr: !Ehdr
  e_ident: !Ident
   ei_data: ELFDATA2MSB
  e_machine: EM_SPARCV9
  e_type: ET_REL
% ./tset/bin/elfc t.yaml
% file a.out
ELF 32-bit MSB relocatable, SPARC V9, version 1 (SYSV)

Most fields of the YAML file can be defaulted, allowing the YAML descriptions to be reasonably succinct.

Building the test suite

Running the test suite

   make execute TET_USER='-y REGEX'

LibElf/TestSuite (last edited 2008-06-17T21:37:17+0000 by anonymous)