Skip to content

Commit a9c9f88

Browse files
committed
btrfs-progs: ci: enable thread sanitizer for sanitizer workflow
The thread sanitizer finds race conditions and in the past did find some bugs. There's not much threaded code, it's namely the progress tracking in btrfs-convert so the coverage is slightly redundant. Add it just in case. Signed-off-by: David Sterba <dsterba@suse.com>
1 parent e72cb06 commit a9c9f88

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/ci-sanitize.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,45 @@ jobs:
9595
name: test-results
9696
path: "tests/*-results.txt"
9797
if-no-files-found: ignore
98+
build-tsan:
99+
runs-on: ubuntu-24.04
100+
steps:
101+
- uses: actions/checkout@v4
102+
- run: uname -a
103+
- run: sudo modprobe btrfs
104+
- run: sudo apt-get update -qqq
105+
- 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
106+
- name: Configure
107+
run: ./autogen.sh && ./configure --disable-documentation
108+
- name: Make
109+
run: make V=1 D=tsan
110+
- name: Tests cli
111+
run: sudo make D=tsan TEST_LOG=dump test-cli
112+
- name: Tests mkfs
113+
run: sudo make D=tsan TEST_LOG=dump test-mkfs
114+
- name: Tests check
115+
run: sudo make D=tsan TEST_LOG=dump test-check
116+
- name: Tests check (lowmem)
117+
run: sudo make D=tsan TEST_LOG=dump test-check-lowmem
118+
- name: Tests misc
119+
run: sudo make D=tsan TEST_LOG=dump test-misc
120+
- name: Tests fuzz
121+
run: sudo make D=tsan TEST_LOG=dump test-fuzz
122+
- name: Tests convert
123+
run: sudo make D=tsan TEST_LOG=dump test-convert
124+
- name: Test internal APIs
125+
run: make D=tsan test-api
126+
# Temporary: the library or python bindings are not linked with ASAN and test cannot be run
127+
# - name: Libbtrfsutil test
128+
# run: make D=tsan test-libbtrfsutil
129+
# - name: Libbtrfs build test
130+
# run: make D=tsan library-test
131+
- name: Tests hash (correctness)
132+
run: make D=tsan hash-vectest && ./hash-vectest
133+
- name: Save logs on failure
134+
if: ${{ failure() }}
135+
uses: actions/upload-artifact@v4
136+
with:
137+
name: test-results
138+
path: "tests/*-results.txt"
139+
if-no-files-found: ignore

0 commit comments

Comments
 (0)