Bug#1001726: node-mqtt-packet breaks node-mqtt-connection autopkgtest: Invalid header flag bits, must be 0x2 for pubrel

2021-12-30 Thread Ying-Chun Liu (PaulLiu)

forwarded 1001726 https://github.com/mqttjs/mqtt-connection/pull/29
thanks



OpenPGP_signature
Description: OpenPGP digital signature


Bug#1001726: node-mqtt-packet breaks node-mqtt-connection autopkgtest: Invalid header flag bits, must be 0x2 for pubrel

2021-12-30 Thread Ying-Chun Liu (PaulLiu)

I think the following patch should fix this bug.
But I'll ask the upstream to review it first before I made an upload.

Regards,
Paul

Description: Ported to node-mqtt-packet 7.1.1
 Setting wrong flags and qos will cause an error exception raised.
 We need to avoid setting wrong values.
Bug-Debian: http://bugs.debian.org/1001726
Author: Ying-Chun Liu (PaulLiu) 
Index: node-mqtt-connection-4.1.0/test/connection.parse.js
===
--- node-mqtt-connection-4.1.0.orig/test/connection.parse.js
+++ node-mqtt-connection-4.1.0/test/connection.parse.js
@@ -400,7 +400,7 @@ module.exports = function () {
   var expected = {
 cmd: 'pubrel',
 retain: false,
-qos: 0,
+qos: 1,
 dup: false,
 length: 2,
 messageId: 4,
@@ -409,7 +409,7 @@ module.exports = function () {
   }
 
   var fixture = [
-96, 2, // Header
+98, 2, // Header
 0, 4 // Message id
   ]
 
@@ -537,17 +537,17 @@ module.exports = function () {
 retain: false,
 qos: 0,
 dup: false,
-length: 6,
-granted: [0, 1, 2, 128],
+length: 5,
+granted: [0, 1, 2],
 messageId: 6,
 topic: null,
 payload: null
   }
 
   var fixture = [
-144, 6, // Header
+144, 5, // Header
 0, 6, // Message id
-0, 1, 2, 128 // Granted qos (0, 1, 2) and a rejected being 0x80
+0, 1, 2 // Granted qos (0, 1, 2) and a rejected being 0x80
   ]
 
   this.stream.write(Buffer.from(fixture))


OpenPGP_signature
Description: OpenPGP digital signature


Bug#1001726: node-mqtt-packet breaks node-mqtt-connection autopkgtest: Invalid header flag bits, must be 0x2 for pubrel

2021-12-14 Thread Paul Gevers

Source: node-mqtt-packet, node-mqtt-connection
Control: found -1 node-mqtt-packet/7.1.1-1
Control: found -1 node-mqtt-connection/4.1.0-3
Severity: serious
Tags: sid bookworm
X-Debbugs-CC: debian...@lists.debian.org
User: debian...@lists.debian.org
Usertags: breaks needs-update

Dear maintainer(s),

With a recent upload of node-mqtt-packet the autopkgtest of 
node-mqtt-connection fails in testing when that autopkgtest is run with 
the binary packages of node-mqtt-packet from unstable. It passes when 
run with only packages from testing. In tabular form:


   passfail
node-mqtt-packet   from testing7.1.1-1
node-mqtt-connection   from testing4.1.0-3
all others from testingfrom testing

I copied some of the output at the bottom of this report.

Currently this regression is blocking the migration of node-mqtt-packet 
to testing [1]. Due to the nature of this issue, I filed this bug report 
against both packages. Can you please investigate the situation and 
reassign the bug to the right package?


More information about this bug and the reason for filing it can be found on
https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation

Paul

[1] https://qa.debian.org/excuses.php?package=node-mqtt-packet

https://ci.debian.net/data/autopkgtest/testing/amd64/n/node-mqtt-connection/17553966/log.gz

# Using package.json
# Node module name is mqtt-connection
# Build files found: # Test files found: test
# Files/dir to be installed from source: test # Copy test files
# Copy debian/tests/pkg-js content
'debian/tests/pkg-js' -> 
'/tmp/autopkgtest-lxc.is20x5x_/downtmp/autopkgtest_tmp/smokegz7eSX/debian/tests/pkg-js'
'debian/tests/pkg-js/test' -> 
'/tmp/autopkgtest-lxc.is20x5x_/downtmp/autopkgtest_tmp/smokegz7eSX/debian/tests/pkg-js/test'

# Searching module in /usr/lib/nodejs/mqtt-connection
# Searching module in /usr/lib/*/nodejs/mqtt-connection
# Searching module in /usr/share/nodejs/mqtt-connection
# Found /usr/share/nodejs/mqtt-connection
# Searching files to link in /usr/share/nodejs/mqtt-connection
'./connection.js' -> '/usr/share/nodejs/mqtt-connection/connection.js'
'./lib' -> '/usr/share/nodejs/mqtt-connection/lib'
'./package.json' -> '/usr/share/nodejs/mqtt-connection/package.json'
# Launch debian/tests/pkg-js/test with sh -ex
+ mocha test/


  Connection-v5
undefined should start piping in the next tick
transmission-v5
  #subscribe-5.0
undefined should send a 5.0 subscribe packet (single) (50ms)

  Connection
undefined should start piping in the next tick
parsing
  connect
undefined should fire a connect event (minimal)
undefined should fire a connect event (maximal)
parse errors
  undefined should say protocol not parseable
  connack
undefined should fire a connack event (rc = 0)
undefined should fire a connack event (rc = 5)
  publish
undefined should fire a publish event (minimal)
undefined should fire a publish event with 2KB payload
undefined should fire a publish event with 2MB payload
undefined should fire a publish event (maximal)
undefined should fire an empty publish
undefined should parse a splitted publish
  puback
undefined should fire a puback event
  pubrec
undefined should fire a pubrec event
  pubrel
1) should fire a pubrel event
  pubcomp
undefined should fire a pubcomp event
  subscribe
undefined should fire a subscribe event (1 topic)
undefined should fire a subscribe event (3 topic)
  suback
2) should fire a suback event
  unsubscribe
undefined should fire an unsubscribe event
  unsuback
undefined should fire a unsuback event
  pingreq
undefined should fire a pingreq event
  pingresp
undefined should fire a pingresp event
  disconnect
undefined should fire a disconnect event
  reserverd (15)
undefined should emit an error
  reserverd (0)
undefined should emit an error
transmission
  #connect
undefined should send a connect packet (minimal)
undefined should send a connect packet (maximal)
undefined should send a connect packet with binary 
username/password

undefined should send a connect packet with binary will payload
undefined should send a connect packet with unicode will payload
invalid options
  protocol id
undefined should reject non-string
  protocol version
undefined should reject non-number
undefined should reject >255
undefined should reject <0
  client id
undefined should reject non-present
undefined should reject empty
undefined should reject non-string
  keepalive
undefined should reject non-number
undefined should rej