Skip to content

Commit

Permalink
Restore raft testing on assorted filesystems
Browse files Browse the repository at this point in the history
Signed-off-by: Cole Miller <cole.miller@canonical.com>
  • Loading branch information
cole-miller committed Apr 29, 2024
1 parent b5c4de3 commit 06230ec
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ jobs:
- name: Set up dependencies
run: |
sudo apt update
sudo apt install -y lcov libsqlite3-dev liblz4-dev libuv1-dev
sudo apt install -y libsqlite3-dev liblz4-dev libuv1-dev \
linux-libc-dev btrfs-progs xfsprogs zfsutils-linux \
lcov
- name: Build dqlite
env:
Expand All @@ -47,7 +49,10 @@ jobs:
CC: ${{ matrix.compiler }}
LIBDQLITE_TRACE: 1
run: |
./test/raft/lib/fs.sh setup
export $(test/raft/lib/fs.sh detect)
make check || (cat ./test-suite.log && false)
./test/raft/lib/fs.sh teardown
- name: Coverage
env:
Expand Down
8 changes: 8 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ AC_CHECK_HEADERS([linux/io_uring.h linux/aio_abi.h])
# Checks for library functions and definitions.
AC_CHECK_DECLS(RWF_NOWAIT, [], [AC_MSG_ERROR(Linux kernel >= 4.14 required.)], [#include <linux/aio_abi.h>])

# Check if zfs >= 0.8.0 is available (for direct I/O support).
AC_CHECK_PROG(have_zfs, zfs, yes)
AS_IF([test x"$have_zfs" = x"yes"],
[AX_COMPARE_VERSION($(cat /sys/module/zfs/version | cut -f 1 -d -), [ge], [0.8.0],
[AC_DEFINE(RAFT_HAVE_ZFS_WITH_DIRECT_IO)], [])
],
[])

# Enable large file support. This is mandatory in order to interoperate with
# libuv, which enables large file support by default, making the size of 'off_t'
# on 32-bit architecture be 8 bytes instead of the normal 4.
Expand Down
2 changes: 1 addition & 1 deletion test/raft/lib/fs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fi
if [ "${cmd}" = "detect" ]; then
vars=""
for type in $types; do
vars="${vars}RAFT_TMP_$(echo ${type} | tr [a-z] [A-Z])=./tmp/${type} "
vars="${vars}RAFT_TMP_$(echo ${type} | tr a-z A-Z)=./tmp/${type} "
done
echo $vars
exit 0
Expand Down

0 comments on commit 06230ec

Please sign in to comment.