Skip to content

test-util fails on FreeBSD #157

@evverx

Description

@evverx

The FreeBSD package replaces stat with status there: https://github.com/freebsd/freebsd-ports/blob/dc0fdede53ae3a9bf83ecd3bc30aad9948f86ce2/devel/dfuzzer/Makefile#L33

Without any patches and proc mounted ninja -C ./build test fails with

1/2 test-util FAIL            0.01s   killed by signal 6 SIGABRT
>>> UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 G_TEST_SRCDIR=/home/runner/work/avahi/avahi/dfuzzer G_TEST_BUILDDIR=/home/runner/work/avahi/avahi/dfuzzer/build MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MESON_TEST_ITERATION=1 MALLOC_PERTURB_=214 ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 /home/runner/work/avahi/avahi/dfuzzer/build/test-util
――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――
stdout:
TAP version 14
# random seed: R02S3d3be4bd156d9923f8db31e44f99d249
1..1
# Start of df_util tests
# show_output: FALSE
not ok /df_util/df_execute_external_command - ERROR:../test/test-util.c:15:test_df_execute_external_command: 'df_execute_external_command("true; echo hello world; cat /proc/$$/stat", show_output) == 0' should be TRUE
Bail out!
stderr:
**
ERROR:../test/test-util.c:15:test_df_execute_external_command: 'df_execute_external_command("true; echo hello world; cat /proc/$$/stat", show_output) == 0' should be TRUE

Here's what in /proc there:

+ bash -c 'ls -l /proc/$$'
total 0
-r--r--r--  1 root wheel 0 Oct 31 19:26 cmdline
-rw-------  1 root wheel 0 Oct 31 19:26 dbregs
-r--r--r--  1 root wheel 0 Oct 31 19:26 etype
lr--r--r--  1 root wheel 0 Oct 31 19:26 file -> /bin/ls
-rw-------  1 root wheel 0 Oct 31 19:26 fpregs
-r--r--r--  1 root wheel 0 Oct 31 19:26 map
-rw-------  1 root wheel 0 Oct 31 19:26 mem
--w-------  1 root wheel 0 Oct 31 19:26 note
--w-------  1 root wheel 0 Oct 31 19:26 notepg
-rw-------  1 root wheel 0 Oct 31 19:26 osrel
-rw-------  1 root wheel 0 Oct 31 19:26 regs
-r--r--r--  1 root wheel 0 Oct 31 19:26 rlimit
-r--r--r--  1 root wheel 0 Oct 31 19:26 status

There are also other patches there where /etc/dfuzzer.conf is replaced with ${PREFIX}/etc/dfuzzer.conf.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions