Comments (4)
First, not all constraint checks are skipped for null. Only the ones that list is_null_allowed=True
, which are:
- type constraints
minLength
/maxLength
constraintsminValue
/maxValue
constraintsnotValue
constraintanyOf
constraint
This is certainly correct behavior for minValue
/maxValue
and minLength
/maxLength
checks if the attribute is nullable. Spec constraints always mean "if the value is not null". See section "7.18.3. Constraint & Value", subsection "7.18.3.6. Nullable in Range", which says:
If data is nullable then null SHALL be a valid value.
So if you have a nullable int with constraint 1-3, the valid values are: null, 1, 2, 3. If you have a nullable string with some length constraints, null is a valid value (and in fact a zero-length string is also allowed, per that same spec section, no matter what the constraints say).
I suspect anyOf
is probably correct as well, for the same reason.
I'm not sure what the story here is for non-nullable attributes for which the server nevertheless returns null.
For the notValue
bit... that part looks odd to me. We do have some YAML using notValue: null
and at first glance those would pass even if the value is in fact null. Checking that now.
from connectedhomeip.
And yes, I just confirmed that notValue: null
does not fail if the value is in fact null. So we need to fix that.
from connectedhomeip.
#32871 should fix notValue: null
.
from connectedhomeip.
Thanks, Boris. Ok, sounds like the runner is correct, and the test just isn't properly accounting for this case. I'll close this issue and handle it in the test itself.
from connectedhomeip.
Related Issues (20)
- [SDK Quality Test] #3: Commission failed with src/app/ClusterStateCache.cpp:303: CHIP Error 0x00000010: Key not found
- [SDK Quality Test] #4: commissiong failed with src/controller/python/ChipDeviceController-ScriptPairingDeviceDiscoveryDelegate.h:59: CHIP Error 0x00000032: Timeout
- [SDK Quality Test] #5: Commissioning failed with src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:89: CHIP Error 0x00000003: Incorrect state
- [SDK Quality Test] #6: Unpairing function is failed with src/app/ReadClient.cpp:682: CHIP Error 0x00000032: Timeout
- [SDK Quality Test] #7: Commissioning failed with src/app/CommandSender.cpp:328: CHIP Error 0x00000032: Timeout
- [SDK Quality Test] #8: Commissioning failed with CHIP Error 0x000000C9: No shared trusted root
- [BUG] Bug found by bugprone-casting-through-void check in .clang-tidy HOT 1
- chiptool reads threadnetworkdiagnostics cluster with all relevant attributes as null[1.3] HOT 1
- openthread dbus method scan can't get attributes like channel, networkname, etc.[1.3]
- [CERT-TEST-FAILURE] Test_TC_IDM_6_2.yaml should expect INVALID_ACTION rather the UNSUSPPORTED_ACCESS and general issue HOT 2
- [BUG] Chiptool logs do not contains timestamp HOT 4
- [Trivial] Add method to retrieve mContentApps
- [Feature] Add Tests to Commissioner Discovery Controller
- [BUG] Can't group control for OpenThread device HOT 1
- [1.3] [TC-ACL-2,6] Event number is not propagated in yaml test cases HOT 4
- [CERT-TEST-FAILURE] [TC-DRLK-2.8] Automatic Test Case
- [CERT-TEST-FAILURE] [TC-DGEN-2.3, TC-BINFO-2.1] Failure to encode the yaml test step
- [Platform] linux(arm64) HOT 6
- [1.0] How to I can remote control with matter device ? HOT 1
- Create a Second Test Context for TestReadInteraction
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from connectedhomeip.