Skip to content
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

[TC-LUNIT-3.1]When TH writes TemperatureUnit attribute value more than 2, DUT responds as success instead CONSTRAINT_ERROR. #20879

Closed
Rajashreekalmane opened this issue Jul 18, 2022 · 4 comments · Fixed by #21003
Assignees

Comments

@Rajashreekalmane
Copy link

Test Case ID
[TC-LUNIT-3.1] Read and Write Unit Localization Cluster Attributes [{DUT_Server}]

Describe the issue:-
As per test-plan test step 8 is expecting to write 5 to TemperatureUnit attribute from TH to DUT, DUT should responds with constraint error But currently it is responding as success.

expected behavior:-CONSTRAINT_ERROR(0x87)

  • actual behavior:-Success(0x00)
  • steps to reproduce:-./chip-tool unitlocalization write temperature-unit 5 1 0
  • system configuration
    Chip-tool - RPI-4, 8GB RAM
    DUT - RPI - RPI-4, 8GB RAM
    Platform : IP and wifi
    Commit-ID:0390a8d33b1d1c709fcc4499eab6e132428ad5e2
    Dut application: all-clusters-app

Test-plan Reference:-
https://github.com/CHIP-Specifications/chip-test-plans/blob/master/src/cluster/unitlocalization.adoc#tc-lunit-3-1-read-and-write-unit-localization-cluster-attributes-dut_server

Spec Reference:-
https://github.com/CHIP-Specifications/connectedhomeip-spec/blob/master/src/service_device_management/LocalizationUnit.adoc#data-types

PFA logs:-
[TC-LUNIT-3.1].txt

@Rajashreekalmane
Copy link
Author

For TemperatureUnit attribute should support only 0, 1, and 2 but currently If we try to write 3 to 255, the response is Success

@andy31415
Copy link
Contributor

Seems very similar with CONSTRAINT_ERROR that we had to return for ACLs.

Taking this for now to see if we can get some generic solution (I would like to convert any INVALID_ARGUMENT into CONSTRAINT_ERROR).

I will also have to implement validation for the temperature values, I believe those will have to return INVALID_ARGUMENT interally.

@andy31415 andy31415 self-assigned this Jul 20, 2022
@andy31415
Copy link
Contributor

It seems these unit tests were not automated. I will automate this one for now.

@andy31415
Copy link
Contributor

andy31415 commented Jul 20, 2022

I automated 3_1 yaml fully.

It turns out this is not returning internal code that would result in a CHIP_ERROR, so no centralized solution was needed for this specifically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants