Skip to content

Commit 0935eac

Browse files
authored
Merge branch 'master' into fix_dnssd_INTEGER_OVERFLOW
2 parents 9027b33 + a3a443a commit 0935eac

File tree

8 files changed

+33
-20
lines changed

8 files changed

+33
-20
lines changed

docs/testing/fuzz_testing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ for an example of a simple fuzz test.
7979
- Another example:
8080
[src/setup_payload/tests/BUILD.gn](https://github.com/project-chip/connectedhomeip/blob/b367512f519e5e109346e81a0d84fd85cd9192f7/src/setup_payload/tests/BUILD.gn#L43)
8181
82-
- Add to `src/BUILD.gn`
82+
- Add to `${chip_root}/BUILD.gn`
8383
8484
- Add the Fuzzing Target in this part of the code :
85-
[src/BUILD.gn](https://github.com/project-chip/connectedhomeip/blob/b367512f519e5e109346e81a0d84fd85cd9192f7/BUILD.gn#L52)
85+
[\${chip_root}/BUILD.gn](https://github.com/project-chip/connectedhomeip/blob/b367512f519e5e109346e81a0d84fd85cd9192f7/BUILD.gn#L52)
8686
8787
- Add Fuzzing Target like that
8888

docs/testing/python.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Each `Clusters.<ClusterName>.Structs.<StructName>` has:
217217

218218
Example:
219219

220-
```
220+
```python
221221
Clusters.BasicInformation.Structs.ProductAppearanceStruct(
222222
finish=Clusters.BasicInformation.Enums.ProductFinishEnum.kFabric,
223223
primaryColor=Clusters.BasicInformation.Enums.ColorEnum.kBlack)
@@ -293,7 +293,7 @@ Multi-path
293293

294294
Example:
295295

296-
```
296+
```python
297297
urgent = 1
298298

299299
await dev_ctrl ReadEvent(node_id, [(1,
@@ -359,7 +359,7 @@ asserts.assert_equal(ret[0].status, Status.Success, “write failed”)
359359

360360
Example:
361361

362-
```
362+
```python
363363
pai = await dev_ctrl.SendCommand(nodeid, 0, Clusters.OperationalCredentials.Commands.CertificateChainRequest(2))
364364
```
365365

@@ -387,7 +387,7 @@ class provides some helpers for Mobly integration.
387387

388388
use as:
389389

390-
```
390+
```python
391391
if __name__ == "__main__":
392392
default_matter_test_main()
393393
```
@@ -479,7 +479,7 @@ See
479479

480480
To create a controller on a new fabric:
481481

482-
```
482+
```python
483483
new_CA = self.certificate_authority_manager.NewCertificateAuthority()
484484

485485
new_fabric_admin = new_certificate_authority.NewFabricAdmin(vendorId=0xFFF1,
@@ -490,7 +490,7 @@ TH2 = new_fabric_admin.NewController(nodeId=112233)
490490

491491
Open a commissioning window (ECW):
492492

493-
```
493+
```python
494494
params = self.OpenCommissioningWindow(dev_ctrl=self.default_controller, node_id=self.dut_node_id)
495495
```
496496

@@ -499,7 +499,7 @@ the fabric admin.
499499

500500
Fabric admin for default controller:
501501

502-
```
502+
```python
503503
fa = self.certificate_authority_manager.activeCaList[0].adminList[0]
504504
second_ctrl = fa.new_fabric_admin.NewController(nodeId=node_id)
505505
```
@@ -577,13 +577,13 @@ running. To compile and install the wheel, do the following:
577577

578578
First activate the matter environment using either
579579

580-
```
580+
```shell
581581
. ./scripts/bootstrap.sh
582582
```
583583

584584
or
585585

586-
```
586+
```shell
587587
. ./scripts/activate.sh
588588
```
589589

@@ -592,7 +592,7 @@ subsequent setups as it is faster.
592592

593593
Next build the python wheels and create / activate a venv
594594

595-
```
595+
```shell
596596
./scripts/build_python.sh -i out/python_env
597597
source out/python_env/bin/activate
598598
```
@@ -609,15 +609,15 @@ that will be commissioned either over BLE or WiFi.
609609

610610
For example, to run the TC-ACE-1.2 tests against an un-commissioned DUT:
611611

612-
```
612+
```shell
613613
python3 src/python_testing/TC_ACE_1_2.py --commissioning-method on-network --qr-code MT:-24J0AFN00KA0648G00
614614
```
615615

616616
Some tests require additional arguments (ex. PIXITs or configuration variables
617617
for the CI). These arguments can be passed as sets of key/value pairs using the
618618
`--<type>-arg:<value>` command line arguments. For example:
619619

620-
```
620+
```shell
621621
--int-arg PIXIT.ACE.APPENDPOINT:1 --int-arg PIXIT.ACE.APPDEVTYPEID:0x0100 --string-arg PIXIT.ACE.APPCLUSTER:OnOff --string-arg PIXIT.ACE.APPATTRIBUTE:OnOff
622622
```
623623

docs/testing/yaml.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -330,12 +330,11 @@ or
330330
bootstrap.sh should be used for for the first setup, activate.sh may be used for
331331
subsequent setups as it is faster.
332332

333-
Next build the python wheels and create a venv (called `py` here, but any name
334-
may be used)
333+
Next build the python wheels and create a venv
335334

336335
```
337336
./scripts/build_python.sh -i out/python_env
338-
source py/bin/activate
337+
source out/python_env/bin/activate
339338
```
340339

341340
Compile chip-tool:

examples/chef/common/clusters/temperature-control/static-supported-temperature-levels.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#ifdef MATTER_DM_PLUGIN_TEMPERATURE_CONTROL_SERVER
2222
#include "static-supported-temperature-levels.h"
2323
#include <app/clusters/temperature-control-server/supported-temperature-levels-manager.h>
24+
#include <lib/support/CodeUtils.h>
2425

2526
using namespace chip;
2627
using namespace chip::app::Clusters;

integrations/cloudbuild/chef.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ steps:
2929
args:
3030
- >-
3131
perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt &&
32-
./examples/chef/chef.py --build_all --build_exclude noip
32+
./examples/chef/chef.py --build_all --build_exclude "noip|temperaturecontrolledcabinet"
3333
id: CompileAll
3434
waitFor:
3535
- Bootstrap

scripts/build/builders/host.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def ExamplePath(self):
159159
elif self == HostApp.ENERGY_MANAGEMENT:
160160
return 'energy-management-app/linux'
161161
elif self == HostApp.WATER_LEAK_DETECTOR:
162-
return 'water-leak-detector/linux'
162+
return 'water-leak-detector-app/linux'
163163
else:
164164
raise Exception('Unknown app type: %r' % self)
165165

src/lib/shell/MainLoopDefault.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ size_t ReadLine(char * buffer, size_t max)
5757
break;
5858
}
5959

60+
// Stop the loop if the input stream is closed.
61+
if (ret == 0)
62+
{
63+
if (line_sz > 0)
64+
// Return current buffer if it is not empty.
65+
buffer[line_sz++] = '\0';
66+
break;
67+
}
68+
6069
if (ret != 1)
6170
continue;
6271

src/system/SystemTimer.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,11 @@ class TimerPool
204204
Timer * Create(Layer & systemLayer, System::Clock::Timestamp awakenTime, TimerCompleteCallback onComplete, void * appState)
205205
{
206206
Timer * timer = mTimerPool.CreateObject(systemLayer, awakenTime, onComplete, appState);
207-
SYSTEM_STATS_INCREMENT(Stats::kSystemLayer_NumTimers);
207+
if (timer != nullptr)
208+
{
209+
SYSTEM_STATS_INCREMENT(Stats::kSystemLayer_NumTimers);
210+
}
211+
208212
return timer;
209213
}
210214

0 commit comments

Comments
 (0)