mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 18:11:00 +03:00
63652e1546
`configure` now accepts `--enable-asan` and `--enable-ubsan` switches which results in passing `-fsanitize=address` and `-fsanitize=undefined`, respectively, to the compiler. Those flags are enabled in GitHub workflows for ZTS and zloop. Errors reported by both instrumentations are corrected, except for: - Memory leak reporting is (temporarily) suppressed. The cost of fixing them is relatively high compared to the gains. - Checksum computing functions in `module/zcommon/zfs_fletcher*` have UBSan errors suppressed. It is completely impractical to enforce 64-byte payload alignment there due to performance impact. - There's no ASan heap poisoning in `module/zstd/lib/zstd.c`. A custom memory allocator is used there rendering that measure unfeasible. - Memory leaks detection has to be suppressed for `cmd/zvol_id`. `zvol_id` is run by udev with the help of `ptrace(2)`. Tracing is incompatible with memory leaks detection. Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: szubersk <szuberskidamian@gmail.com> Closes #12928
67 lines
1.9 KiB
YAML
67 lines
1.9 KiB
YAML
name: zloop
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
tests:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
TEST_DIR: /var/tmp/zloop
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install --yes -qq build-essential autoconf libtool gdb \
|
|
git alien fakeroot \
|
|
zlib1g-dev uuid-dev libblkid-dev libselinux-dev \
|
|
xfslibs-dev libattr1-dev libacl1-dev libudev-dev libdevmapper-dev \
|
|
libssl-dev libffi-dev libaio-dev libelf-dev libmount-dev \
|
|
libpam0g-dev \
|
|
python3 python3-dev python3-setuptools python3-cffi python3-packaging
|
|
- name: Autogen.sh
|
|
run: |
|
|
sh autogen.sh
|
|
- name: Configure
|
|
run: |
|
|
./configure --enable-debug --enable-debuginfo --enable-asan --enable-ubsan
|
|
- name: Make
|
|
run: |
|
|
make --no-print-directory -s pkg-utils pkg-kmod
|
|
- name: Install
|
|
run: |
|
|
sudo dpkg -i *.deb
|
|
# Update order of directories to search for modules, otherwise
|
|
# Ubuntu will load kernel-shipped ones.
|
|
sudo sed -i.bak 's/updates/extra updates/' /etc/depmod.d/ubuntu.conf
|
|
sudo depmod
|
|
sudo modprobe zfs
|
|
- name: Tests
|
|
run: |
|
|
sudo mkdir -p $TEST_DIR
|
|
# run for 20 minutes to have a total runner time of 30 minutes
|
|
sudo /usr/share/zfs/zloop.sh -t 1200 -l -m1 -- -T 120 -P 60
|
|
- name: Prepare artifacts
|
|
if: failure()
|
|
run: |
|
|
sudo chmod +r -R $TEST_DIR/
|
|
- uses: actions/upload-artifact@v2
|
|
if: failure()
|
|
with:
|
|
name: Logs
|
|
path: |
|
|
/var/tmp/zloop/*/
|
|
!/var/tmp/zloop/*/vdev/
|
|
if-no-files-found: ignore
|
|
- uses: actions/upload-artifact@v2
|
|
if: failure()
|
|
with:
|
|
name: Pool files
|
|
path: |
|
|
/var/tmp/zloop/*/vdev/
|
|
if-no-files-found: ignore
|