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

[DRLK] Return NOT_FOUND error for non-existent User on GetWeekdaySchedule/GetYeardaySchedule commands #28974

Merged
merged 7 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/app/clusters/door-lock-server/door-lock-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ void DoorLockServer::getWeekDayScheduleCommandHandler(chip::app::CommandHandler
{
ChipLogProgress(Zcl, "[GetWeekDaySchedule] User does not exist [endpointId=%d,weekDayIndex=%d,userIndex=%d]", endpointId,
weekDayIndex, userIndex);
sendGetWeekDayScheduleResponse(commandObj, commandPath, weekDayIndex, userIndex, DlStatus::kFailure);
sendGetWeekDayScheduleResponse(commandObj, commandPath, weekDayIndex, userIndex, DlStatus::kNotFound);
return;
}

Expand Down Expand Up @@ -1246,7 +1246,7 @@ void DoorLockServer::getYearDayScheduleCommandHandler(chip::app::CommandHandler
{
ChipLogProgress(Zcl, "[GetYearDaySchedule] User does not exist [endpointId=%d,yearDayIndex=%d,userIndex=%d]", endpointId,
yearDayIndex, userIndex);
sendGetYearDayScheduleResponse(commandObj, commandPath, yearDayIndex, userIndex, DlStatus::kFailure);
sendGetYearDayScheduleResponse(commandObj, commandPath, yearDayIndex, userIndex, DlStatus::kNotFound);
return;
}

Expand Down
12 changes: 6 additions & 6 deletions src/app/tests/suites/DL_Schedules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ tests:
- name: "UserIndex"
value: 2
- name: "Status"
value: 0x01
value: 0x8B

#
# Excercise SetYearDay schedules with invalid parameters
Expand Down Expand Up @@ -686,7 +686,7 @@ tests:
- name: "UserIndex"
value: 2
- name: "Status"
value: 0x01
value: 0x8B

#
# Excercise Set Holiday schedules with invalid parameters
Expand Down Expand Up @@ -1799,7 +1799,7 @@ tests:
- name: "UserIndex"
value: 1
- name: "Status"
value: 0x01
value: 0x8B

- label: "Make sure clearing first user also cleared year day schedules"
command: "GetYearDaySchedule"
Expand All @@ -1816,7 +1816,7 @@ tests:
- name: "UserIndex"
value: 1
- name: "Status"
value: 0x01
value: 0x8B

- label: "Make sure clearing second user also cleared week day schedules"
command: "GetWeekDaySchedule"
Expand All @@ -1833,7 +1833,7 @@ tests:
- name: "UserIndex"
value: 2
- name: "Status"
value: 0x01
value: 0x8B

- label: "Make sure clearing second user also cleared year day schedules"
command: "GetYearDaySchedule"
Expand All @@ -1850,7 +1850,7 @@ tests:
- name: "UserIndex"
value: 2
- name: "Status"
value: 0x01
value: 0x8B

# Make sure that all the manipulations did not affect the holiday schedules
- label: "Make sure that first holiday schedule was not deleted"
Expand Down
39 changes: 37 additions & 2 deletions src/app/tests/suites/certification/Test_TC_DRLK_2_5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,42 @@ tests:
constraints:
hasValue: false

- label: "Step 7: TH sends Clear Week Day Schedule Command to DUT"
- label:
"Step 7: TH sends Get Week Day Schedule Command to DUT for
non-existent User"
PICS: DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx
command: "GetWeekDaySchedule"
arguments:
values:
- name: "WeekDayIndex"
value: 1
- name: "UserIndex"
value: 2
response:
values:
- name: "WeekDayIndex"
value: 1
- name: "UserIndex"
value: 2
- name: "Status"
value: 0x8B
- name: "DaysMask"
constraints:
hasValue: false
- name: "StartHour"
constraints:
hasValue: false
- name: "StartMinute"
constraints:
hasValue: false
- name: "EndHour"
constraints:
hasValue: false
- name: "EndMinute"
constraints:
hasValue: false

- label: "Step 8: TH sends Clear Week Day Schedule Command to DUT"
PICS: DRLK.S.F04 && DRLK.S.C0d.Rsp
command: "ClearWeekDaySchedule"
arguments:
Expand All @@ -222,7 +257,7 @@ tests:
- name: "UserIndex"
value: 1

- label: "Step 8: TH sends Get Week Day Schedule Command to DUT"
- label: "Step 9: TH sends Get Week Day Schedule Command to DUT"
PICS: DRLK.S.F04 && DRLK.S.C0c.Rsp && DRLK.S.C0c.Tx
command: "GetWeekDaySchedule"
arguments:
Expand Down
28 changes: 27 additions & 1 deletion src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,33 @@ tests:
constraints:
minValue: 1081

- label: "Step 12: TH sends Clear Year Day Schedule to DUT"
- label:
"Step 12: TH sends Get Year Day Schedule Command to DUT for
non-existent User"
PICS: DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx
command: "GetYearDaySchedule"
arguments:
values:
- name: "YearDayIndex"
value: 1
- name: "UserIndex"
value: 2
response:
values:
- name: "YearDayIndex"
value: 1
- name: "UserIndex"
value: 2
- name: "Status"
value: 0x8B
- name: "LocalStartTime"
constraints:
hasValue: false
- name: "LocalEndTime"
constraints:
hasValue: false

- label: "Step 13: TH sends Clear Year Day Schedule to DUT"
PICS: DRLK.S.F0a && DRLK.S.C10.Rsp
command: "ClearYearDaySchedule"
arguments:
Expand Down
Loading