-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
tests/multi_net: Fix skipping of SSLContext tests when .der don't exist. #15546
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
tests/multi_net: Fix skipping of SSLContext tests when .der don't exist. #15546
Conversation
@andrewleech I saw you had problems in #15523 (comment) when running multi tests that rely on .der files. They should have skipped when the .der files did not exist, but one of them didn't skip. That's fixed by this PR. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #15546 +/- ##
=======================================
Coverage 98.43% 98.43%
=======================================
Files 161 161
Lines 21281 21281
=======================================
Hits 20948 20948
Misses 333 333 ☔ View full report in Codecov by Sentry. |
The `sslcontext_server_client_ciphers.py` test was using stat to test for the .der files after it already tried to open them for reading. That is now fixed. And `sslcontext_server_client.py` is adjusted to use the same pattern for skipping the test. Signed-off-by: Damien George <[email protected]>
b8c1717
to
e1fe62f
Compare
On a related note:
I looks to me like the |
It looks OK to me, the exp was updated with the der files in this commit: f3d1495 Testing on unix (after enabling It also passes when one instance is an ESP32 and the other instance is unix (in both permutations):
|
Bit late to bring this up, but I actually think these tests should fail with a (clear) error if the files are missing. Otherwise we're nudging people towards not testing this functionality, rather than testing it. (The actual thing I think these tests are missing are docs on how to correctly run them. I also had to figure it through trial and error, and I made a note to submit some instructions in a PR when I get a chance.) |
Ah, I didn't realise pre-made I've updated my readme PR some more thanks :-) #15552 With that, the cert tests all pass for me between C3 and S3, though the udp data is giving me some packet loss. That could be just related to router disance / low quality antennas . |
I agree it's unexpected to have to copy the der files to the device for the test to run/work. A better solution would be for the tests to run without copying across the files. This could be done:
|
I added a one-liner instruction in my readme update to copy the files and set rtc, I don't think that's too bad :-) |
The
sslcontext_server_client_ciphers.py
test was using stat to test for the .der files after it already tried to open them for reading. That is now fixed. Andsslcontext_server_client.py
is adjusted to use the same pattern for skipping the test.