Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mosquitto-dev] running tests on netbsd-8

Following up on tests, I have tried to run them using gmake (without
cmake).  I had to add in Makefile CPPFLAGS=-I/usr/pkg/include because
that's where CUnit is, and also installed uthash.  That is par for the
course for pre-autoconf makefiles :-)   Then, in src/test, I had to add
not only defining CPPFLAGS but passing them to the build of one of the
files.  After that, I ran into

  set -e; for d in lib client src; do gmake -C ${d}; done
  gmake[1]: Entering directory '/home/n0/gdt/pkgsrc-current/pkgsrc/wip/mosquitto/work/mosquitto-1.6.0/lib'
  gmake -C cpp
  gmake[2]: Entering directory '/home/n0/gdt/pkgsrc-current/pkgsrc/wip/mosquitto/work/mosquitto-1.6.0/lib/cpp'
  gmake[2]: Nothing to be done for 'all'.
  gmake[2]: Leaving directory '/home/n0/gdt/pkgsrc-current/pkgsrc/wip/mosquitto/work/mosquitto-1.6.0/lib/cpp'
  gmake[1]: Leaving directory '/home/n0/gdt/pkgsrc-current/pkgsrc/wip/mosquitto/work/mosquitto-1.6.0/lib'
  gmake[1]: Entering directory '/home/n0/gdt/pkgsrc-current/pkgsrc/wip/mosquitto/work/mosquitto-1.6.0/client'
  gmake[1]: Nothing to be done for 'all'.
  gmake[1]: Leaving directory '/home/n0/gdt/pkgsrc-current/pkgsrc/wip/mosquitto/work/mosquitto-1.6.0/client'
  gmake[1]: Entering directory '/home/n0/gdt/pkgsrc-current/pkgsrc/wip/mosquitto/work/mosquitto-1.6.0/src'
  gmake[1]: Nothing to be done for 'all'.
  gmake[1]: Leaving directory '/home/n0/gdt/pkgsrc-current/pkgsrc/wip/mosquitto/work/mosquitto-1.6.0/src'
  gmake -C test test
  gmake[1]: Entering directory '/home/n0/gdt/pkgsrc-current/pkgsrc/wip/mosquitto/work/mosquitto-1.6.0/test'
  gmake -C unit test
  gmake[2]: Entering directory '/home/n0/gdt/pkgsrc-current/pkgsrc/wip/mosquitto/work/mosquitto-1.6.0/test/unit'
  cc -I../.. -I../../lib -I../../src -coverage -Wall -ggdb  -I/usr/pkg/include -c -o util_mosq.o ../../lib/util_mosq.c
  ../../lib/util_mosq.c: In function ‘util__random_bytes’:
  ../../lib/util_mosq.c:328:43: error: missing binary operator before token "("
   #elif defined(__GLIBC__) && __GLIBC_PREREQ(2, 25)
                                             ^
  gmake[2]: *** [Makefile:101: util_mosq.o] Error 1
  gmake[2]: Leaving directory '/home/n0/gdt/pkgsrc-current/pkgsrc/wip/mosquitto/work/mosquitto-1.6.0/test/unit'
  gmake[1]: *** [Makefile:16: utest] Error 2
  gmake[1]: Leaving directory '/home/n0/gdt/pkgsrc-current/pkgsrc/wip/mosquitto/work/mosquitto-1.6.0/test'
  gmake: *** [Makefile:42: test] Error 2

removing the && __GLIBC_PREREQ part enabled the build to continue.   My
impression is that the content after && still has to be syntactically
valid.

The next problem was passing in LDFLAGS as "-L/usr/pkg/lib
-R/usr/pkg/lib" but that was not followed, and I had to hand edit that
into test/unit/Makefile (which blurs LDFLAGS and LDADD, in autoconf terms).

Then, most of the tests worked.

Next was failing to find python3.  I have python3.7; pkgsrc doesn't
install non-fully-qualified names because then people use them and
changing where they point to leads to unsound intallations.  I made a
symlink just to run the tests -- probably the equivalent of configure.ac
(or cmake, since that path is already in progress) should find a
suitable python and arrange to use it.

Then, a lot of the python tests passed, until this, which failed on two
runs.  This smells like a test error with exceptions varying by system,
but I haven't read the test or POSIX.

./02-subpub-qos1-bad-pubcomp.py
1555614603: mosquitto version 1.6.0 starting
1555614603: Using default config.
1555614603: Opening ipv6 listen socket on port 1888.
1555614603: Opening ipv4 listen socket on port 1888.
1555614603: New connection from ::1 on port 1888.
1555614603: Socket error on client <unknown>, disconnecting.
1555614603: New connection from 127.0.0.1 on port 1888.
1555614603: New client connected from 127.0.0.1 as subpub-qos1-test (p2, c1, k60).
1555614603: No will message specified.
1555614603: Sending CONNACK to subpub-qos1-test (0, 0)
1555614603: Received SUBSCRIBE from subpub-qos1-test
1555614603: 	subpub/qos1 (QoS 1)
1555614603: subpub-qos1-test 1 subpub/qos1
1555614603: Sending SUBACK to subpub-qos1-test
1555614603: New connection from 127.0.0.1 on port 1888.
1555614603: New client connected from 127.0.0.1 as helper (p2, c1, k60).
1555614603: No will message specified.
1555614603: Sending CONNACK to helper (0, 0)
1555614603: Received PUBLISH from helper (d0, q1, r0, m1, 'subpub/qos1', ... (7 bytes))
1555614603: Sending PUBACK to helper (m1, rc0)
1555614603: Sending PUBLISH to subpub-qos1-test (d0, q1, r0, m1, 'subpub/qos1', ... (7 bytes))
1555614603: Socket error on client helper, disconnecting.
1555614603: Received PUBCOMP from subpub-qos1-test (Mid: 1, RC:0)
1555614603: Socket error on client subpub-qos1-test, disconnecting.
1555614603: mosquitto version 1.6.0 terminating

Traceback (most recent call last):
  File "./02-subpub-qos1-bad-pubcomp.py", line 49, in <module>
    p = sock.recv(len(pingresp_packet))
ConnectionResetError: [Errno 54] Connection reset by peer
gmake[2]: *** [Makefile:57: 02] Error 1
gmake[2]: Leaving directory '/home/n0/gdt/pkgsrc-current/pkgsrc/wip/mosquitto/work/mosquitto-1.6.0/test/broker'
gmake[1]: *** [Makefile:8: test] Error 2
gmake[1]: Leaving directory '/home/n0/gdt/pkgsrc-current/pkgsrc/wip/mosquitto/work/mosquitto-1.6.0/test'
gmake: *** [Makefile:43: test] Error 2

Overall, though, things are largely passing!


Back to the top