Skip to content

Add fenrir suggested test cases#484

Merged
aidangarske merged 19 commits intowolfSSL:masterfrom
embhorn:fenrir-tests
Apr 27, 2026
Merged

Add fenrir suggested test cases#484
aidangarske merged 19 commits intowolfSSL:masterfrom
embhorn:fenrir-tests

Conversation

@embhorn
Copy link
Copy Markdown
Member

@embhorn embhorn commented Apr 22, 2026

Update for ChangeLog.md at release:

  • API Changes
    - MqttEncode_Props: STRING and STRING_PAIR property types now require the
    caller to set data_str.len (and data_str2.len for STRING_PAIR)
    explicitly. Previously the length was derived internally via XSTRLEN on
    data_str.str. Applications that only populated data_str.str and
    relied on strlen will now emit zero-length property strings. Update
    callers to set prop->data_str.len = (word16)XSTRLEN(prop->data_str.str);
    (or the actual byte length) before encoding. Affects v5 properties such
    as AUTH_METHOD, CONTENT_TYPE, RESPONSE_TOPIC, USER_PROPERTY, etc.
  • Update AGENTS.md with testing directives
  • Fix f-2359 Subscribe encode/decode tests
  • Fix f-2348 Keepalive timeout tests
  • Fix f-2349 BrokerHandle_Subscribe tests
  • Fix f-2360 MqttEncode_String bug and tests
  • Fix f-2363 MqttEncode_Unsubscribe tests
  • Fix f-2744 MqttDecode_Publish tests
  • Fix f-2745 MqttEncode_FixedHeader tests
  • Fix f-2746 MqttEncode_Connect tests
  • Fix f-2747 MqttEncode_Vbi tests
  • Fix f-2748 MqttEncode_PublishResp tests
  • Fix f-2749 MqttDecode_SubscribeAck tests
  • Fix f-2750 MqttEncode_Un/Subscribe tests
  • Fix f-2757 MqttDecode_Auth bug and tests
  • Fix f-3130 MqttDecode_Connect tests
  • Fix f-3131 MqttClient_Connect cred clearing tests

@embhorn embhorn self-assigned this Apr 22, 2026
Copilot AI review requested due to automatic review settings April 22, 2026 20:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new unit tests targeting MqttDecode_Publish (including edge/malformed cases and an MQTT v5 property scenario) and updates contributor/agent guidance around test integrity and reporting discipline.

Changes:

  • Add multiple MqttDecode_Publish test cases for QoS0/QoS1, zero-payload, and malformed remaining-length handling.
  • Add an MQTT v5 PUBLISH decode test that exercises property parsing and frees decoded properties.
  • Extend AGENTS.md with guidance on test integrity, non-fabrication, and exit-code discipline.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
tests/test_mqtt_packet.c Adds new MqttDecode_Publish unit tests and registers them in the test runner (incl. v5 properties case).
AGENTS.md Introduces new test/reporting integrity guidelines for contributors/agents.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread tests/test_mqtt_packet.c
Copy link
Copy Markdown

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #484

Scan targets checked: wolfmqtt-bugs, wolfmqtt-src

No new issues found in the changed files. ✅

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/mqtt_packet.c Outdated
Comment thread tests/test_mqtt_client.c
Comment thread scripts/broker.test Outdated
Comment thread scripts/broker.test Outdated
Comment thread tests/test_mqtt_packet.c Outdated
Comment thread tests/test_mqtt_packet.c Outdated
@embhorn embhorn marked this pull request as ready for review April 23, 2026 15:21
@embhorn embhorn requested a review from aidangarske April 23, 2026 16:07
@embhorn embhorn removed their assignment Apr 23, 2026
Copy link
Copy Markdown
Member

@aidangarske aidangarske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skoll Multi-Scan Review

Modes: review + review-security + audit
Overall recommendation: COMMENT
Findings: 7 total — 7 posted, 0 skipped
7 finding(s) posted as inline comments (see file-level comments below)

Posted findings

  • [SUGGEST] [review] AGENTS.md test-vector section references tools/formats that do not apply to wolfMQTTAGENTS.md:169-175
  • [Info] [review+review-security] t6b keep-alive test continues after watcher/client fail to become ready and timing clock starts before kill -STOPscripts/broker.test:335-378
  • [SUGGEST] [review] t6b timing window is tight and may flake on loaded CIscripts/broker.test:313-334
  • [NIT] [review] Oversized-string tests allocate ~64KB on the heap several times per runtests/test_mqtt_packet.c:445-470, 957-983, 986-1011, 1014-1039, 1042-1067, 1070-1096
  • [NIT] [review] connect_clears_tx_buf_credentials depends on undefined behavior if write returns earlytests/test_mqtt_client.c:330-386
  • [Info] [review-security] MqttDecode_Auth returns OUT_OF_BUFFER instead of MALFORMED_DATA for invalid reason codessrc/mqtt_packet.c:2762-2764
  • [NIT] [audit] MqttEncode_Subscribe oversized-topic check not tested at non-first loop indexsrc/mqtt_packet.c:1752-1767

Review generated by Skoll

Comment thread AGENTS.md Outdated
Comment thread scripts/broker.test
Comment thread scripts/broker.test
Comment thread tests/test_mqtt_packet.c
Comment thread tests/test_mqtt_client.c
Comment thread src/mqtt_packet.c
Comment thread src/mqtt_packet.c
@embhorn embhorn requested a review from aidangarske April 24, 2026 12:25
@aidangarske aidangarske merged commit 03667b4 into wolfSSL:master Apr 27, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants