SOCIS/2015/CoverageAnalysis: 0001-Create_coverage_report_incl_debug_output_for_byte_size_diff.patch

File 0001-Create_coverage_report_incl_debug_output_for_byte_size_diff.patch, 65.5 KB (added by hermann19829, on Jun 26, 2015 at 7:16:29 PM)

Patch containing diffs to current rtems-tools root which can be used to reproduce byte size errors.

  • rtemstoolkit/options.py

    diff --git a/rtemstoolkit/options.py b/rtemstoolkit/options.py
    index 97b8ba7..5ddd3c8 100644
    a b class command_line(object): 
    9191            '--keep-going'     : ('_keep_going',       self._lo_bool,     False, '0',       True),
    9292            '--always-clean'   : ('_always_clean',     self._lo_bool,     False, '0',       True),
    9393            '--no-install'     : ('_no_install',       self._lo_bool,     False, '0',       True),
     94            '--coverage'       : ('_coverage',         self._lo_bool,     False, '0',       False),
    9495            '--help'           : (None,                self._lo_help,     False, None,      False)
    9596        }
    9697        self.long_opts_help = {
    class command_line(object): 
    105106            '--jobs=[0..n,none,half,full]': 'Run with specified number of jobs, default: num CPUs.',
    106107            '--macros file[,file]':         'Macro format files to load after the defaults',
    107108            '--log file':                   'Log file where all build out is written too',
     109            '--coverage':                   'Perform coverage analysis'
    108110        }
    109111        self.opts = { 'params' : [] }
    110112        self.command_path = command_path
    class command_line(object): 
    404406    def no_install(self):
    405407        return self.opts['no-install'] != '0'
    406408
     409    def coverage(self):
     410        return self.opts['coverage'] != '0'
     411
    407412    def user_macros(self):
    408413        #
    409414        # Return something even if it does not exist.
  • rtemstoolkit/wscript

    diff --git a/rtemstoolkit/wscript b/rtemstoolkit/wscript
    index 229deeb..955d491 100644
    a b def build(bld): 
    9393              install_path = None,
    9494              source = rld_source + rtems_utils + compression,
    9595              defines = ['HAVE_CONFIG_H=1',
    96                          'RTEMS_VERSION=' + bld.env.RTEMS_VERSION,
     96                         'RTEMS_VERSION=' + str(bld.env.RTEMS_VERSION),
    9797                         'FASTLZ_LEVEL=1'],
    9898              includes = ['.'] + conf['includes'],
    9999              cflags = conf['cflags'] + conf['warningflags'],
  • tester/covoar/CoverageMap.cc

    diff --git a/tester/covoar/CoverageMap.cc b/tester/covoar/CoverageMap.cc
    index 816be11..b470fea 100644
    a b  
    1010namespace Coverage {
    1111
    1212  CoverageMap::CoverageMap(
    13     uint32_t low,
    14     uint32_t high
    15   ) : CoverageMapBase(low, high)
     13    const std::string& exefileName,
     14    uint32_t           low,
     15    uint32_t           high
     16  ) : CoverageMapBase(exefileName, low, high)
    1617  {
    1718  }
    1819
  • tester/covoar/CoverageMap.h

    diff --git a/tester/covoar/CoverageMap.h b/tester/covoar/CoverageMap.h
    index 0f2f6d4..c211949 100644
    a b namespace Coverage { 
    2727     *  @param[in] high specifies the highest address of the coverage map.
    2828     */
    2929    CoverageMap(
    30       uint32_t low,
    31       uint32_t high
     30      const std::string& exefileName,
     31      uint32_t           low,
     32      uint32_t           high
    3233    );
    3334
    3435    /* Inherit documentation from base class. */
  • tester/covoar/CoverageMapBase.cc

    diff --git a/tester/covoar/CoverageMapBase.cc b/tester/covoar/CoverageMapBase.cc
    index 407ef5f..ed30603 100644
    a b  
    1616namespace Coverage {
    1717
    1818  CoverageMapBase::CoverageMapBase(
    19     uint32_t low,
    20     uint32_t high
     19    const std::string& exefileName,
     20    uint32_t           low,
     21    uint32_t           high
    2122  )
    2223  {
    2324    uint32_t       a;
    2425    AddressRange_t range;
    2526
     27    range.fileName    = exefileName;
    2628    range.lowAddress  = low;
    2729    range.highAddress = high;
    2830    RangeList.push_back( range );
  • tester/covoar/CoverageMapBase.h

    diff --git a/tester/covoar/CoverageMapBase.h b/tester/covoar/CoverageMapBase.h
    index 70b2b30..e1310c9 100644
    a b namespace Coverage { 
    2828     */
    2929    typedef struct {
    3030      /*!
     31       *  This is the file from which this originated.
     32       */
     33      std::string fileName;
     34
     35      /*!
    3136       *  This is the low address of the address map range.
    3237       */
    3338      uint32_t lowAddress;
    namespace Coverage { 
    4853    /*!
    4954     *  This method constructs a CoverageMapBase instance.
    5055     *
     56     *  @param[in] exefileName specifies the executable this originated in
    5157     *  @param[in] low specifies the lowest address of the coverage map
    5258     *  @param[in] high specifies the highest address of the coverage map
    5359     */
    5460    CoverageMapBase(
    55       uint32_t low,
    56       uint32_t high
     61      const std::string& exefileName,
     62      uint32_t           low,
     63      uint32_t           high
    5764    );
    5865
    5966    /*!
  • tester/covoar/CoverageReaderQEMU.cc

    diff --git a/tester/covoar/CoverageReaderQEMU.cc b/tester/covoar/CoverageReaderQEMU.cc
    index 8e34f8f..8681afe 100644
    a b namespace Coverage { 
    147147              stderr,
    148148              "*** Trace block is inconsistent with coverage map\n"
    149149              "*** Trace block (0x%08x - 0x%08x) for %d bytes\n"
    150               "*** Coverage map XXX \n",
     150              "*** Coverage map %s\n",
    151151              entry->pc,
    152152              a,
    153               entry->size
     153              entry->size,
     154              file
    154155            );
    155156          } else {
    156157            while (!aCoverageMap->isStartOfInstruction(a))
  • tester/covoar/DesiredSymbols.cc

    diff --git a/tester/covoar/DesiredSymbols.cc b/tester/covoar/DesiredSymbols.cc
    index b5032b4..d2595f2 100644
    a b namespace Coverage { 
    335335
    336336
    337337  void DesiredSymbols::createCoverageMap(
     338    const std::string& exefileName,
    338339    const std::string& symbolName,
    339340    uint32_t           size
    340341  )
    namespace Coverage { 
    366367        fprintf(
    367368          stderr,
    368369          "ERROR: DesiredSymbols::createCoverageMap - Attempt to create "
    369           "unified coverage maps for %s with different sizes (%d != %d)\n",
     370          "unified coverage maps for %s with different sizes (%s/%d != %s/%d)\n",
     371         
    370372          symbolName.c_str(),
     373          exefileName.c_str(),
    371374          itr->second.stats.sizeInBytes,
     375          itr->second.sourceFile->getFileName().c_str(),
    372376          size
    373377        );
    374378        if ( itr->second.stats.sizeInBytes < size )
    namespace Coverage { 
    384388
    385389      highAddress = size - 1;
    386390
    387       aCoverageMap = new CoverageMap( 0, highAddress );
     391      aCoverageMap = new CoverageMap( exefileName, 0, highAddress );
    388392      if (!aCoverageMap) {
    389393
    390394        fprintf(
    391395          stderr,
    392396          "ERROR: DesiredSymbols::createCoverageMap - Unable to allocate "
    393           "coverage map for %s\n",
     397          "coverage map for %s:%s\n",
     398          exefileName.c_str(),
    394399          symbolName.c_str()
    395400        );
    396401        exit( -1 );
  • tester/covoar/DesiredSymbols.h

    diff --git a/tester/covoar/DesiredSymbols.h b/tester/covoar/DesiredSymbols.h
    index 448f263..aacc3ef 100644
    a b namespace Coverage { 
    218218     *  This method creates a coverage map for the specified symbol
    219219     *  using the specified size.
    220220     *
     221     *  @param[in] exefileName specifies the executable from which the
     222     *             coverage map is being created
    221223     *  @param[in] symbolName specifies the symbol for which to create
    222224     *             a coverage map
    223225     *  @param[in] size specifies the size of the coverage map to create
    224226     */
    225227    void createCoverageMap(
     228      const std::string& exefileName,
    226229      const std::string& symbolName,
    227230      uint32_t           size
    228231    );
  • tester/covoar/ExecutableInfo.cc

    diff --git a/tester/covoar/ExecutableInfo.cc b/tester/covoar/ExecutableInfo.cc
    index 0a7eac3..d71c435 100644
    a b namespace Coverage { 
    8989  }
    9090
    9191  CoverageMapBase* ExecutableInfo::createCoverageMap (
     92    const std::string& fileName,
    9293    const std::string& symbolName,
    9394    uint32_t           lowAddress,
    9495    uint32_t           highAddress
    namespace Coverage { 
    99100
    100101    itr = coverageMaps.find( symbolName );
    101102    if ( itr == coverageMaps.end() ) {
    102       theMap = new CoverageMap( lowAddress, highAddress );
     103      theMap = new CoverageMap( fileName, lowAddress, highAddress );
    103104      coverageMaps[ symbolName ] = theMap;
    104105    } else {
    105106      theMap = itr->second;
  • tester/covoar/ExecutableInfo.h

    diff --git a/tester/covoar/ExecutableInfo.h b/tester/covoar/ExecutableInfo.h
    index ca4184a..7242715 100644
    a b namespace Coverage { 
    9393    /*!
    9494     *  This method creates a coverage map for the specified symbol.
    9595     *
     96     *  @param[in] exefileName specifies the source of the information
    9697     *  @param[in] symbolName specifies the name of the symbol
    9798     *  @param[in] lowAddress specifies the low address of the coverage map
    9899     *  @param[in] highAddress specifies the high address of the coverage map
    namespace Coverage { 
    100101     *  @return Returns a pointer to the coverage map
    101102     */
    102103    CoverageMapBase* createCoverageMap (
     104      const std::string& exefileName,
    103105      const std::string& symbolName,
    104106      uint32_t           lowAddress,
    105107      uint32_t           highAddress
  • tester/covoar/ObjdumpProcessor.cc

    diff --git a/tester/covoar/ObjdumpProcessor.cc b/tester/covoar/ObjdumpProcessor.cc
    index 486c720..ee83d13 100644
    a b namespace Coverage { 
    9797
    9898    // Create a coverage map for the symbol.
    9999    aCoverageMap = executableInfo->createCoverageMap(
    100       symbolName, lowAddress, endAddress
     100      executableInfo->getFileName().c_str(), symbolName, lowAddress, endAddress
    101101    );
    102102
    103103    if (aCoverageMap) {
    namespace Coverage { 
    108108           itr++ ) {
    109109
    110110        aCoverageMap->setIsStartOfInstruction( itr->address );
     111        if (strcmp(symbolName.c_str(), "_Thread_Handler"))
     112        {
     113          fprintf(stderr, "%s\n", itr->line.c_str());
     114        }
    111115      }
     116     
    112117
    113118      // Create a unified coverage map for the symbol.
    114119      SymbolsToAnalyze->createCoverageMap(
    115         symbolName, endAddress - lowAddress + 1
     120        executableInfo->getFileName().c_str(), symbolName, endAddress - lowAddress + 1
    116121      );
    117122    }
    118123  }
  • tester/covoar/ReportsBase.cc

    diff --git a/tester/covoar/ReportsBase.cc b/tester/covoar/ReportsBase.cc
    index b61fc76..1989add 100644
    a b void ReportsBase::WriteAnnotatedReport( 
    213213      uint32_t     id = 0;
    214214      std::string  annotation = "";
    215215      std::string  line;
    216       char         textLine[150];
     216      const std::size_t LINE_LENGTH = 150;
     217      char         textLine[LINE_LENGTH];
    217218
    218219      state = A_SOURCE;
    219220
    void ReportsBase::WriteAnnotatedReport( 
    236237        }
    237238      }
    238239
    239       sprintf( textLine, "%-70s", itr->line.c_str() );
     240      snprintf( textLine, LINE_LENGTH, "%-70s", itr->line.c_str() );
    240241      line = textLine + annotation;
    241242
    242243      PutAnnotatedLine( aFile, state, line, id);
  • new file tester/covoar/SymbolSet.cpp

    diff --git a/tester/covoar/SymbolSet.cpp b/tester/covoar/SymbolSet.cpp
    new file mode 100644
    index 0000000..eeb68f1
    - +  
     1/*
     2 * SymbolSet.cpp
     3 *
     4 *  Created on: Aug 5, 2014
     5 *      Author: Krzysztof Mięsowicz <krzysztof.miesowicz@gmail.com>
     6 */
     7
     8#include "SymbolSet.h"
     9#include "rld.h"
     10#include "rld-process.h"
     11#include <iostream>
     12#include <fstream>
     13#include <cstdio>
     14
     15namespace Symbols {
     16
     17SymbolSet::SymbolSet() {
     18        // TODO Auto-generated constructor stub
     19
     20}
     21
     22SymbolSet::~SymbolSet() {
     23        // TODO Auto-generated destructor stub
     24}
     25
     26std::string SymbolSet::parseNmOutputLine(std::string line) {
     27        std::string symbol = "";
     28        if (line.find("FUNC|") != std::string::npos) {
     29                symbol = line.substr(0, line.find('|'));
     30        }
     31        return symbol;
     32}
     33
     34std::string SymbolSet::getLibname(std::string libPath) {
     35        std::string libname = "", base = "", temp;
     36        size_t pos = libPath.find_last_of('/');
     37        if (pos != std::string::npos) {
     38                temp = libPath.substr(0, pos);
     39                libname = libPath.substr(pos + 1);
     40        }
     41        pos = temp.find_last_of('/');
     42        if (pos != std::string::npos) {
     43                base = temp.substr(pos + 1);
     44        }
     45
     46        return base + "/" + libname;
     47}
     48
     49void SymbolSet::parseNmOutput(std::ifstream& nm_out, const std::string& lib) {
     50        std::string line, symbol;
     51        while (getline(nm_out, line)) {
     52                symbol = parseNmOutputLine(line);
     53                if (symbol.length() > 0) {
     54                        symbols.push_back(symbol + " " + getLibname(lib));
     55                }
     56        }
     57}
     58
     59void SymbolSet::generateSymbolFile(std::string filePath, std::string target) {
     60        std::string nm_output = "nm.out";
     61        std::string nm_error = "nm.err";
     62        std::string libFiles;
     63
     64        for (std::string lib : libraries) {
     65                try {
     66                        auto status = rld::process::execute(target + "-nm",
     67                                        std::vector<std::string> { target + "-nm", "--format=sysv",
     68                                                        lib }, nm_output, nm_error);
     69                        if (status.type != rld::process::status::normal
     70                                        or
     71                                        status.code != 0) {
     72                                std::cout << "ERROR: nm returned " << status.code << std::endl;
     73                                std::cout << "For details see " << nm_error << " file." << std::endl;
     74                                std::remove(nm_output.c_str());
     75                                return;
     76                        }
     77
     78                } catch (rld::error& err) {
     79                        std::cout << "Error while running nm for " + lib << std::endl;
     80                        std::cout << err.what << " in " << err.where << std::endl;
     81                        return;
     82                }
     83
     84                std::ifstream nm_out(nm_output);
     85                try {
     86                        parseNmOutput(nm_out, lib);
     87                } catch(std::exception& e) {
     88                        std::cout << "ERROR while parsing nm output: " << e.what() << std::endl;
     89                }
     90                nm_out.close();
     91        }
     92
     93        std::remove(nm_output.c_str());
     94        std::remove(nm_error.c_str());
     95
     96        std::ofstream outputFile(filePath);
     97        for (std::string symbol : symbols) {
     98                outputFile << symbol << std::endl;
     99        }
     100        outputFile.close();
     101}
     102
     103} /* namespace Symbols */
  • new file tester/covoar/SymbolSet.h

    diff --git a/tester/covoar/SymbolSet.h b/tester/covoar/SymbolSet.h
    new file mode 100644
    index 0000000..54e925d
    - +  
     1/*
     2 * SymbolSet.h
     3 *
     4 *  Created on: Aug 5, 2014
     5 *      Author: Krzysztof Mięsowicz <krzysztof.miesowicz@gmail.com>
     6 */
     7
     8#ifndef SYMBOLSET_H_
     9#define SYMBOLSET_H_
     10
     11#include <string>
     12#include <vector>
     13
     14namespace Symbols {
     15
     16class SymbolSet {
     17public:
     18        SymbolSet();
     19        virtual ~SymbolSet();
     20
     21        const std::string getName() const {
     22                return name;
     23        }
     24
     25        void setName(const std::string& name) {
     26                this->name = name;
     27        }
     28
     29        const std::vector<std::string> getLibraries() const {
     30                return libraries;
     31        }
     32
     33        void addLibrary(std::string libraryPath) {
     34                libraries.push_back(libraryPath);
     35        }
     36
     37        void generateSymbolFile(std::string filePath, std::string target);
     38
     39private:
     40        std::string name;
     41        std::vector<std::string> libraries;
     42        std::vector<std::string> symbols;
     43
     44        std::string parseNmOutputLine(std::string line);
     45        std::string getLibname(std::string libPath);
     46        void parseNmOutput(std::ifstream& nm_out, const std::string& lib);
     47};
     48
     49} /* namespace Symbols */
     50
     51#endif /* SYMBOLSET_H_ */
  • new file tester/covoar/SymbolSetReader.cpp

    diff --git a/tester/covoar/SymbolSetReader.cpp b/tester/covoar/SymbolSetReader.cpp
    new file mode 100644
    index 0000000..886e256
    - +  
     1/*
     2 * SymbolSetReader.cpp
     3 *
     4 *  Created on: Aug 5, 2014
     5 *      Author: Krzysztof Mięsowicz <krzysztof.miesowicz@gmail.com>
     6 */
     7
     8#include "SymbolSetReader.h"
     9#include "iostream"
     10#include "fstream"
     11
     12namespace Symbols {
     13
     14SymbolSetReader::SymbolSetReader() {
     15        // TODO Auto-generated constructor stub
     16
     17}
     18
     19SymbolSetReader::~SymbolSetReader() {
     20        // TODO Auto-generated destructor stub
     21}
     22
     23std::vector<SymbolSet> SymbolSetReader::readSetFile(string filepath) {
     24        std::vector<SymbolSet> setList { };
     25        ifstream file(filepath);
     26        string line;
     27        while (getline(file, line)) {
     28                if (line.find("symbolset:") != std::string::npos) {
     29                        setList.emplace_back();
     30                } else if (line.length() > 0) {
     31
     32                        auto pair = parseLine(line);
     33
     34                        if(pair.first == "name") {
     35                                if (setList.empty()) {
     36                                        setList.emplace_back();
     37                                }
     38                                setList.rbegin()->setName(pair.second);
     39                                continue;
     40                        }
     41                        if(pair.first == "lib") {
     42                                setList.rbegin()->addLibrary(pair.second);
     43                                continue;
     44                        }
     45
     46                        std::cout << "Invalid entry in configuration file : " << line << endl;
     47                        break;
     48                }
     49        }
     50        file.close();
     51        return setList;
     52}
     53
     54std::pair<string, string> SymbolSetReader::parseLine(string line) {
     55        size_t delimeterPosition = line.find('=');
     56
     57        if (delimeterPosition != std::string::npos) {
     58                string key = line.substr(0, delimeterPosition);
     59                string value = line.substr(delimeterPosition + 1);
     60                return {trim(key), trim(value)};
     61        }
     62
     63        return {"",""};
     64}
     65
     66string& SymbolSetReader::trim(string& str) {
     67        // trim trailing spaces
     68        size_t endpos = str.find_last_not_of(" \t\n\r");
     69        if (string::npos != endpos) {
     70                str = str.substr(0, endpos + 1);
     71        }
     72
     73        // trim leading spaces
     74        size_t startpos = str.find_first_not_of(" \t\n\r");
     75        if (string::npos != startpos) {
     76                str = str.substr(startpos);
     77        }
     78
     79        return str;
     80}
     81
     82} /* namespace Symbols */
  • new file tester/covoar/SymbolSetReader.h

    diff --git a/tester/covoar/SymbolSetReader.h b/tester/covoar/SymbolSetReader.h
    new file mode 100644
    index 0000000..24e83cf
    - +  
     1/*
     2 * SymbolSetReader.h
     3 *
     4 *  Created on: Aug 5, 2014
     5 *      Author: Krzysztof Mięsowicz <krzysztof.miesowicz@gmail.com>
     6 */
     7
     8#ifndef SYMBOLSETREADER_H_
     9#define SYMBOLSETREADER_H_
     10
     11#include <string>
     12#include <vector>
     13#include <utility>
     14#include "SymbolSet.h"
     15
     16using namespace std;
     17
     18namespace Symbols {
     19
     20class SymbolSetReader {
     21public:
     22        SymbolSetReader();
     23        virtual ~SymbolSetReader();
     24
     25        vector<SymbolSet> readSetFile(string filepath);
     26protected:
     27        pair<string, string> parseLine(string line);
     28private:
     29        string& trim(string& str);
     30};
     31
     32} /* namespace Symbols */
     33
     34#endif /* SYMBOLSETREADER_H_ */
  • tester/covoar/covoar.cc

    diff --git a/tester/covoar/covoar.cc b/tester/covoar/covoar.cc
    index a3f137e..fa58828 100644
    a b  
    2323#include "TargetFactory.h"
    2424#include "GcovData.h"
    2525
     26#include "SymbolSetReader.h"
     27#include "SymbolSet.h"
     28
    2629/*
    2730 *  Variables to control general behavior
    2831 */
    std::list<Coverage::ExecutableInfo*> executablesToAnalyze; 
    3841const char*                          explanations = NULL;
    3942char*                                progname;
    4043const char*                          symbolsFile = NULL;
     44const char*                                                      symbolSetFile = NULL;
    4145const char*                          gcnosFileName = NULL;
    4246char                                 gcnoFileName[FILE_NAME_LENGTH];
    4347char                                 gcdaFileName[FILE_NAME_LENGTH];
    void usage() 
    6468           "(RTEMS, QEMU, TSIM or Skyeye)\n"
    6569    "  -E EXPLANATIONS           - name of file with explanations\n"
    6670    "  -s SYMBOLS_FILE           - name of file with symbols of interest\n"
     71    "  -S SYMBOL_SET_FILE        - name of file specifying symbol set of interest\n"
    6772    "  -1 EXECUTABLE             - name of executable to get symbols from\n"
    6873    "  -e EXE_EXTENSION          - extension of the executables to analyze\n"
    6974    "  -c COVERAGEFILE_EXTENSION - extension of the coverage files to analyze\n"
    Configuration::Options_t Options[] = { 
    8994  { "explanations",         NULL },
    9095  { "format",               NULL },
    9196  { "symbolsFile",          NULL },
     97  { "symbolSetFile",                NULL },
    9298  { "outputDirectory",      NULL },
    9399  { "executableExtension",  NULL },
    94100  { "coverageExtension",    NULL },
    int main( 
    166172  //
    167173  progname = argv[0];
    168174
    169   while ((opt = getopt(argc, argv, "C:1:L:e:c:g:E:f:s:T:O:p:v")) != -1) {
     175  while ((opt = getopt(argc, argv, "C:1:L:e:c:g:E:f:s:S:T:O:p:v")) != -1) {
    170176    switch (opt) {
    171177      case 'C': CoverageConfiguration->processFile( optarg ); break;
    172178      case '1': singleExecutable      = optarg; break;
    int main( 
    177183      case 'E': explanations          = optarg; break;
    178184      case 'f': format                = optarg; break;
    179185      case 's': symbolsFile           = optarg; break;
     186      case 'S': symbolSetFile                 = optarg; break;
    180187      case 'T': target                = optarg; break;
    181188      case 'O': outputDirectory       = optarg; break;
    182189      case 'v': Verbose               = true;   break;
    int main( 
    337344  }
    338345
    339346  // Validate that we have a symbols of interest file.
    340   if (!symbolsFile) {
    341     fprintf( stderr, "ERROR: symbols of interest file not specified\n" );
     347  if (!symbolsFile && !symbolSetFile) {
     348    fprintf( stderr, "ERROR: neither symbols of interest file nor symbol set file not specified\n" );
    342349    usage();
    343350    exit(-1);
    344351  }
    int main( 
    352359
    353360  // Create the set of desired symbols.
    354361  SymbolsToAnalyze = new Coverage::DesiredSymbols();
    355   SymbolsToAnalyze->load( symbolsFile );
     362
     363  //Load symbols from specified symbolsFile
     364  if(symbolsFile) {
     365          SymbolsToAnalyze->load( symbolsFile );
     366  }
     367
     368  //Read symbol configuration file and load needed symbols
     369  if(symbolSetFile) {
     370          fprintf(stderr,"Reading symbols sets configuration for symbol set file: %s\n", symbolSetFile);
     371          Symbols::SymbolSetReader ssr;
     372          std::vector<Symbols::SymbolSet> symbolSets = ssr.readSetFile(symbolSetFile);
     373
     374          Symbols::SymbolSet& set = symbolSets[0];
     375          fprintf(stderr,"Generating symbol file for %s\n", set.getName().c_str());
     376          set.generateSymbolFile(set.getName() + ".syms", target);
     377          SymbolsToAnalyze->load((set.getName() + ".syms").c_str());
     378  }
     379
    356380  if (Verbose)
    357381    fprintf(
    358382      stderr,
  • tester/covoar/qemu-traces.h

    diff --git a/tester/covoar/qemu-traces.h b/tester/covoar/qemu-traces.h
    index 7e37840..1bee66f 100644
    a b  
    3333
    3434/* XXX really not always right */
    3535/* XXX Added for covoar so this compiles */
     36//typedef uint32_t target_ulong;
    3637typedef uint32_t target_ulong;
    3738
    3839/* File header definition.  */
  • tester/covoar/wscript

    diff --git a/tester/covoar/wscript b/tester/covoar/wscript
    index f8311d2..495ff28 100644
    a b APPNAME='covoar' 
    4646top = '.'
    4747out = 'build'
    4848
     49rtl_includes = ['../../rtemstoolkit',
     50                '../../rtemstoolkit/elftoolchain/common',
     51                '../../rtemstoolkit/elftoolchain/libelf',
     52                '../../rtemstoolkit/libiberty']
     53
    4954def options(opt):
    5055    opt.load('compiler_cxx')
    5156
    def configure(conf): 
    5459    conf.check_cc(function_name='open64', header_name="stdlib.h", mandatory = False)
    5560    conf.check_cc(function_name='stat64', header_name="stdlib.h", mandatory = False)
    5661    conf.write_config_header('covoar-config.h')
     62    conf.env.STLIBPATH_RLD = conf.path.abspath() + '/../../build/rtemstoolkit'
     63    conf.env.STLIB_RLD = ['rld','iberty','elf']
    5764
    5865def build(bld):
    5966    bld.stlib(target = 'ccovoar',
    def build(bld): 
    8996                        'Target_lm32.cc',
    9097                        'Target_m68k.cc',
    9198                        'Target_powerpc.cc',
    92                         'Target_sparc.cc'],
     99                        'Target_sparc.cc',
     100                        'SymbolSet.cpp',
     101                        'SymbolSetReader.cpp'],
    93102              cflags = ['-O2', '-g'],
    94               includes = ['.'])
     103              cxxflags = ['-std=c++11', '-O2', '-g'],
     104              includes = ['.'] + rtl_includes)
    95105
    96106    bld.program(target = 'trace-converter',
    97107                source = ['TraceConverter.cc',
    def build(bld): 
    106116
    107117    bld.program(target = 'covoar',
    108118                source = ['covoar.cc'],
    109                 use = 'ccovoar',
     119                use = ['ccovoar','RLD'],
    110120                cflags = ['-O2', '-g'],
    111121                includes = ['.'])
  • new file tester/rt/coverage.py

    diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py
    new file mode 100644
    index 0000000..eb6e761
    - +  
     1'''
     2Created on Jul 7, 2014
     3
     4@author: Krzysztof Miesowicz <krzysztof.miesowicz@gmail.com>
     5'''
     6from rtemstoolkit import path
     7from rtemstoolkit import log
     8from rtemstoolkit import execute
     9from rtemstoolkit import macros
     10import shutil
     11import os
     12from datetime import datetime
     13
     14class summary:
     15    def __init__(self, p_summaryDir):
     16        self.summaryFilePath = path.join(p_summaryDir, "summary.txt")
     17        self.indexFilePath = path.join(p_summaryDir, "index.html")
     18        self.bytes_analyzed = 0
     19        self.bytes_notExecuted = 0
     20        self.percentage_executed = 0.0
     21        self.percentage_notExecuted = 100.0
     22        self.ranges_uncovered = 0
     23        self.branches_uncovered = 0
     24        self.branches_total = 0
     25        self.branches_alwaysTaken = 0
     26        self.branches_neverTaken = 0
     27        self.percentage_branchesCovered = 0.0
     28        self.isFailure = False
     29
     30    def parse(self):
     31        if(not path.exists(self.summaryFilePath)):
     32            log.warning("Summary file " + self.summaryFilePath + " does not exist!")
     33            self.isFailure = True
     34            return
     35
     36        summaryFile = open(self.summaryFilePath,'r')
     37        self.bytes_analyzed = self._getValueFromNextLineWithColon(summaryFile)
     38        self.bytes_notExecuted = self._getValueFromNextLineWithColon(summaryFile)
     39        self.percentage_executed = self._getValueFromNextLineWithColon(summaryFile)
     40        self.percentage_notExecuted = self._getValueFromNextLineWithColon(summaryFile)
     41        self.ranges_uncovered = self._getValueFromNextLineWithColon(summaryFile)
     42        self.branches_total = self._getValueFromNextLineWithColon(summaryFile)
     43        self.branches_uncovered = self._getValueFromNextLineWithColon(summaryFile)
     44        self.branches_alwaysTaken = self._getValueFromNextLineWithoutColon(summaryFile)
     45        self.branches_neverTaken = self._getValueFromNextLineWithoutColon(summaryFile)
     46        summaryFile.close()
     47        if not self.branches_uncovered == '' and not self.branches_total == '':
     48            self.percentage_branchesCovered = 1 - float(self.branches_uncovered) / float(self.branches_total)
     49        else:
     50            self.percentage_branchesCovered = 0.0
     51        return
     52
     53    def _getValueFromNextLineWithColon(self, summaryFile):
     54        line = summaryFile.readline()
     55        if ':' in line:
     56            return line.split(':')[1].strip()
     57        else:
     58            return ''
     59
     60    def _getValueFromNextLineWithoutColon(self, summaryFile):
     61        line = summaryFile.readline()
     62        return line.strip().split(' ')[0]
     63
     64class reportGen:
     65    def __init__(self, p_symbolSetsList, p_targetDir):
     66        self.symbolSetsList = p_symbolSetsList
     67        self.targetDir = p_targetDir
     68        self.partialReportsFiles = list(["index.html", "summary.txt"])
     69        self.numberOfColumns = 1
     70
     71    def _findPartialReports(self):
     72        partialReports = {}
     73        for symbolSet in self.symbolSetsList:
     74            setSummary = summary(path.join(self.targetDir, "test", symbolSet))
     75            setSummary.parse()
     76            partialReports[symbolSet] = setSummary
     77        return partialReports
     78
     79    def _prepareHeadSection(self):
     80        headSection = '''
     81        <head>
     82        <title>RTEMS coverage report</title>
     83        <style type="text/css">
     84            progress[value] {
     85              -webkit-appearance: none;
     86               appearance: none;
     87
     88              width: 150px;
     89              height: 15px;
     90            }
     91        </style>
     92        </head>'''
     93        return headSection
     94
     95    def _prepareIndexContent(self, partialReports):
     96        header = "<h1> RTEMS coverage analysis report </h1>"
     97        header += "<h3>Coverage reports by symbols sets:</h3>"
     98        table = "<table>"
     99        table += self._headerRow()
     100        for symbolSet in partialReports:
     101            table += self._row(symbolSet, partialReports[symbolSet])
     102        table += "</table> </br>"
     103        timestamp = "Analysis performed on " + datetime.now().ctime()
     104        return "<body>\n" + header + table + timestamp + "\n</body>"
     105
     106    def _row(self, symbolSet, summary):
     107        row = "<tr>"
     108        row += "<td>" + symbolSet + "</td>"
     109        if summary.isFailure:
     110            row += ' <td colspan="' + str(self.numberOfColumns-1) + '" style="background-color:red">FAILURE</td>'
     111        else:
     112            row += " <td>" + self._link(summary.indexFilePath,"Index") + "</td>"
     113            row += " <td>" + self._link(summary.summaryFilePath,"Summary") + "</td>"
     114            row += " <td>" + summary.bytes_analyzed + "</td>"
     115            row += " <td>" + summary.bytes_notExecuted + "</td>"
     116            row += " <td>" + summary.ranges_uncovered + "</td>"
     117            row += " <td>" + summary.percentage_executed + "%</td>"
     118            row += " <td>" + summary.percentage_notExecuted + "%</td>"
     119            row += ' <td><progress value="' + summary.percentage_executed + '" max="100"></progress></td>'
     120            row += " <td>" + summary.branches_uncovered + "</td>"
     121            row += " <td>" + summary.branches_total + "</td>"
     122            row += " <td> {:.3%} </td>".format(summary.percentage_branchesCovered)
     123            row += ' <td><progress value="{:.3}" max="100"></progress></td>'.format(100*summary.percentage_branchesCovered)
     124            row += "</tr>\n"
     125        return row
     126
     127    def _headerRow(self):
     128        row = "<tr>"
     129        row += "<th> Symbols set name </th>"
     130        row += "<th> Index file </th>"
     131        row += "<th> Summary file </th>"
     132        row += "<th> Bytes analyzed </th>"
     133        row += "<th> Bytes not executed </th>"
     134        row += "<th> Uncovered ranges </th>"
     135        row += "<th> Percentage covered </th>"
     136        row += "<th> Percentage uncovered </th>"
     137        row += "<th> Instruction coverage </th>"
     138        row += "<th> Branches uncovered </th>"
     139        row += "<th> Branches total </th>"
     140        row += "<th> Branches covered percentage </th>"
     141        row += "<th> Branches coverage </th>"
     142        row += "</tr>\n"
     143        self.numberOfColumns = row.count('<th>')
     144        return row
     145
     146    def _link(self, address, text):
     147        return '<a href="' + address + '">' + text + '</a>'
     148
     149    def _createIndexFile(self, headSection, content):
     150        f = open(path.join(self.targetDir, "report.html"),"w")
     151        try:
     152            f.write(headSection)
     153            f.write(content)
     154        finally:
     155            f.close()
     156
     157    def generate(self):
     158        partialReports = self._findPartialReports()
     159        headSection = self._prepareHeadSection()
     160        indexContent = self._prepareIndexContent(partialReports)
     161        self._createIndexFile(headSection,indexContent)
     162#         _createSummaryFile(summaryContent)
     163
     164class symbolsConfiguration(object):
     165    '''
     166    Manages symbols configuration - reading from symbol file
     167    '''
     168    def __init__(self):
     169        self.symbolSets = []
     170
     171    def _log_invalid_format(self):
     172        log.stderr("Invalid symbol configuration file")
     173        log.stderr(''' Configuration file format:
     174                symbolset:
     175                   name=SYMBOLSET_NAME
     176                   lib=PATH_TO_LIBRARY_1
     177                   lib=PATH_TO_LIBRARY_2
     178                symbolset:
     179                    name=SYMBOLSET_NAME_N
     180                    lib=PATH_TO_LIBRARY        ''')
     181
     182    def load(self, symbolSetConfigFile):
     183        scf = open(symbolSetConfigFile, 'r')
     184        for line in scf:
     185            try:
     186                if line.strip().startswith("symbolset"):
     187                    self.symbolSets.append(symbolSet("",[]))
     188                else:
     189                    splitted = line.split('=')
     190                    if(len(splitted) == 2):
     191                        key = splitted[0].strip()
     192                        value = splitted[1].strip()
     193                        if key == 'name':
     194                            self.symbolSets[-1].name = value
     195                        elif key == 'lib':
     196                            self.symbolSets[-1].libs.append(value)
     197                        else:
     198                            log.stderr("Invalid key : " + key + " in symbol set configuration file " + symbolSetConfigFile)
     199                    else:
     200                        self._log_invalid_format()
     201            except:
     202                self._log_invalid_format()
     203        scf.close()
     204
     205    def save(self, path):
     206        scf = open(path, 'w')
     207        for sset in self.symbolSets:
     208            sset.writeSetFile(path)
     209        scf.close()
     210
     211class symbolSet(object):
     212    def __init__(self, name, libs):
     213        self.name = name
     214        self.libs = libs
     215
     216    def isValid(self):
     217        if len(self.name) == 0:
     218            log.stderr("Invalid symbol set. Symbol set must have name! ")
     219            return False
     220        if len(self.libs) == 0:
     221            log.stderr("Invalid symbol set. Symbol set must have specified libraries!")
     222            return False
     223        for lib in self.libs:
     224            if not path.exists(lib):
     225                log.stderr("Invalid library path: " + lib)
     226                return False
     227        return True
     228
     229    def writeSetFile(self, path):
     230        f = open(path, 'w')
     231        f.write("symbolset:\n")
     232        f.write("\t name=" + self.name + '\n')
     233        for lib in self.libs:
     234            f.write("\t lib=" + lib + '\n')
     235        f.close()
     236
     237class covoar(object):
     238    '''
     239    Covoar runner
     240    '''
     241
     242    def __init__(self, baseResultDir, configDir, tracesDir, covoarSrcDir):
     243        self.baseResultDir = baseResultDir
     244        self.configDir = configDir
     245        self.tracesDir = tracesDir
     246        self.covoarSrcDir = covoarSrcDir
     247
     248    def run(self, setName, covoarConfigFile, symbolFile):
     249        covoarResultDir = path.join(self.baseResultDir, setName)
     250
     251        if (not path.exists(covoarResultDir)):
     252            path.mkdir(covoarResultDir)
     253
     254        if (not path.exists(symbolFile)):
     255            log.stderr("Symbol set file: " + symbolFile + " doesn't exists! Covoar can not be run!")
     256            log.stderr("Skipping " + setName)
     257            return
     258
     259        command = "covoar -v -C" + covoarConfigFile + " -S " + symbolFile + " -O " + covoarResultDir + " " + path.join(self.tracesDir, "*.exe")
     260        log.notice("Running covoar for " + setName, stdout_only=True)
     261        log.notice(command, stdout_only=True)
     262        executor = execute.execute(verbose=True, output=output_handler)
     263        exit_code = executor.shell(command, cwd=os.getcwd())
     264         
     265        shutil.copy2(path.join(self.covoarSrcDir, 'table.js'), path.join(covoarResultDir, 'table.js'))
     266        shutil.copy2(path.join(self.covoarSrcDir, 'covoar.css'), path.join(covoarResultDir, 'covoar.css'))
     267         
     268        log.notice("Coverage run for " + setName + " finished ")
     269        status = "success"
     270        if (exit_code[0] != 0):
     271            status = "failure. Error code: " + str(exit_code[0])
     272        log.notice("Coverage run for " + setName + " finished " + status)
     273        log.notice("-----------------------------------------------")
     274
     275class coverage_run(object):
     276    '''
     277    Coverage analysis support for rtems-test
     278    '''
     279
     280    def __init__(self, p_macros):
     281        '''
     282        Constructor
     283        '''
     284        self.macros = p_macros
     285        self.targetDir = self.macros['_cwd']
     286        self.testDir = path.join(self.targetDir, "test")
     287        self.rtdir = path.abspath(self.macros['_rtdir'])
     288        self.rtscripts = self.macros.expand(self.macros['_rtscripts'])
     289        self.coverageConfigPath = path.join(self.rtscripts, "coverage")
     290        self.symbolConfigPath = path.join(self.coverageConfigPath, "symbolSets.config")
     291        self.tracesDir = path.join(self.targetDir, 'coverage')
     292        self.config_map = self.macros.macros['coverage']
     293        self.executables = None
     294        self.symbolSets = []
     295
     296    def prepareEnvironment(self):
     297        if(path.exists(self.tracesDir)):
     298            path.removeall(self.tracesDir)
     299        path.mkdir(self.tracesDir)
     300        log.notice("Coverage environment prepared", stdout_only = True)
     301
     302    def writeCovoarConfig(self, covoarConfigFile):
     303        ccf = open(covoarConfigFile, 'w')
     304        ccf.write("format = " + self.config_map['format'][2] + '\n')
     305        ccf.write("target = " + self.config_map['target'][2] + '\n')
     306        ccf.write("explanations = " + self.macros.expand(self.config_map['explanations'][2]) + '\n')
     307        ccf.write("coverageExtension = " + self.config_map['coverageextension'][2] + '\n')
     308        ccf.write("gcnosFile = " + self.macros.expand(self.config_map['gcnosfile'][2]) + '\n')
     309        ccf.write("executableExtension = " + self.config_map['executableextension'][2] + '\n')
     310        ccf.write("projectName = " + self.config_map['projectname'][2] + '\n')
     311        ccf.close()
     312
     313    def run(self):
     314        if self.executables == None:
     315            log.stderr("ERROR: Executables for coverage analysis unspecified!")
     316            raise Exception('Executable for coverage analysis unspecified')
     317        if self.config_map == None:
     318            log.stderr("ERROR: Configuration map for coverage analysis unspecified!")
     319            raise Exception("ERROR: Configuration map for coverage analysis unspecified!")
     320
     321        covoarConfigFile = path.join(self.tracesDir, 'config')
     322        self.writeCovoarConfig(covoarConfigFile)
     323        if(not path.exists(covoarConfigFile)):
     324            log.stderr("Covoar configuration file: " + path.abspath(covoarConfigFile) + " doesn't exists! Covoar can not be run! ");
     325            return -1
     326
     327        self._linkExecutables()
     328
     329        symbolConfig = symbolsConfiguration()
     330        symbolConfig.load(self.symbolConfigPath)
     331
     332        for sset in symbolConfig.symbolSets:
     333            if sset.isValid():
     334                symbolSetFile = path.join(self.tracesDir, sset.name + ".symcfg")
     335                sset.writeSetFile(symbolSetFile)
     336                self.symbolSets.append(sset.name)
     337
     338                covoar_run = covoar(self.testDir, self.symbolConfigPath, self.tracesDir, path.join(self.rtdir, 'covoar'))
     339                covoar_run.run(sset.name, covoarConfigFile, symbolSetFile)
     340            else:
     341                log.stderr("Invalid symbol set " + sset.name + ". Skipping covoar run.")
     342
     343        self._generateReports();
     344        self._cleanup();
     345        self._summarize();
     346
     347    def _linkExecutables(self):
     348        log.notice("Linking executables to " + self.tracesDir)
     349
     350        for exe in self.executables:
     351            dst = path.join(self.tracesDir, path.basename(exe))
     352            os.link(exe, dst)
     353        log.notice("Symlinks made")
     354
     355    def _generateReports(self):
     356        log.notice("Generating reports")
     357        report = reportGen(self.symbolSets, self.targetDir)
     358        report.generate()
     359
     360    def _cleanup(self):
     361        log.notice("Cleaning workspace up")
     362        #path.removeall(self.tracesDir)
     363
     364    def _summarize(self):
     365        log.notice("Coverage analysis finished. You can find results in " + self.targetDir)
     366
     367def output_handler(text):
     368    log.notice(text, stdout_only = False)
     369
     370if __name__ == "__main__":
     371    print "coverage main"
     372    c = coverage_run("/home/hf/coverage_test_leon2","/home/hf/development/rtems/src/rtems-tools/tester")
     373    c.prepareEnvironment()
     374    c.executables = ["/home/hf/development/rtems/src/b-leon2/sparc-rtems4.11/c/leon2/testsuites/samples/hello/hello.ralf"]
     375    c.run()
  • tester/rt/test.py

    diff --git a/tester/rt/test.py b/tester/rt/test.py
    index 551c8b5..6fd0f6e 100644
    a b class test(object): 
    6464        if not path.isfile(executable):
    6565            raise error.general('cannot find executable: %s' % (executable))
    6666        self.opts.defaults['test_executable'] = executable
     67        self.opts.defaults['test_executable_name'] = path.basename(executable)
    6768        if rtems_tools:
    6869            rtems_tools_bin = path.join(self.opts.defaults.expand(rtems_tools), 'bin')
    6970            if not path.isdir(rtems_tools_bin):
    def run(command_path = None): 
    197198                    '--debug-trace': 'Debug trace based on specific flags',
    198199                    '--filter':      'Glob that executables must match to run (default: ' +
    199200                              default_exefilter + ')',
    200                     '--stacktrace':  'Dump a stack trace on a user termination (^C)' }
     201                    '--stacktrace':  'Dump a stack trace on a user termination (^C)'}
    201202        opts = options.load(sys.argv,
    202203                            optargs = optargs,
    203204                            command_path = command_path)
    def run(command_path = None): 
    238239        if not bsp_script:
    239240            raise error.general('BSP script not found: %s' % (bsp))
    240241        bsp_config = opts.defaults.expand(opts.defaults[bsp])
     242
     243        coverage_enabled = opts.coverage()
     244        if coverage_enabled:
     245            import coverage
     246            from rtemstoolkit import check
     247            log.notice("Coverage analysis requested")
     248            opts.defaults.load('%%{_configdir}/coverage.mc')
     249            if not check.check_exe('__covoar', opts.defaults['__covoar']):
     250                raise error.general("Covoar not found!")
     251            coverage = coverage.coverage_run(opts.defaults)
     252            coverage.prepareEnvironment();
     253
    241254        report_mode = opts.find_arg('--report-mode')
    242255        if report_mode:
    243256            if report_mode[1] != 'failures' and \
    def run(command_path = None): 
    302315        end_time = datetime.datetime.now()
    303316        log.notice('Average test time: %s' % (str((end_time - start_time) / total)))
    304317        log.notice('Testing time     : %s' % (str(end_time - start_time)))
     318
     319        if coverage_enabled:
     320            coverage.config_map = opts.defaults.macros['coverage']
     321            coverage.executables = executables
     322            coverage.run()
     323
    305324    except error.general, gerr:
    306325        print gerr
    307326        sys.exit(1)
  • new file tester/rtems/testing/bsps/leon2-coverage.mc

    diff --git a/tester/rtems/testing/bsps/leon2-coverage.mc b/tester/rtems/testing/bsps/leon2-coverage.mc
    new file mode 100644
    index 0000000..bd552bd
    - +  
     1#
     2# RTEMS Tools Project (http://www.rtems.org/)
     3# Copyright 2010-2014 Chris Johns (chrisj@rtems.org)
     4# All rights reserved.
     5#
     6# This file is part of the RTEMS Tools package in 'rtems-tools'.
     7#
     8# Redistribution and use in source and binary forms, with or without
     9# modification, are permitted provided that the following conditions are met:
     10#
     11# 1. Redistributions of source code must retain the above copyright notice,
     12# this list of conditions and the following disclaimer.
     13#
     14# 2. Redistributions in binary form must reproduce the above copyright notice,
     15# this list of conditions and the following disclaimer in the documentation
     16# and/or other materials provided with the distribution.
     17#
     18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     19# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
     22# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28# POSSIBILITY OF SUCH DAMAGE.
     29#
     30
     31#
     32# All paths in defaults must be Unix format. Do not store any Windows format
     33# paths in the defaults.
     34#
     35# Every entry must describe the type of checking a host must pass.
     36#
     37# Records:
     38#  key: type, attribute, value
     39#   type     : none, dir, exe, triplet
     40#   attribute: none, required, optional
     41#   value    : 'single line', '''multi line'''
     42#
     43
     44#
     45# The sparc/leon2 QEMU BSP
     46#
     47
     48[global]
     49bsp:                      none,    none,     'leon2'
     50coverage_supported:           none,        none,           '1'
     51
     52[leon2]
     53leon2:                    none,    none,     '%{_rtscripts}/qemu.cfg'
     54leon2_arch:               none,    none,     'sparc'
     55leon2_opts:               none,    none,     '-nographic -machine at697'
     56
     57[coverage]
     58format:                         none,    none,     'QEMU'
     59target:                         none,    none,     'sparc-rtems4.11'
     60explanations:               none,    none,     '%{_rtscripts}/coverage/Explanations.txt'
     61coverageExtension:            none,    none,     'exe.cov'
     62gcnosFile:                    none,    none,     '%{_rtscripts}/coverage/rtems.gcnos'
     63executableExtension:        none,    none,     'exe'
     64projectName:                none,    none,     'RTEMS 4.11'
  • new file tester/rtems/testing/bsps/leon3-coverage.mc

    diff --git a/tester/rtems/testing/bsps/leon3-coverage.mc b/tester/rtems/testing/bsps/leon3-coverage.mc
    new file mode 100644
    index 0000000..ae25268
    - +  
     1#
     2# RTEMS Tools Project (http://www.rtems.org/)
     3# Copyright 2010-2014 Chris Johns (chrisj@rtems.org)
     4# All rights reserved.
     5#
     6# This file is part of the RTEMS Tools package in 'rtems-tools'.
     7#
     8# Redistribution and use in source and binary forms, with or without
     9# modification, are permitted provided that the following conditions are met:
     10#
     11# 1. Redistributions of source code must retain the above copyright notice,
     12# this list of conditions and the following disclaimer.
     13#
     14# 2. Redistributions in binary form must reproduce the above copyright notice,
     15# this list of conditions and the following disclaimer in the documentation
     16# and/or other materials provided with the distribution.
     17#
     18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     19# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
     22# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28# POSSIBILITY OF SUCH DAMAGE.
     29#
     30
     31#
     32# All paths in defaults must be Unix format. Do not store any Windows format
     33# paths in the defaults.
     34#
     35# Every entry must describe the type of checking a host must pass.
     36#
     37# Records:
     38#  key: type, attribute, value
     39#   type     : none, dir, exe, triplet
     40#   attribute: none, required, optional
     41#   value    : 'single line', '''multi line'''
     42#
     43
     44#
     45# The sparc/leon3 QEMU BSP
     46#
     47
     48[global]
     49bsp:                      none,    none,     'leon3'
     50coverage_supported:           none,        none,           '1'
     51
     52[leon3]
     53leon3:                    none,    none,     '%{_rtscripts}/qemu.cfg'
     54leon3_arch:               none,    none,     'sparc'
     55leon3_opts:               none,    none,     '-M leon3_generic -m 64M "--console=com1;boot;"'
     56
     57[coverage]
     58format:                         none,    none,     'QEMU'
     59target:                         none,    none,     'sparc-rtems4.11'
     60explanations:               none,    none,     '%{_rtscripts}/coverage/Explanations.txt'
     61coverageExtension:            none,    none,     'exe.cov'
     62gcnosFile:                    none,    none,     '%{_rtscripts}/coverage/rtems.gcnos'
     63executableExtension:        none,    none,     'exe'
     64projectName:                none,    none,     'RTEMS 4.11'
  • new file tester/rtems/testing/bsps/pc386.mc

    diff --git a/tester/rtems/testing/bsps/pc386.mc b/tester/rtems/testing/bsps/pc386.mc
    new file mode 100644
    index 0000000..52ed275
    - +  
     1#
     2# RTEMS Tools Project (http://www.rtems.org/)
     3# Copyright 2010-2014 Chris Johns (chrisj@rtems.org)
     4# All rights reserved.
     5#
     6# This file is part of the RTEMS Tools package in 'rtems-tools'.
     7#
     8# Redistribution and use in source and binary forms, with or without
     9# modification, are permitted provided that the following conditions are met:
     10#
     11# 1. Redistributions of source code must retain the above copyright notice,
     12# this list of conditions and the following disclaimer.
     13#
     14# 2. Redistributions in binary form must reproduce the above copyright notice,
     15# this list of conditions and the following disclaimer in the documentation
     16# and/or other materials provided with the distribution.
     17#
     18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     19# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
     22# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28# POSSIBILITY OF SUCH DAMAGE.
     29#
     30
     31#
     32# All paths in defaults must be Unix format. Do not store any Windows format
     33# paths in the defaults.
     34#
     35# Every entry must describe the type of checking a host must pass.
     36#
     37# Records:
     38#  key: type, attribute, value
     39#   type     : none, dir, exe, triplet
     40#   attribute: none, required, optional
     41#   value    : 'single line', '''multi line'''
     42#
     43
     44#
     45# The i386/pc386 QEMU BSP
     46#
     47
     48hda:    none,   dir,    '%{_rtscripts}/coverage/rtems-boot.img'
     49
     50[global]
     51bsp:                      none,    none,     'pc386'
     52coverage_supported:           none,        none,           '1'
     53
     54[pc386]
     55pc386:                    none,    none,     '%{_rtscripts}/qemu.cfg'
     56pc386_arch:               none,    none,     'i386'
     57pc386_opts:               none,    none,     '-m 128 -boot b -hda %{hda} %{qemu_opts_base} -append "--console=com1;boot;"'
     58
     59[coverage]
     60format:                         none,    none,     'QEMU'
     61target:                         none,    none,     'i386-rtems4.11'
     62explanations:               none,    none,     '%{_rtscripts}/coverage/Explanations.txt'
     63coverageExtension:            none,    none,     'exe.cov'
     64gcnosFile:                    none,    none,     '%{_rtscripts}/coverage/rtems.gcnos'
     65executableExtension:        none,    none,     'exe'
     66projectName:                none,    none,     'RTEMS 4.11'
  • new file tester/rtems/testing/coverage.mc

    diff --git a/tester/rtems/testing/coverage.mc b/tester/rtems/testing/coverage.mc
    new file mode 100644
    index 0000000..a336cc0
    - +  
     1#
     2# RTEMS Tools Project (http://www.rtems.org/)
     3# Copyright 2010-2014 Chris Johns (chrisj@rtems.org)
     4# All rights reserved.
     5#
     6# This file is part of the RTEMS Tools package in 'rtems-tools'.
     7#
     8# Redistribution and use in source and binary forms, with or without
     9# modification, are permitted provided that the following conditions are met:
     10#
     11# 1. Redistributions of source code must retain the above copyright notice,
     12# this list of conditions and the following disclaimer.
     13#
     14# 2. Redistributions in binary form must reproduce the above copyright notice,
     15# this list of conditions and the following disclaimer in the documentation
     16# and/or other materials provided with the distribution.
     17#
     18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     19# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     20# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     21# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
     22# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28# POSSIBILITY OF SUCH DAMAGE.
     29#
     30
     31#
     32# All paths in defaults must be Unix format. Do not store any Windows format
     33# paths in the defaults.
     34#
     35# Every entry must describe the type of checking a host must pass.
     36#
     37# Records:
     38#  key: type, attribute, value
     39#   type     : none, dir, exe, triplet
     40#   attribute: none, required, optional
     41#   value    : 'single line', '''multi line'''
     42#
     43
     44#
     45# Global defaults
     46#
     47[global]
     48__covoar:                       exe,    required, 'covoar'
  • new file tester/rtems/testing/coverage/Categories.txt

    diff --git a/tester/rtems/testing/coverage/Categories.txt b/tester/rtems/testing/coverage/Categories.txt
    new file mode 100644
    index 0000000..e19a456
    - +  
     1This is the list of Explanation Categories used when analyzing RTEMS
     2Coverage report.  By using standard categories, the table filter on
     3the web site works better.
     4
     5Simple Test Case
     6
     7Hard Test Tase
     8
     9Uncalled Routine
     10
     11Interrupt Critical Section
     12
     13Simple Error Case
     14
     15Hard Error Case
     16
     17Allocation Error
     18
     19Bharath Suri
  • new file tester/rtems/testing/coverage/Explanations.txt

    diff --git a/tester/rtems/testing/coverage/Explanations.txt b/tester/rtems/testing/coverage/Explanations.txt
    new file mode 100644
    index 0000000..a5917f6
    - +  
     1schedulerpriorityyield.c:47
     2Simple Test Case
     3Branch Never Taken
     4New test where there is more than one thread at a priority with the
     5executing thread being non-preemptive.  Create a higher priority thread
     6and then yield.
     7
     8   init task at priority 2, non-preemptive
     9   create task at priority 2
     10   create task at priority 1
     11   yield
     12+++
     13
     14schedulerpriorityyield.c:51
     15Simple Test Case
     16Branch Always Taken
     17New test where only one thread at a priority (non-preemptive), create a
     18thread at higher priority, then yield.
     19
     20   init task at priority 2, non-preemptive
     21   create task at priority 1
     22   yield
     23+++
     24
     25schedulerpriorityyield.c:52
     26Simple Test Case
     27Not Executed
     28Same test case as schedulerpriorityyield.c:51
     29+++
     30
     31coremsg.c:86
     32Simple Test Case
     33We need to request enough messages of a certain size that the math
     34overflows to less than a single message.
     35+++
  • new file tester/rtems/testing/coverage/SPARC-Annul-Slot-Explanation.txt

    diff --git a/tester/rtems/testing/coverage/SPARC-Annul-Slot-Explanation.txt b/tester/rtems/testing/coverage/SPARC-Annul-Slot-Explanation.txt
    new file mode 100644
    index 0000000..ef740d3
    - +  
     1The SPARC assembly is often hard to understand because a single
     2instruction will show up as not executed.  The instructions before
     3and after it will be marked as executed.  The instruction before
     4the one not executed should be a "bxx,a" instruction which means
     5that the instruction following the branch instruction is executed
     6ONLY if the branch is taken.  Otherwise it is "annulled" or skipped.
     7
     8So when you see these cases, it means the branch was NOT taken.
     9
     10===================================================================
     11Subject: <offlist> annul slot explanation
     12From: Jiri Gaisler <jiri@gaisler.com>
     13Date: Wed, 3 Jun 2009 14:57:48 -0500
     14To: Joel Sherrill <Joel.Sherrill@OARcorp.com>
     15
     16
     17Joel Sherrill wrote:
     18> > Hi,
     19> >
     20> > I am trying to look at more coverage cases and
     21> > wanted to make sure I am reading things correctly.
     22> >
     23> > The code in question is:
     24> >
     25> >
     26> >      if ( the_thread->current_priority > interested_priority )
     27> > 200fd00:    d8 00 e0 14     ld  [ %g3 + 0x14 ], %o4
     28> > 200fd04:    80 a3 00 04     cmp  %o4, %g4
     29> > 200fd08:    38 80 00 1c     bgu,a   200fd78 <killinfo+0x224>
     30> > 200fd0c:    98 10 00 04     mov  %g4,
     31> > %o4                                            <== NOT EXECUTED
     32> >
     33> >      /*
     34> >       *  If this thread is not interested, then go on to the next thread.
     35> >       */
     36> >
     37> >      api = the_thread->API_Extensions[ THREAD_API_POSIX ];
     38> > 200fd10:    d4 00 e1 6c     ld  [ %g3 + 0x16c ], %o2
     39> >
     40> > Am I correct in interpreting this as meaning 0x200fd0c
     41> > is not executed because the bgu,a is never taken. And it
     42> > is not executed as part of falling through.
     43
     44Yes, this is correct. The branch delay slot is only executed
     45when the branch is taken.
     46
     47Jiri.
     48
     49> >
     50> > So in this case we need a test where the "if" condition
     51> > is true if I am reading things correctly.
     52> >
     53> > Thanks.  There are a number of these 4 byte cases which
     54> > are probably easy to hit if I read the code correctly.
     55> >
     56> >
  • new file tester/rtems/testing/coverage/style.css

    diff --git a/tester/rtems/testing/coverage/rtems-boot.img b/tester/rtems/testing/coverage/rtems-boot.img
    new file mode 100644
    index 0000000..3995316
    Binary files /dev/null and b/tester/rtems/testing/coverage/rtems-boot.img differ
    diff --git a/tester/rtems/testing/coverage/style.css b/tester/rtems/testing/coverage/style.css
    new file mode 100644
    index 0000000..c715518
    - +  
     1body {
     2    background: rgb(253,253,253);
     3    color: rgb(0,0,0);
     4    font-family: helvetica, sans-serif;
     5    font-size: 1em;
     6    line-height: 1.4;
     7    margin: 5px, 5px, 5px, 5px;
     8    padding: 0;
     9}
     10
     11a:link {
     12    color: rgb(180, 50, 50);
     13    font-family: helvetica, sans-serif;
     14    font-size: 1.0em;
     15}
     16
     17a:visited {
     18    color: purple;
     19    font-family: helvetica, sans-serif;
     20    font-size: 1.0em;
     21}
     22
     23a:hover {
     24    color: rgb(0, 0, 0);
     25    font-family: helvetica, sans-serif;
     26    font-size: 1.0em;
     27}
     28
     29a:active {
     30    color: red;
     31    font-family: helvetica, sans-serif;
     32    font-size: 1.0em;
     33}
     34
     35.heading {
     36    background: rgb(250,250,250);
     37    background-image: url("http://www.rtems.org/logos/rtems_logo.jpg");
     38    background-repeat: no-repeat;
     39    color: rgb(55,55,55);
     40    font-size: 1.5em;
     41    height: 140px;
     42    padding-top: 20px;
     43    padding-left: 300px;
     44}
     45
     46.heading-title {
     47    text-align:  center;
     48    color: rgb(0,0,0);
     49    font-size: 0.9em;
     50    font-weight: bold;
     51    padding-top: 5px;
     52    padding-left: 0px;
     53    text-align:  center;
     54    width: 100%;
     55}
     56
     57.datetime {
     58    color: rgb(55,55,55);
     59    font-size: 0.8em;
     60    padding-top: 5px;
     61    padding-left: 0px;
     62    text-align:  center;
     63    width: 100%;
     64}
     65
     66.info {
     67    color: rgb(55,55,55);
     68    font-size: 0.6em;
     69    padding-top: 5px;
     70    padding-left: 00px;
     71    text-align:  center;
     72    width: 100%;
     73}
     74
     75.stats-table {
     76    background: rgb(225,225,225);
     77    font-size: 0.9em;
     78    border: 1px solid rgb(200, 200, 200);
     79    padding: 0;
     80    margin-top: 3px;
     81    margin-left: 10px;
     82    width: 70%;
     83}
     84
     85.stats-table-target {
     86    background: rgb(243,243,243);
     87    font-size: 1.2em;
     88    padding-left: 10px;
     89    text-align: left;
     90}
     91
     92.stats-target-results {
     93    background: rgb(243,243,243);
     94    font-size: 0.9em;
     95    text-align: right;
     96    padding-right: 10px;
     97}
     98
     99.stats-target-good {
     100    background: rgb(30,230,30);
     101    font-size: 0.9em;
     102    text-align: right;
     103    padding-right: 10px;
     104}
     105
     106.stats-target-good {
     107    background: rgb(50,180,50);
     108    color: rgb(230,230,230);
     109    font-size: 0.9em;
     110    text-align: center;
     111    padding-right: 10px;
     112}
     113
     114.stats-target-bad {
     115    background: rgb(180,50,50);
     116    color: rgb(230,230,230);
     117    font-size: 0.9em;
     118    text-align: center;
     119    padding-right: 10px;
     120}
     121
     122.stats-table-top {
     123    background: rgb(243,243,243);
     124    color: rgb(0,0,0);
     125    font-size: 0.9em;
     126    padding-left: 2px;
     127}
     128
     129.stats-table-row {
     130    background: rgb(253,253,253);
     131    font-size: 0.9em;
     132    padding: 1px;
     133    text-align: right;
     134}
     135
     136.error-table {
     137    font-size: 0.9em;
     138    border: 1px solid rgb(200, 200, 200);
     139    padding: 0;
     140    margin-left: 10px;
     141    width: 96%;
     142}
     143
     144.error-table-top {
     145    background: rgb(225,225,225);
     146    color: rgb(0,0,0);
     147    font-size: 0.9em;
     148    padding-left: 2px;
     149}
     150
     151.error-table-on {
     152    background: rgb(225,225,225);
     153    font-size: 0.9em;
     154    padding-left: 2px;
     155}
     156
     157.error-table-off {
     158    background: rgb(253,253,253);
     159    font-size: 0.9em;
     160    padding-left: 2px;
     161}
     162
     163.error-table-dups {
     164    text-align: right;
     165    padding-right: 2px;
     166}
     167
     168.error-table-error {
     169    background: rgb(255,150,150);
     170    font-size: 0.9em;
     171    padding-left: 2px;
     172}
     173
     174.error-table-warning {
     175    font-size: 0.9em;
     176    padding-left: 2px;
     177}
     178
     179.navbar {
     180    margin-left: auto;
     181    margin-right: auto;
     182    margin-top: 10px;
     183    width: 40%;
     184}
     185th.table-sortable {
     186  background-image:url("unsorted.gif");
     187  cursor: pointer;
     188  background-position: center left;
     189  background-repeat: no-repeat;
     190  padding-left: 15px;
     191}
     192th.table-sorted-asc {
     193  background-image:url("descending.gif");
     194}
     195th.table-sorted-desc {
     196  background-image:url("ascending.gif");
     197}
     198 No newline at end of file
  • new file tester/rtems/testing/coverage/symbolSets.config

    diff --git a/tester/rtems/testing/coverage/symbolSets.config b/tester/rtems/testing/coverage/symbolSets.config
    new file mode 100644
    index 0000000..9ec44d7
    - +  
     1symbolset:
     2        name=score
     3        lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/score/libscore.a
  • new file tester/rtems/testing/coverage/symbolSets_pc386.config

    diff --git a/tester/rtems/testing/coverage/symbolSets_pc386.config b/tester/rtems/testing/coverage/symbolSets_pc386.config
    new file mode 100644
    index 0000000..99246c4
    - +  
     1symbolset:
     2        name=core
     3        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/score/libscore.a
     4        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/sapi/libsapi.a
     5        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/rtems/librtems.a
     6symbolset:
     7        name=developmental
     8        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/score/libscore.a
     9        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/sapi/libsapi.a
     10        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/rtems/librtems.a
     11        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/librfs.a
     12        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdosfs.a
     13        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdevfs.a
     14        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libimfs.a
     15        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libcsupport/libcsupport.a
     16        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libstackchk.a
     17        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libfsmount.a
     18        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libbspcmdline.a
     19        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libcpuuse.a
     20        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libfsmount.a
     21        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libstringto.a
     22        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libdevnull.a
     23        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libdumpbuf.a
     24        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libblock/libblock.a
     25symbolset:
     26        name=score
     27        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/score/libscore.a
     28symbolset:
     29        name=sapi
     30        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/sapi/libsapi.a
     31symbolset:
     32        name=rtems
     33        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/rtems/librtems.a
     34symbolset:
     35        name=filesystems
     36        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdevfs.a
     37        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdosfs.a
     38        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libimfs.a
     39        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/librfs.a
     40        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libjffs2.a
     41        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdefaultfs.a
     42symbolset:
     43        name=libmisc
     44        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libstackchk.a
     45        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libfsmount.a
     46        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libbspcmdline.a
     47        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libcpuuse.a
     48        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libfsmount.a
     49        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libstringto.a
     50        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libdevnull.a
     51        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libdumpbuf.a
     52symbolset:
     53        name=libcsupport
     54        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libcsupport/libcsupport.a
     55symbolset:
     56        name=libblock
     57        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libblock/libblock.a
     58symbolset:
     59        name=posix
     60        lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/posix/libposix.a
  • tester/rtems/testing/gdb.cfg

    diff --git a/tester/rtems/testing/gdb.cfg b/tester/rtems/testing/gdb.cfg
    index b680dba..f77e2d5 100644
    a b  
    5454%define gdb_cmd %{rtems_tools}/%{bsp_arch}-rtems%{rtems_version}-gdb
    5555
    5656#
     57# Coverage analysis
     58#
     59%if %{defined _coverage}
     60 %error "Coverage analysis unsupported"
     61%endif
     62
     63#
    5764# GDB, pass the GDB command, the text executable and the macro label
    5865# for the script.
    5966#
  • tester/rtems/testing/qemu.cfg

    diff --git a/tester/rtems/testing/qemu.cfg b/tester/rtems/testing/qemu.cfg
    index a3310bc..75c5fa9 100644
    a b  
    5151#
    5252# Qemu common option patterns.
    5353#
    54 %define qemu_opts_base   -no-reboot -monitor none -serial stdio -nographic
     54%define qemu_opts_base   -no-reboot -monitor null -serial stdio -nographic
    5555%define qemu_opts_no_net -net none
    5656#
    5757# Qemu executable
     
    6060%define qemu_opts %{bsp_opts}
    6161
    6262#
     63# Coverage analysis
     64#
     65%define coverage_arg %{nil}
     66%if %{defined _coverage}
     67
     68 %if %{coverage_supported}
     69   %define coverage_arg -exec-trace coverage/%{test_executable_name}.cov
     70 %else
     71  %error "Coverage analysis unsupported for %{bsp}"
     72 %endif
     73
     74%endif
     75
     76#
    6377# Executable
    6478#
    65 %execute %{qemu_cmd} %{qemu_opts} -kernel %{test_executable}
     79%execute %{qemu_cmd} %{qemu_opts} -kernel %{test_executable} %{coverage_arg}