2024-05-30 17:02:15 +00:00
|
|
|
# Run tests with sanitizers enabled
|
|
|
|
# - UBSAN - undefined behaviour (default)
|
|
|
|
# - ASAN - memory leaks etc
|
2024-07-31 16:47:48 +00:00
|
|
|
# - TSAN - multi-threading issues
|
2024-05-30 17:02:15 +00:00
|
|
|
|
|
|
|
name: Sanitizer checks
|
|
|
|
run-name: Sanitizer checks
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2024-07-31 16:47:48 +00:00
|
|
|
- devel
|
2024-05-30 17:02:15 +00:00
|
|
|
- sanitize-test
|
2024-06-06 23:12:45 +00:00
|
|
|
- master
|
2024-05-30 17:02:15 +00:00
|
|
|
jobs:
|
|
|
|
build-ubsan:
|
2024-06-13 00:58:25 +00:00
|
|
|
runs-on: ubuntu-24.04
|
2024-05-30 17:02:15 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- run: uname -a
|
|
|
|
- run: sudo modprobe btrfs
|
2024-07-17 18:16:26 +00:00
|
|
|
- run: sudo apt-get update -qqq
|
2024-05-30 17:02:15 +00:00
|
|
|
- run: sudo apt-get install -y pkg-config gcc liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev python3-sphinx libaio-dev liburing-dev attr jq
|
|
|
|
- name: Configure
|
|
|
|
run: ./autogen.sh && ./configure --disable-documentation
|
|
|
|
- name: Make
|
|
|
|
run: make V=1 D=ubsan
|
|
|
|
- name: Tests cli
|
|
|
|
run: sudo make D=ubsan TEST_LOG=dump test-cli
|
|
|
|
- name: Tests mkfs
|
|
|
|
run: sudo make D=ubsan TEST_LOG=dump test-mkfs
|
|
|
|
- name: Tests check
|
|
|
|
run: sudo make D=ubsan TEST_LOG=dump test-check
|
|
|
|
- name: Tests check (lowmem)
|
|
|
|
run: sudo make D=ubsan TEST_LOG=dump test-check-lowmem
|
|
|
|
- name: Tests misc
|
|
|
|
run: sudo make D=ubsan TEST_LOG=dump test-misc
|
|
|
|
- name: Tests fuzz
|
|
|
|
run: sudo make D=ubsan TEST_LOG=dump test-fuzz
|
|
|
|
- name: Tests convert
|
|
|
|
run: sudo make D=ubsan TEST_LOG=dump test-convert
|
|
|
|
- name: Test internal APIs
|
|
|
|
run: make D=ubsan test-api
|
|
|
|
- name: Libbtrfsutil test
|
|
|
|
run: make D=ubsan test-libbtrfsutil
|
|
|
|
- name: Libbtrfs build test
|
|
|
|
run: make D=ubsan library-test
|
|
|
|
- name: Tests hash (correctness)
|
|
|
|
run: make D=ubsan hash-vectest && ./hash-vectest
|
|
|
|
- name: Save logs on failure
|
|
|
|
if: ${{ failure() }}
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: test-results
|
|
|
|
path: "tests/*-results.txt"
|
|
|
|
if-no-files-found: ignore
|
|
|
|
build-asan:
|
2024-06-13 00:58:25 +00:00
|
|
|
runs-on: ubuntu-24.04
|
2024-05-30 17:02:15 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- run: uname -a
|
|
|
|
- run: sudo modprobe btrfs
|
2024-07-17 18:16:26 +00:00
|
|
|
- run: sudo apt-get update -qqq
|
2024-05-30 17:02:15 +00:00
|
|
|
- run: sudo apt-get install -y pkg-config gcc liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev python3-sphinx libaio-dev liburing-dev attr jq
|
|
|
|
- name: Configure
|
|
|
|
run: ./autogen.sh && ./configure --disable-documentation
|
|
|
|
- name: Make
|
|
|
|
run: make V=1 D=asan
|
|
|
|
- name: Tests cli
|
|
|
|
run: sudo make D=asan TEST_LOG=dump test-cli
|
|
|
|
- name: Tests mkfs
|
|
|
|
run: sudo make D=asan TEST_LOG=dump test-mkfs
|
|
|
|
- name: Tests check
|
|
|
|
run: sudo make D=asan TEST_LOG=dump test-check
|
|
|
|
- name: Tests check (lowmem)
|
|
|
|
run: sudo make D=asan TEST_LOG=dump test-check-lowmem
|
|
|
|
- name: Tests misc
|
|
|
|
run: sudo make D=asan TEST_LOG=dump test-misc
|
|
|
|
- name: Tests fuzz
|
|
|
|
run: sudo make D=asan TEST_LOG=dump test-fuzz
|
|
|
|
- name: Tests convert
|
|
|
|
run: sudo make D=asan TEST_LOG=dump test-convert
|
|
|
|
- name: Test internal APIs
|
|
|
|
run: make D=asan test-api
|
2024-06-05 21:29:18 +00:00
|
|
|
# Temporary: the library or python bindings are not linked with ASAN and test cannot be run
|
|
|
|
# - name: Libbtrfsutil test
|
|
|
|
# run: make D=asan test-libbtrfsutil
|
|
|
|
# - name: Libbtrfs build test
|
|
|
|
# run: make D=asan library-test
|
2024-05-30 17:02:15 +00:00
|
|
|
- name: Tests hash (correctness)
|
|
|
|
run: make D=asan hash-vectest && ./hash-vectest
|
|
|
|
- name: Save logs on failure
|
|
|
|
if: ${{ failure() }}
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: test-results
|
|
|
|
path: "tests/*-results.txt"
|
|
|
|
if-no-files-found: ignore
|
2024-07-29 23:58:00 +00:00
|
|
|
build-tsan:
|
|
|
|
runs-on: ubuntu-24.04
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- run: uname -a
|
|
|
|
- run: sudo modprobe btrfs
|
|
|
|
- run: sudo apt-get update -qqq
|
|
|
|
- run: sudo apt-get install -y pkg-config gcc liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev python3-sphinx libaio-dev liburing-dev attr jq
|
|
|
|
- name: Configure
|
|
|
|
run: ./autogen.sh && ./configure --disable-documentation
|
|
|
|
- name: Make
|
|
|
|
run: make V=1 D=tsan
|
|
|
|
- name: Tests cli
|
|
|
|
run: sudo make D=tsan TEST_LOG=dump test-cli
|
|
|
|
- name: Tests mkfs
|
|
|
|
run: sudo make D=tsan TEST_LOG=dump test-mkfs
|
|
|
|
- name: Tests check
|
|
|
|
run: sudo make D=tsan TEST_LOG=dump test-check
|
|
|
|
- name: Tests check (lowmem)
|
|
|
|
run: sudo make D=tsan TEST_LOG=dump test-check-lowmem
|
|
|
|
- name: Tests misc
|
|
|
|
run: sudo make D=tsan TEST_LOG=dump test-misc
|
|
|
|
- name: Tests fuzz
|
|
|
|
run: sudo make D=tsan TEST_LOG=dump test-fuzz
|
|
|
|
- name: Tests convert
|
|
|
|
run: sudo make D=tsan TEST_LOG=dump test-convert
|
|
|
|
- name: Test internal APIs
|
|
|
|
run: make D=tsan test-api
|
2024-07-31 16:47:48 +00:00
|
|
|
# Temporary: the library or python bindings are not linked with TSAN and test cannot be run
|
2024-07-29 23:58:00 +00:00
|
|
|
# - name: Libbtrfsutil test
|
|
|
|
# run: make D=tsan test-libbtrfsutil
|
|
|
|
# - name: Libbtrfs build test
|
|
|
|
# run: make D=tsan library-test
|
|
|
|
- name: Tests hash (correctness)
|
|
|
|
run: make D=tsan hash-vectest && ./hash-vectest
|
|
|
|
- name: Save logs on failure
|
|
|
|
if: ${{ failure() }}
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: test-results
|
|
|
|
path: "tests/*-results.txt"
|
|
|
|
if-no-files-found: ignore
|