Netatalk / netatalk

Netatalk is a Free and Open Source AFP fileserver. A *NIX or BSD system running Netatalk is capable of serving many Macintosh clients simultaneously as an AppleShare file server.
https://netatalk.io
GNU General Public License v2.0
353 stars 87 forks source link

Tests fail on FreeBSD and OpenBSD vmactions runners #774

Closed rdmark closed 7 months ago

rdmark commented 7 months ago

The integration tests are failing when run on FreeBSD or OpenBSD on the vmactions runners.

FreeBSD

  ninja: Entering directory `/home/runner/work/netatalk/netatalk/build'
  [1/9] Compiling C object test/afpd/libafpdtestlib.a.p/_home_runner_work_netatalk_netatalk_etc_afpd_directory.c.o
  [2/9] Compiling C object test/afpd/libafpdtestlib.a.p/_home_runner_work_netatalk_netatalk_etc_afpd_catsearch.c.o
  /home/runner/work/netatalk/netatalk/etc/afpd/catsearch.c:427:17: warning: implicit conversion from 'int' to 'char' changes value from 128 to -128 [-Wconstant-conversion]
          *p++ = isdir ? FILDIRBIT_ISDIR : FILDIRBIT_ISFILE;    /* IsDir ? */
               ~         ^~~~~~~~~~~~~~~
  ../etc/afpd/directory.h:59:35: note: expanded from macro 'FILDIRBIT_ISDIR'
  #define FILDIRBIT_ISDIR        (1 << 7) /* is a directory */
                                  ~~^~~~
  1 warning generated.
  [3/9] Compiling C object test/afpd/libafpdtestlib.a.p/_home_runner_work_netatalk_netatalk_etc_afpd_enumerate.c.o
  /home/runner/work/netatalk/netatalk/etc/afpd/enumerate.c:448:48: warning: implicit conversion from 'int' to 'char' changes value from 128 to -128 [-Wconstant-conversion]
          *data++ = S_ISDIR(s_path.st.st_mode) ? FILDIRBIT_ISDIR : FILDIRBIT_ISFILE;
                  ~                              ^~~~~~~~~~~~~~~
  ../etc/afpd/directory.h:59:35: note: expanded from macro 'FILDIRBIT_ISDIR'
  #define FILDIRBIT_ISDIR        (1 << 7) /* is a directory */
                                  ~~^~~~
  1 warning generated.
  [4/9] Compiling C object test/afpd/libafpdtestlib.a.p/_home_runner_work_netatalk_netatalk_etc_afpd_afp_dsi.c.o
  [5/9] Compiling C object test/afpd/libafpdtestlib.a.p/_home_runner_work_netatalk_netatalk_etc_afpd_filedir.c.o
  [6/9] Compiling C object test/afpd/libafpdtestlib.a.p/_home_runner_work_netatalk_netatalk_etc_afpd_fork.c.o
  [7/9] Compiling C object test/afpd/libafpdtestlib.a.p/_home_runner_work_netatalk_netatalk_etc_afpd_file.c.o
  /home/runner/work/netatalk/netatalk/etc/afpd/file.c:1462:26: warning: passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
                           s_vol->v_obj->dsi->commands,
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../include/atalk/adouble.h:439:83: note: passing argument to parameter 'buf' here
  extern int     copy_fork(int eid, struct adouble *add, struct adouble *ads, char *buf, size_t buflen);
                                                                                    ^
  1 warning generated.
  [8/9] Generating test/afpd/afp_dtrace.o with a custom command
  [9/9] Linking target test/afpd/afpdtest
  1/2 test1 OK              0.01s
  2/2 test2 FAIL           15.12s   killed by signal 13 SIGPIPE
  >>> MALLOC_PERTURB_=78 ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 LD_LIBRARY_PATH=/home/runner/work/netatalk/netatalk/build/libatalk /home/runner/work/netatalk/netatalk/build/test/afpd/afpdtest

  Ok:                 1   
  Expected Fail:      0   
  Fail:               1   
  Unexpected Pass:    0   
  Skipped:            0   
  Timeout:            0   

OpenBSD

  [251/253] Compiling C object test/afpd/libafpdtestlib.a.p/_home_runner_work_netatalk_netatalk_etc_afpd_spotlight.c.o
  [252/253] Compiling C object test/afpd/libafpdtestlib.a.p/_home_runner_work_netatalk_netatalk_etc_afpd_spotlight_marshalling.c.o
  [253/253] Linking target test/afpd/afpdtest
  afpfunc_helpers.c:101 (../test/afpd/afpfunc_helpers.c:101)(test/afpd/libafpdtestlib.a.p/afpfunc_helpers.c.o:(cnamewrap)): warning: strcpy() is almost always misused, please use strlcpy()
  subtests.c:49 (../test/afpd/subtests.c:49)(test/afpd/libafpdtestlib.a.p/subtests.c.o:(test001_add_x_dirs)): warning: sprintf() is often misused, please use snprintf()
  auth.c:1015 (/home/runner/work/netatalk/netatalk/etc/afpd/auth.c:1015)(test/afpd/libafpdtestlib.a.p/_home_runner_work_netatalk_netatalk_etc_afpd_auth.c.o:(auth_load)): warning: strcat() is almost always misused, please use strlcat()
  uam.c:307 (/home/runner/work/netatalk/netatalk/etc/afpd/uam.c:307)(test/afpd/libafpdtestlib.a.p/_home_runner_work_netatalk_netatalk_etc_afpd_uam.c.o:(uam_random_string)): warning: random() may return deterministic values, is that what you want?
  ninja: Entering directory `/home/runner/work/netatalk/netatalk/build'
  ninja: no work to do.
  1/2 test1 OK              0.01s
  2/2 test2 TIMEOUT        30.02s   killed by signal 15 SIGTERM
  >>> LD_LIBRARY_PATH=/home/runner/work/netatalk/netatalk/build/libatalk MALLOC_PERTURB_=80 /home/runner/work/netatalk/netatalk/build/test/afpd/afpdtest

  Ok:                 1   
  Expected Fail:      0   
  Fail:               0   
  Unexpected Pass:    0   
  Skipped:            0   
  Timeout:            1   
rdmark commented 7 months ago

@dgsga These failures were previously hidden by a quirk of the vmactions runners. It turns out that if any command in the run block passes, the entire step counts as a pass. I added set -e to the head of the block to make them bail out when a non-0 exit code is encountered.

ghost commented 7 months ago

Yes, I've been aware of this for a while. I think the fault lies with the vmactions VM's as tests pass on both platforms on my ESXi setup. I'm not sure where to start looking atm. The problem with these VM's is that they get out-of date very quickly as we have seen with the Dragonfly one. The ideal solution would be to use docker containers for all the *BSD platforms.

rdmark commented 7 months ago

The vmactions runners have proven a bit unreliable, indeed. I might take a look myself later.

rdmark commented 7 months ago

Discarding this, with the reasoning that the vmactions VMs have been proven unstable.