Skip to main content

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

Hi Roger,

2.1.0rc2 builds well on macOS except the known 
- mosquitto_ctrl and
- gmock
problems.

There are only 2 remaining compiler warnings and all failing test cases are explained below

Cheers
   Christoph

-----------
There are only 2 remaining compiler warnings:

```
/Users/ckrey/mosquitto/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.
```

```
/Users/ckrey/mosquitto/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
```

27 tests still fail (I sorted out the python environment problem with the `psutil` module)

- the known problem for the sqlite persistence test cases

- 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- 08-ssl-bridge and client-03-publish-tls

We need to enable the address 127.0.0.2 on the loopback interfaces (via https://medium.com/@YagelSh/how-i-fixed-a-strange-error-binding-127-0-0-2-1234-on-my-mac-696e98adbe5c)
before we can use this address to test the `—insecure` TLS connection.

```
sudo ifconfig lo0 alias 127.0.0.2 up
```

- 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))
```

Back to the top