Skip to content

Commit f845b45

Browse files
committed
Merge branch 'master' into optional-trivial-destructible
2 parents 6eb101b + 448930e commit f845b45

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1233
-510
lines changed

.github/.wordlist.txt

-1
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,6 @@ js
757757
json
758758
JTAG
759759
Jupyter
760-
judgement
761760
jupyterlab
762761
KA
763762
kAdminister

.github/PULL_REQUEST_TEMPLATE.md

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
> !!!!!!!!!! Please delete the instructions below and replace with PR description
1+
> !!!!!!!!!! Please delete the instructions below and replace with PR
2+
> description
23
>
3-
> If you have an issue number, please use a syntax of
4-
> `Fixes #12345` and a brief change description
4+
> If you have an issue number, please use a syntax of `Fixes #12345` and a brief
5+
> change description
56
>
6-
> If you do not have an issue number, please have a good description of
7-
> the problem and the fix. Help the reviewer understand what to expect.
7+
> If you do not have an issue number, please have a good description of the
8+
> problem and the fix. Help the reviewer understand what to expect.
89
>
9-
> Add a `### Testing` section to your PR to describe how testing was done.
10-
> See <https://github.com/project-chip/connectedhomeip/blob/master/CONTRIBUTING.md#pull-requests>
10+
> Complete/append to the `### Testing` section below, to describe how testing
11+
> was done. See
12+
> <https://github.com/project-chip/connectedhomeip/blob/master/CONTRIBUTING.md#pull-requests>
1113
>
1214
> Make sure you delete these instructions (to prove you have read them).
1315
>
1416
> !!!!!!!!!! Instructions end
17+
18+
#### Testing

.github/workflows/cancel_workflows_for_pr.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,4 @@ jobs:
4949
--require "Lint Code Base" \
5050
--require "ZAP" \
5151
--require "Run misspell" \
52-
--require "PR validity" \
5352
--max-pr-age-minutes 20

.github/workflows/pr-validation.yaml

+10-3
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,25 @@ jobs:
88
check_testing_header:
99
runs-on: ubuntu-latest
1010
steps:
11-
1211
- name: Check for `### Testing` section in PR
1312
id: check-testing
1413
continue-on-error: true
1514
run: |
16-
python -c 'import sys; pr_summary = """${{ github.event.pull_request.body }}"""; sys.exit(0 if "### Testing" in pr_summary else 1)'
15+
cat >/tmp/pr-summary.txt << "EndMarkerForPrSummary"
16+
${{ github.event.pull_request.body }}
17+
EndMarkerForPrSummary
18+
19+
python -c 'import sys; pr_summary = open("/tmp/pr-summary.txt", "rt").read(); sys.exit(0 if "### Testing" in pr_summary else 1)'
1720
1821
- name: Check for PR starting instructions
1922
id: check-instructions
2023
continue-on-error: true
2124
run: |
22-
python -c 'import sys; pr_summary = """${{ github.event.pull_request.body }}"""; sys.exit(1 if "Make sure you delete these instructions" in pr_summary else 0)'
25+
cat >/tmp/pr-summary.txt << "EndMarkerForPrSummary"
26+
${{ github.event.pull_request.body }}
27+
EndMarkerForPrSummary
28+
29+
python -c 'import sys; pr_summary = open("/tmp/pr-summary.txt", "rt").read(); sys.exit(1 if "Make sure you delete these instructions" in pr_summary else 0)'
2330
2431
# NOTE: comments disabled for now as separate permissions are required
2532
# failing CI step may be sufficient to start (although it contains less information about why it failed)

CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -198,13 +198,13 @@ to open the pull request for details or open additional issue in GitHub)
198198
Ensure that there is sufficient detail in issue summaries to make the content of
199199
the PR clear:
200200

201-
- a `TLDR` of the change content. This is a judgement call on details,
201+
- a `TLDR` of the change content. This is a judgment call on details,
202202
generally you should include a what was changed and why. The change is
203203
trivial/short, this can be very short (i.e. "fixed typos" is perfectly
204204
acceptable, however if changing 100-1000s of line, the areas of changes
205205
should be explained)
206206
- If a crash/error is fixed, explain the root cause and if the fix is not
207-
obvious (again, judgement call), explain why the given approach was taken.
207+
obvious (again, judgment call), explain why the given approach was taken.
208208
- Help the reviewer out with any notable information (specific platform
209209
issues, extra thoughts or requests for feedback or gotchas on tricky code,
210210
followup work or PR dependencies)
@@ -230,7 +230,7 @@ out of convenience.
230230
updated to cover functionality" or "existing tests already cover this" (make
231231
sure they do. Integration tests often only cover happy paths).
232232

233-
Add any notes on not covered things. It is a judgement call on how much can
233+
Add any notes on not covered things. It is a judgment call on how much can
234234
be covered as 100% sounds great however not always possible.
235235

236236
- Manual testing
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
*
3+
* Copyright (c) 2024 Project CHIP Authors
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
#include <app/clusters/software-diagnostics-server/SoftwareDiagnosticsTestEventTriggerHandler.h>
19+
#include <app/clusters/software-diagnostics-server/software-diagnostics-server.h>
20+
#include <platform/CHIPDeviceLayer.h>
21+
#include <platform/DiagnosticDataProvider.h>
22+
23+
using namespace chip;
24+
using namespace chip::app;
25+
using namespace chip::DeviceLayer;
26+
27+
namespace {
28+
29+
void SetTestEventTrigger_SoftwareFaultOccurred()
30+
{
31+
Clusters::SoftwareDiagnostics::Events::SoftwareFault::Type softwareFault;
32+
char threadName[kMaxThreadNameLength + 1];
33+
34+
softwareFault.id = static_cast<uint64_t>(getpid());
35+
Platform::CopyString(threadName, std::to_string(softwareFault.id).c_str());
36+
37+
softwareFault.name.SetValue(CharSpan::fromCharString(threadName));
38+
39+
std::time_t result = std::time(nullptr);
40+
// Using size of 50 as it is double the expected 25 characters "Www Mmm dd hh:mm:ss yyyy\n".
41+
char timeChar[50];
42+
if (std::strftime(timeChar, sizeof(timeChar), "%c", std::localtime(&result)))
43+
{
44+
softwareFault.faultRecording.SetValue(ByteSpan(Uint8::from_const_char(timeChar), strlen(timeChar)));
45+
}
46+
47+
Clusters::SoftwareDiagnosticsServer::Instance().OnSoftwareFaultDetect(softwareFault);
48+
}
49+
50+
} // namespace
51+
52+
bool HandleSoftwareDiagnosticsTestEventTrigger(uint64_t eventTrigger)
53+
{
54+
SoftwareDiagnosticsTrigger trigger = static_cast<SoftwareDiagnosticsTrigger>(eventTrigger);
55+
56+
switch (trigger)
57+
{
58+
case SoftwareDiagnosticsTrigger::kSoftwareFault:
59+
ChipLogProgress(Support, "[Software-Diagnostics-Test-Event] => Software Fault occurred");
60+
SetTestEventTrigger_SoftwareFaultOccurred();
61+
break;
62+
default:
63+
64+
return false;
65+
}
66+
67+
return true;
68+
}

examples/all-clusters-app/linux/BUILD.gn

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ source_set("chip-all-clusters-common") {
5656
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp",
5757
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/rvc-operational-state-delegate-impl.cpp",
5858
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp",
59+
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/software-diagnostics-stub.cpp",
5960
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp",
6061
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp",
6162
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/tcc-mode.cpp",

examples/all-clusters-app/linux/args.gni

+1
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ matter_log_json_payload_hex = true
3030
chip_enable_smoke_co_trigger = true
3131
chip_enable_boolean_state_configuration_trigger = true
3232
chip_enable_water_heater_management_trigger = true
33+
chip_enable_software_diagnostics_trigger = true

examples/java-matter-controller/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ system or not. In order to install the Java Runtime Environment on your system,
3030
run the following command as root:
3131

3232
```
33-
sudo apt install default-jre Install Java default JRE
33+
sudo apt install default-jre
3434
```
3535

3636
After installing the JRE, let us check if we have the Java Development Kit

examples/network-manager-app/network-manager-common/network-manager-app.matter

+4-4
Original file line numberDiff line numberDiff line change
@@ -1549,7 +1549,7 @@ provisional cluster ThreadNetworkDirectory = 1107 {
15491549
}
15501550

15511551
endpoint 0 {
1552-
device type ma_rootdevice = 22, version 1;
1552+
device type ma_rootdevice = 22, version 3;
15531553

15541554

15551555
server cluster Descriptor {
@@ -1615,7 +1615,7 @@ endpoint 0 {
16151615
callback attribute acceptedCommandList;
16161616
callback attribute attributeList;
16171617
ram attribute featureMap default = 0;
1618-
ram attribute clusterRevision default = 3;
1618+
ram attribute clusterRevision default = 4;
16191619
}
16201620

16211621
server cluster GeneralCommissioning {
@@ -1628,7 +1628,7 @@ endpoint 0 {
16281628
callback attribute acceptedCommandList;
16291629
callback attribute attributeList;
16301630
ram attribute featureMap default = 0;
1631-
ram attribute clusterRevision default = 1;
1631+
ram attribute clusterRevision default = 2;
16321632

16331633
handle command ArmFailSafe;
16341634
handle command ArmFailSafeResponse;
@@ -1699,7 +1699,7 @@ endpoint 0 {
16991699
callback attribute acceptedCommandList;
17001700
callback attribute attributeList;
17011701
ram attribute featureMap default = 0;
1702-
ram attribute clusterRevision default = 2;
1702+
ram attribute clusterRevision default = 3;
17031703
}
17041704

17051705
server cluster WiFiNetworkDiagnostics {

0 commit comments

Comments
 (0)