Commit Graph

9 Commits

Author SHA1 Message Date
Frantisek Sumsal eed6393d14 ci: build both w/ and w/o sanitizers on GH Actions 2021-02-01 12:00:30 +01:00
Frantisek Sumsal b17a386004 ci: code cleanup 2021-02-01 12:00:30 +01:00
Frantisek Sumsal 81edf9f0da ci: deal with uninstrumented binaries using instrumented libs
All `eject` tests were failing under ASan, since they call /bin/mount,
which is uninstrumented, but it picks up the instrumented `libblkid`
library, causing ASan to complain:

gcc:
ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.
eject: unmount of `/home/runner/work/util-linux/util-linux/tests/output/eject/umount-by-disk-mounted-mnt' failed

clang:
/bin/umount: symbol lookup error: /home/runner/work/util-linux/util-linux/.libs/libblkid.so.1: undefined symbol: __sancov_lowest_stack
eject: unmount of `/home/runner/work/util-linux/util-linux/tests/output/eject/umount-by-disk-mounted-mnt' failed

Subsequently, all tests which require the `scsi_debug` module get skipped,
since it's still in use due to the failed umount:

fdisk: align 512/4K                   ... SKIPPED (cannot remove scsi_debug module (rmmod))
fdisk: align 512/4K +alignment_offset ... SKIPPED (cannot remove scsi_debug module (rmmod))
fdisk: align 512/4K +MD               ... SKIPPED (cannot remove scsi_debug module (rmmod))

In case of gcc this can be easily resolved by setting $LD_PRELOAD to the
respective ASan library. clang makes this a bit more difficult, since it
compiles the ASan library statically, so firstly we need to force dynamic
linking (via -shared-asan), and then add the runtime DSO path to the
linker cache, since it's in a non-standard path.
2021-02-01 12:00:30 +01:00
Frantisek Sumsal 0388289e3a ci: use the correct compiler version 2021-02-01 11:54:31 +01:00
Karel Zak bf32069382 github: make sure compiler is defined
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-01-26 12:39:22 +01:00
Karel Zak 025c43dfe1 github: export CC and CXX
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-01-26 11:56:33 +01:00
Karel Zak 8b6019e65a github: remove distcheck
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-01-26 09:44:44 +01:00
Karel Zak 830a871e16 github: cleanup cibuild.sh
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-01-25 17:32:17 +01:00
Karel Zak 84cccd3eb5 github: add build workflow
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-01-25 16:54:38 +01:00