Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] 2.1.0rc3 available

Hi Roger,

Here is my mosquitto2.1rc3 summary:

mosquitto builds and runs well on macOS and in my typical environments.

2 problems are still unsolved but I don’t rate them critical:
- mosquitto_ctrl build because of unresolved editline dependencies, will have to build with -D WITH_CTRL_SHELL=NO
- mosquitto_sub cannot use %f float formatting because __STDC_IEC_559__ is not defined (see below)

- 3 failed tests (see below)
The following tests FAILED:
         16 - broker-01-bad-initial-packets (Failed)
        237 - broker-16-config-huge (Failed)
        306 - client-02-subscribe-format (Failed)

- compile warnings (see below)

Cheers
   Christoph

--- broker-01-bad-initial-packets

In macOS the client sometimes detects `BrokenPipeError` instead of `ConnectionResetError`.
If we handle both exceptions, the test is successful:

```
diff --git a/test/broker/01-bad-initial-packets.py b/test/broker/01-bad-initial-packets.py
index d6772d9ce78c791b 100755
--- a/test/broker/01-bad-initial-packets.py
+++ b/test/broker/01-bad-initial-packets.py
@@ -19,6 +19,8 @@ def do_send(port, socks, payload):
         sock.send(payload)
     except ConnectionResetError:
         pass
+    except BrokenPipeError:
+        pass

 def do_test(port):
     rc = 1
```
--- broker-16-config-huge

The `bind_interface lo` is not valid on macOS because the default loopback device is `lo0`, not `lo`.

— client-subscribe-format

The last 2 test cases fail because `mosquitto_sub` exits with the following error message:
```
% /Users/ckrey/mosquitto/builddevelop/client/mosquitto_sub -p 1888 -q 1 -t 02/sub/format/test -C 1 -V mqttv311 -F "%.3f"
Error: Can't print float, missing __STDC_IEC_559__ standard support.

Use 'mosquitto_sub --help' to see usage.
```
Because this test in `client_shared.c`
```
 164 #ifndef __STDC_IEC_559__
 165                                         fprintf(stderr, "Error: Can't print float, missin
 166                                         return 1;
 167 #endif
```

These are the two failing test cases
```
do_test('%.3d', '2.718\n', payload=struct.pack('BBBBBBBB', 0x58, 0x39, 0xB4, 0xC8, 0x76, 0xBE, 0x05, 0x40))
do_test('%.3f', '0.707\n', payload=struct.pack('BBBB', 0xF4, 0xFD, 0x34, 0x3F))
```

- 2 compile warnings

```
[ 15%] Building C object src/CMakeFiles/mosquitto.dir/mosquitto.c.o
/Users/ckrey/mosquitto2.1rc3/src/mosquitto.c:210:37: warning: implicit conversion changes signedness: 'gid_t' (aka 'unsigned int') to 'int' [-Wsign-conversion]
  210 |                         if(initgroups(config->user, pwd->pw_gid) == -1){
      |                            ~~~~~~~~~~               ~~~~~^~~~~~
1 warning generated.
```

```
[ 23%] Building C object src/CMakeFiles/mosquitto.dir/sys_tree.c.o
/Users/ckrey/mosquitto2.1rc3/src/sys_tree.c:274:50: warning: format specifies type 'unsigned long' but the argument has type 'int64_t' (aka 'long long') [-Wformat]
  274 |                                 len = (uint32_t)snprintf(buf, BUFLEN, "%lu", metrics[i].current);
      |                                                                        ~~~   ^~~~~~~~~~~~~~~~~~
      |                                                                        %lld
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:119:67: note: expanded from macro 'snpri
  119 | #define snprintf(str, len, ...) __snprintf_chk_func (str, len, 0, __VA_ARGS__)
      |                                                                   ^~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:76:64: note: expanded from macro '__snpr
   76 |         __builtin___snprintf_chk (str, len, flag, __darwin_obsz(str), __VA_ARGS__)
      |                                                                       ^~~~~~~~~~~
1 warning generated.
```




Back to the top