-
Notifications
You must be signed in to change notification settings - Fork 245
139 lines (138 loc) · 5.2 KB
/
sanitize.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# Run tests with sanitizers enabled
# - UBSAN - undefined behaviour (default)
# - ASAN - memory leaks etc
# - TSAN - multi-threading issues
name: Sanitizer checks
run-name: Sanitizer checks
on:
push:
branches:
- devel
- sanitize-test
- master
jobs:
build-ubsan:
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=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:
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=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
# 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
- 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
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
# Temporary: the library or python bindings are not linked with TSAN and test cannot be run
# - 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