-
Notifications
You must be signed in to change notification settings - Fork 177
feat(examples): websocket autobahn test suit integration (IDF-14864) #960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
|
338e6c6 to
0b8ebbf
Compare
c6f9902 to
20bbe35
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on December 20
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
components/esp_websocket_client/examples/autobahn-testsuite/testee/main/autobahn_testee.c
Outdated
Show resolved
Hide resolved
components/esp_websocket_client/examples/autobahn-testsuite/testee/main/autobahn_testee.c
Show resolved
Hide resolved
components/esp_websocket_client/examples/autobahn-testsuite/run_tests.sh
Outdated
Show resolved
Hide resolved
components/esp_websocket_client/examples/autobahn-testsuite/testee/main/autobahn_testee.c
Show resolved
Hide resolved
components/esp_websocket_client/examples/autobahn-testsuite/scripts/quick_test.sh
Outdated
Show resolved
Hide resolved
20bbe35 to
138574c
Compare
components/esp_websocket_client/examples/autobahn-testsuite/scripts/monitor_serial.py
Outdated
Show resolved
Hide resolved
components/esp_websocket_client/examples/autobahn-testsuite/testee/main/autobahn_testee.c
Show resolved
Hide resolved
138574c to
473ca9f
Compare
components/esp_websocket_client/examples/autobahn-testsuite/scripts/analyze_results.py
Show resolved
Hide resolved
components/esp_websocket_client/examples/autobahn-testsuite/testee/main/autobahn_testee.c
Show resolved
Hide resolved
875d3b8 to
048b0c5
Compare
| if: github.event_name == 'push' || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'autobahn')) | ||
|
|
||
| env: | ||
| TEST_DIR: components/esp_websocket_client/examples/autobahn-testsuite |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should move this to a different place, as this isn't an example. Better to create a test folder.
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Websocket client doesn't require the submodules, right?
| docker logs fuzzing-server | ||
| exit 1 | ||
| - name: Build testee (Linux target) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - name: Build testee (Linux target) | |
| - name: Build test (Linux target) |
| jobs: | ||
| build_autobahn: | ||
| # Run on push to master or if PR has 'websocket' label | ||
| if: contains(github.event.pull_request.labels.*.name, 'autobahn') || github.event_name == 'push' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if: contains(github.event.pull_request.labels.*.name, 'autobahn') || github.event_name == 'push' | |
| if: contains(github.event.pull_request.labels.*.name, 'websocket-autobahn') || github.event_name == 'push' |
| name: Build | ||
| strategy: | ||
| matrix: | ||
| #idf_ver: ["release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "latest"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should cover IDF versions that are currently in service period[5.5, latest], and we should at least have a manual run on older idf versions to identify potential fix to be added.
| #define BUFFER_SIZE 16384 // Reduced from 32768 to free memory for accumulator buffer | ||
| #define START_CASE 1 | ||
| #define END_CASE 300 | ||
| // Configure test range here: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is misplaced as it refers to the range above. We could have esp_console for this and have this as runtime option.
| @@ -0,0 +1,10 @@ | |||
| # Conditionally require components based on target | |||
| if(${IDF_TARGET} STREQUAL "linux") | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be simplified and more maintenable if we create a base list with common components and extend it with the specific and add that list to the requirements.
| # COMPONENTS must be set before include() to limit component scanning | ||
| if(${IDF_TARGET} STREQUAL "linux") | ||
| set(common_component_dir ../../../../../common_components) | ||
| set(EXTRA_COMPONENT_DIRS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should move this to be handled by component manager.
| esp_websocket_client_error(client, "esp_transport_connect() failed with %d, " | ||
| "transport_error=%s, tls_error_code=%i, tls_flags=%i, esp_ws_handshake_status_code=%d, errno=%d", | ||
| result, esp_err_to_name(error_handle->last_error), error_handle->esp_tls_error_code, | ||
| result, error_name ? error_name : "UNKNOWN", error_handle->esp_tls_error_code, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary? esp_err_to_name handles inexistent code and from quick code inspection always returns a valid pointer.
| ``` | ||
| This generates a detailed console summary and an HTML summary at `reports/summary.html`. | ||
|
|
||
| **Option 3: Direct File Access** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This are unnecessary instructions.
048b0c5 to
fa1ef1a
Compare
Note
Adds an Autobahn testsuite example and Linux CI to build/run it and upload reports, plus safer websocket transport error logging and minor linux_compat timer deps.
components/esp_websocket_client/examples/autobahn-testsuitewith Docker configs, quick/full configs, scripts (run_tests.sh,monitor_serial.py,generate_summary.py, etc.), and atesteeapp to run all cases and generate reports..github/workflows/autobahn__linux-test.yml): starts fuzzing server, builds Linux testee, runs tests, generates summary, uploads reports..github/workflows/autobahn__target-test.yml): builds and merges ESP32 binaries for the testee (run-on-target job stubbed/commented).components/esp_websocket_client/esp_websocket_client.c): safer transport error logging using guardedesp_err_to_name()across write/read/connect/poll paths.esp_commonrequirement and includeesp_err.hinesp_timerlinux shim.Written by Cursor Bugbot for commit fa1ef1a. This will update automatically on new commits. Configure here.