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
LwM2M interoperability tests [0 - 399] #64013
LwM2M interoperability tests [0 - 399] #64013
Conversation
f8660bd
to
4109bb9
Compare
fa08335
to
f4ca0f8
Compare
* Add support for running interoperability tests with Qemu X86. * Remove some debugging messages to allow binary to fix Qemu Cortex-M3 board. * Tune buffer and stack sizes to fit all boards. Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Leshan Demo server seem to support it so it makes sense to use it. Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Add remaining test cases from Device management & Service Enablement Interface * LightweightM2M-1.1-int-222 – Read on Object * LightweightM2M-1.1-int-223 – Read on Object Instance * LightweightM2M-1.1-int-224 – Read on Resource * LightweightM2M-1.1-int-225 – Read on Resource Instance * LightweightM2M-1.1-int-226 – Write (Partial Update) on Object Instance * LightweightM2M-1.1-int-227 - Write (replace) on Resource * LightweightM2M-1.1-int-228 - Write on Resource Instance * LightweightM2M-1.1-int-229 - Read-Composite Operation * LightweightM2M-1.1-int-230 - Write-Composite Operation * LightweightM2M-1.1-int-231 - Querying basic information in SenML JSON format * LightweightM2M-1.1-int-232 - Querying basic information in SenML CBOR format * LightweightM2M-1.1-int-233 - Setting basic information in SenML CBOR format * LightweightM2M-1.1-int-234 - Setting basic information in SenML JSON format * LightweightM2M-1.1-int-235 - Read-Composite Operation on root path * LightweightM2M-1.1-int-236 - Read-Composite - Partial Presence * LightweightM2M-1.1-int-237 - Read on Object without specifying Content-Type * LightweightM2M-1.1-int-241 - Executable Resource: Rebooting the device * LightweightM2M-1.1-int-256 - Write Operation Failure * LightweightM2M-1.1-int-257 - Write-Composite Operation * LightweightM2M-1.1-int-260 - Discover Command * LightweightM2M-1.1-int-261 - Write-Attribute Operation on a multiple resource * LightweightM2M-1.1-int-280 - Successful Read-Composite Operation * LightweightM2M-1.1-int-281 - Partially Successful Read-Composite Operation Modify tests binary * Allow CoAP payload of 1211 bytes. * Allow outgoing messages to use block-wise if they are bigger. * Use 4kB encode buffer for outgoing messages. * Check configured heap and stack sizes. * Limit number of interface addresses, sockets and contexts Qemu-cortex-m3 platform ran out of RAM, so reconfigure it to use * packet size of 256 bytes. * encode buffer of 2kB This exercises the block-transferring on some of the test cases. Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Implement support for reading stream of events from Leshan. This allows testing the LwM2M SEND/Notify/Update operations and reading content of those. Also convert the whole Leshan class to use requests.session() so it pools up connections and uses keep-alive. Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
When testcases share one DUT per module, we save the time from running bootstrap on each testcase. Each testcase start with DUT that is registered. Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Implement testcases for Information Reporting Interface [300-399]: * LightweightM2M-1.1-int-301 - Observation and Notification of parameter values * LightweightM2M-1.1-int-302 - Cancel Observations using Reset * LightweightM2M-1.1-int-304 - Observe-Composite Operation * LightweightM2M-1.1-int-306 – Send Operation * LightweightM2M-1.1-int-307 – Muting Send * LightweightM2M-1.1-int-308 - Observe-Composite and Creating Object Instance * LightweightM2M-1.1-int-309 - Observe-Composite and Deleting Object Instance * LightweightM2M-1.1-int-310 - Observe-Composite and modification of parameter values * LightweightM2M-1.1-int-311 - Send command 303 and 305 cannot be implemented using Leshan as it only support passive cancelling of observation. Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
f4ca0f8
to
cf6cd38
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.
Impressive work 👍
LGTM
Be careful with Leshan demo HTTP API; it's not stable and tightly coupled with the demo UI |
Hi, I'm Leshan project lead. Glad to see most of the test are ✅. Regarding the comment concerning Leshan :
We are working on it. I hope this will be available soon.
I will try to take time next week to verify that but it should work... 🤔
This is supported by the library but not server-demo. About using leshan-server-demo and leshan-bsserver-demo : Even if I understand why people reuse it, our demos are not really intended to be reused. Especially in production. See : https://github.com/eclipse-leshan/leshan/wiki/F.A.Q.#could-i-reuse-leshan--demo- But once we say that a question remains : "what should be the good way to do that ?" 🤔 |
Myself, I'm not a maintainer here, but I have been accepted as a "collaborator" in Zephyr's LwM2M stack. It means that I'm a contributor whose review also counts as approval. Past two years me and my team have been quite actively developing this stack forward.
I am aware of this guidance. However, the REST API on it, makes if by far the most easiest interface to attach into when we run tests using Pytest. Having no promises on API stability is a fact that we can live with. When tests break, we can roll back to some known version tag and continue using that until we update the tests. I'll go through the discussion chain that you pointed out. I might leave some comments as well, if there is anything I think is worth mentioning. |
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.
LGTM
I have implemented LwM2M interoperability tests from the test specification:
OMA Enabler Test Specification (Interoperability) for Lightweight M2M
This PR contains test specified in following areas:
Tests and environment are documented in tests/net/lib/lwm2m/interop/README.md
Current status
#64011#64012#64189#64290#64634#64634Bugfixes
As I'm writing tests, I'll try to write bugfixes as well. Those mentioned bugs are fixed in this branch, I'll submit a fix to main separately.