Code Monkey home page Code Monkey logo

checkedc-libc-test's Introduction

About

This is a version of libc-test meant to test the musl C library which has been converted to Checked C. The sources here have been mirrored from this repo. This version of libc-test is meant to compile with the checkedc-clang compiler. It is also meant to link against a pre-built compiler-rt downloaded from llvm.org.

Usage

Before building checkedc-libc-test make sure you have built checkedc-musl. Also make sure that you have set the MUSL_PATH environment variable as documented here.

Set up compiler-rt

libc-test needs compiler-rt for the runtime libraries. We download the 10.0 version of the pre-built compiler-rt for Ubuntu from llvm.org.

export RT_PATH=</some/dir>
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz 
tar -xvf clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz -C $RT_PATH --strip 1

Build libc-test

Note: Make sure the environment variables MUSL_PATH and RT_PATH are set.

export PATH=</path/to/checkedc-clang/bin>
git clone https://github.com/microsoft/checkedc-libc-test.git
cd checkedc-libc-test
make clean && make -j32 2>&1 | tee log

Results of libc-test

After building and running libc-test check if any errors have occurred. There should be 0 errors found in the log file. grep error: log | wc -l

Next, check what tests have failed, if any. grep ^FAIL log | wc -l

Note: At the time of writing this README, there were 62 known failures in libc-test.

To check if an error in your musl would produce errors in libc-test, you can do the following:

  • Add an error to your musl sources (like in src/string/strchr.c)
  • Rebuild musl
  • Rebuild libc-test
  • grep ^FAIL log | wc -l

checkedc-libc-test's People

Contributors

amonakov avatar dennis95 avatar dopelsunce avatar maskray avatar microsoft-github-policy-service[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

checkedc-libc-test's Issues

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.