Coder Social home page Coder Social logo

ulrichthomasgabor / aofit Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 119 KB

This project allows for the injection of errors at interfaces according to a configurable error model given as JSON file. It utilizes AspectC++ to modify the behavior of a C++ application, without requiring changes to its source code. This approach is especially dedicated to inject errors into software running on embedded systems.

License: The Unlicense

Makefile 0.98% Python 57.82% C++ 4.72% Shell 30.24% XQuery 6.24%

aofit's Introduction

Getting started

This project allows for the injection of errors at interfaces according to a configurable error model given as JSON file. It utilizes AspectC++ to modify the behavior of a C++ application, without requiring changes to its source code. This approach is especially dedicated to inject errors into software running on embedded systems.

Prerequisites

  • Python 3
  • AspectC++ newer than version 2.2, which is the daily build at the moment

Integration test

You can run make test to run all integration tests.

Usage

The scripts generate_aspect.py, generate_experiments.py and run_experiments.py must be run in that order. Each script expects a campaign configuration in JSON format as parameter.

The generate_aspect.py script generates an aspect based on the given JSON file. The generate_experiments.py script builds the software-under-test with the previously built aspect, runs it with the specified workload to obtain some information required to setup the experiments and finally creates a new directory for each experiment containing a configuration file. The run_experiments.py script iterates over all directories, starts the software-under-test and configures the global variables introduced by the aspect according to the configuration file created in the previous step via GDB or another mechanism.

See one of the integration tests for more information, for example integration-tests/aspect_ordering_ec.sh.

Further Information

Validate JSON files

In the directory schemas there exist multiple schema definitions to validate JSON files. Sorrowfully, this does not work at the moment, as we were not able to find a validator, which implements an up-to-date draft of the specification including all our used features of the specification.

The most promising tool is ajv.

To use ajv

  1. install Node.js,
  2. execute npm install -g ajv-cli
  3. and validate a file e.g. by executing ajv -s schemas/posix_interface.schema -d schema_examples/posix_fputc.json.

Validate all example JSON files

Execute ./scripts/validate_all_campaign_schema_examples.sh and ./scripts/validate_all_interface_schema_examples.sh. The files do not pass at the moment for the mentioned reasons.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.