Skip to content

Commit

Permalink
tests: Handle ENOSYS in qemu on cross-arch emulation
Browse files Browse the repository at this point in the history
 We may get ENOSYS from qemu userspace emulation not implementing the ioctl.

Signed-off-by: Colin Walters <[email protected]>
  • Loading branch information
cgwalters committed Nov 6, 2024
1 parent 52d98a4 commit d771778
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:
./hacking/installdeps.sh
meson setup build --werror
meson compile -C build
meson test -C build --timeout-multiplier 10
env CFS_TEST_ARCH_EMULATION=${{ matrix.arch }} meson test -C build --timeout-multiplier 10
- name: Upload log
uses: actions/upload-artifact@v4
if: always()
Expand Down
4 changes: 3 additions & 1 deletion tests/test-lcfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ static void test_no_verity(void)
int r = lcfs_fd_measure_fsverity(digest, tmpfd);
int errsv = errno;
assert(r != 0);
assert(errsv == ENOVERITY);
// We may get ENOSYS from qemu userspace emulation not implementing the ioctl
if (getenv("CFS_TEST_ARCH_EMULATION") == NULL)
assert(errsv == ENOVERITY);
close(tmpfd);
}

Expand Down

0 comments on commit d771778

Please sign in to comment.