/Cutlery

pWCET生成工具,采用AFL分段式生成测试用例

Primary LanguageC

Cutlery

This repository contains code developed under:

  • Ubuntu 22.04 LTS
  • kernel version 5.19.0-x

If your kernel version does not match or you want to downgrade to 5.19.0-x kernel, please refer to this link.

Environment

  • Python 3.10.12

Installation Instructions

Before running the project, ensure that you have the necessary dependencies installed. Follow the steps below:

  1. Update package lists:
sudo apt update
  1. Install Linux Tools:

Install Linux tools corresponding to the current kernel version:

sudo apt-get install linux-tools-common -y
sudo apt-get install linux-tools-$(uname -r) -y
sudo apt-get install linux-cloud-tools-$(uname -r) -y
sudo apt-get install linux-tools-generic -y
sudo apt-get install linux-cloud-tools-generic -y
  1. Install Development Tools:

Install various development tools and libraries:

sudo apt-get install -y cargo python2 cmake g++ git bison libz3-dev ninja-build python3-pip zlib1g-dev
sudo apt-get install libtool-bin libgtk2.0-dev -y
  1. Install Additional Packages:

Install additional packages such as jq and Python libraries:

sudo apt install jq gcovr python3-pip -y
  1. Install Python Libraries:

Install required Python libraries using pip3:

pip3 install matplotlib lit angr angr-utils gcovr chardet pyvinecopulib statsmodels
  1. Install AFL (American Fuzzy Lop):

Ensure you have AFL (American Fuzzy Lop) installed by following these steps:

  • Change directory to the "AFL" directory within your project directory.
  • Execute the following command with administrator privileges to install AFL:
cd path/to/your/project/AFL
# option: compile AFL with qemu mode
cd qemu_mode
./build_qemu_support.sh
cd ..
# install AFL
sudo make install

These commands do the following:

  • sudo apt update: Updates package lists to ensure you have the latest versions.
  • Linux Tools installation: Installs Linux tools for the current kernel version and generic Linux tools.
  • Development Tools installation: Installs various development tools and libraries required for building and compiling.
  • Additional Packages installation: Installs jq, a command-line JSON processor, and Python3-pip.
  • Python Libraries installation: Installs Matplotlib, Lit, Angr, Angr Utils, and gcovr using pip3 for Python dependencies.
  • AFL Installation: Installs AFL by compiling and installing it from source. Ensure to change directory to the AFL directory within your project and execute make install with administrator privileges.

Ensure all dependencies are correctly installed before running the project.