Skip to content

Commit

Permalink
gerg branch 'master' into metadataArgumentImplementation
Browse files Browse the repository at this point in the history
Merge master into current branch.
  • Loading branch information
vatsalghelani-csa committed Jun 17, 2024
2 parents 7f29f1d + 8b905ab commit ee5c871
Show file tree
Hide file tree
Showing 444 changed files with 33,654 additions and 14,019 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/test-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/thermostat-user-interface-configuration-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/thread-border-router-management-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/thread-network-diagnostics-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/time-format-localization-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml \
Expand Down Expand Up @@ -557,9 +558,9 @@ jobs:
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --quiet --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OVENOPSTATE_2_3.py" --script-args "--endpoint 1 --int-arg PIXIT.WAITTIME.COUNTDOWN:5 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --quiet --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OVENOPSTATE_2_4.py" --script-args "--endpoint 1 --int-arg PIXIT.OVENOPSTATE.ErrorEventGen:1 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --quiet --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_OVENOPSTATE_2_5.py" --script-args "--endpoint 1 --int-arg PIXIT.WAITTIME.REBOOT:5 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-microwave-oven-app --factoryreset --quiet --app-args "--discriminator 1234 --KVS kvs1 --trace_file json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_MWOCTRL_2_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-microwave-oven-app --factoryreset --quiet --app-args "--discriminator 1234 --KVS kvs1 --trace_file json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_MWOCTRL_2_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-microwave-oven-app --factoryreset --quiet --app-args "--discriminator 1234 --KVS kvs1 --trace_file json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_MWOCTRL_2_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-microwave-oven-app --factoryreset --quiet --app-args "--discriminator 1234 --KVS kvs1 --trace_file json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_MWOCTRL_2_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-microwave-oven-app --factoryreset --quiet --app-args "--discriminator 1234 --KVS kvs1 --trace_file json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_MWOCTRL_2_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-microwave-oven-app --factoryreset --quiet --app-args "--discriminator 1234 --KVS kvs1 --trace_file json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_MWOCTRL_2_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-microwave-oven-app --factoryreset --quiet --app-args "--discriminator 1234 --KVS kvs1 --trace_file json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_MWOM_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-rvc-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-rvc-app --factoryreset --quiet --app-args "--discriminator 1234 --KVS kvs1 --trace_file json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_RVCRUNM_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-rvc-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-rvc-app --factoryreset --quiet --app-args "--discriminator 1234 --KVS kvs1 --trace_file json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_RVCRUNM_2_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto --int-arg PIXIT.RVCRUNM.MODE_CHANGE_OK:0 PIXIT.RVCRUNM.MODE_CHANGE_FAIL:2"'
Expand Down
32 changes: 28 additions & 4 deletions credentials/generate-revocation-set.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from click_option_group import RequiredMutuallyExclusiveOptionGroup, optgroup
from cryptography import x509
from cryptography.hazmat.primitives.asymmetric import ec
from cryptography.x509.oid import NameOID

# Supported log levels, mapping string values required for argument
# parsing into logging constants
Expand Down Expand Up @@ -64,6 +65,32 @@ def extract_single_integer_attribute(subject, oid):
return None


def extract_fallback_tag_from_common_name(cn, marker):
val_len = 4
start_idx = cn.find(marker)

if start_idx != -1:
val_start_idx = start_idx + len(marker)
val = cn[val_start_idx:val_start_idx + val_len]
return int(val, 16) if len(val) == 4 else None

return None


def parse_vid_pid_from_distinguished_name(distinguished_name):
# VID/PID encoded using Matter specific RDNs
vid = extract_single_integer_attribute(distinguished_name, OID_VENDOR_ID)
pid = extract_single_integer_attribute(distinguished_name, OID_PRODUCT_ID)

# Fallback method to get the VID/PID, encoded in CN as "Mvid:FFFF Mpid:1234"
if vid is None and pid is None:
cn = distinguished_name.get_attributes_for_oid(NameOID.COMMON_NAME)[0].value
vid = extract_fallback_tag_from_common_name(cn, 'Mvid:')
pid = extract_fallback_tag_from_common_name(cn, 'Mpid:')

return vid, pid


class DCLDClient:
'''
A client for interacting with DCLD using either the REST API or command line interface (CLI).
Expand Down Expand Up @@ -248,14 +275,11 @@ def main(use_main_net_dcld: str, use_test_net_dcld: str, use_main_net_http: bool
is_paa = revocation_point["isPAA"]

# 3. && 4. Validate VID/PID
# TODO: Need to support alternate representation of VID/PID (see spec "6.2.2.2. Encoding of Vendor ID and Product ID in subject and issuer fields")
crl_vid = extract_single_integer_attribute(crl_signer_certificate.subject, OID_VENDOR_ID)
crl_pid = extract_single_integer_attribute(crl_signer_certificate.subject, OID_PRODUCT_ID)
crl_vid, crl_pid = parse_vid_pid_from_distinguished_name(crl_signer_certificate.subject)

if is_paa:
if crl_vid is not None:
if vid != crl_vid:
# TODO: Need to log all situations where a continue is called
logging.warning("VID is not CRL VID, continue...")
continue
else:
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/simulated_device_linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Now that the building is completed there is a `chip-app1` binary created. This
binary can be executed on a linux os with test commands.
```
./scripts/tests/yaml/runner.py [TEST NAME] app1
./scripts/tests/chipyaml/runner.py [TEST NAME] app1
```
## Interacting with the simulated app
Expand Down
77 changes: 0 additions & 77 deletions docs/testing/ChipDeviceCtrlAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@
- [ShutdownAll](#shutdownall)
- [ExpireSessions](#expiresessions)
- [DiscoverCommissionableNodes](#discovercommissionablenodes)
- [DiscoverCommissionableNodesLongDiscriminator](#discovercommissionablenodeslongdiscriminator)
- [DiscoverCommissionableNodesShortDiscriminator](#discovercommissionablenodesshortdiscriminator)
- [DiscoverCommissionableNodesVendor](#discovercommissionablenodesvendor)
- [DiscoverCommissionableNodesDeviceType](#discovercommissionablenodesdevicetype)
- [DiscoverCommissionableNodesCommissioningEnabled](#discovercommissionablenodescommissioningenabled)
- [PrintDiscoveredDevices](#printdiscovereddevices)
- [DiscoverAllCommissioning](#discoverallcommissioning)
- [OpenCommissioningWindow](#opencommissioningwindow)
- [GetFabricIdInternal](#getfabricidinternal)
- [GetNodeIdInternal](#getnodeidinternal)
Expand Down Expand Up @@ -174,76 +167,6 @@ This function will always return a list of CommissionableDevice. When
stopOnFirst is set, this function will return when at least one device is
discovered or on timeout.

<a id="chip.ChipDeviceCtrl.ChipDeviceControllerBase.DiscoverCommissionableNodesLongDiscriminator"></a>

#### DiscoverCommissionableNodesLongDiscriminator

```python
def DiscoverCommissionableNodesLongDiscriminator(long_discriminator)
```

Deprecated, use DiscoverCommissionableNodes

<a id="chip.ChipDeviceCtrl.ChipDeviceControllerBase.DiscoverCommissionableNodesShortDiscriminator"></a>

#### DiscoverCommissionableNodesShortDiscriminator

```python
def DiscoverCommissionableNodesShortDiscriminator(short_discriminator)
```

Deprecated, use DiscoverCommissionableNodes

<a id="chip.ChipDeviceCtrl.ChipDeviceControllerBase.DiscoverCommissionableNodesVendor"></a>

#### DiscoverCommissionableNodesVendor

```python
def DiscoverCommissionableNodesVendor(vendor)
```

Deprecated, use DiscoverCommissionableNodes

<a id="chip.ChipDeviceCtrl.ChipDeviceControllerBase.DiscoverCommissionableNodesDeviceType"></a>

#### DiscoverCommissionableNodesDeviceType

```python
def DiscoverCommissionableNodesDeviceType(device_type)
```

Deprecated, use DiscoverCommissionableNodes

<a id="chip.ChipDeviceCtrl.ChipDeviceControllerBase.DiscoverCommissionableNodesCommissioningEnabled"></a>

#### DiscoverCommissionableNodesCommissioningEnabled

```python
def DiscoverCommissionableNodesCommissioningEnabled()
```

Deprecated, use DiscoverCommissionableNodes

<a id="chip.ChipDeviceCtrl.ChipDeviceControllerBase.PrintDiscoveredDevices"></a>

#### PrintDiscoveredDevices

```python
def PrintDiscoveredDevices()
```

Deprecated, use GetCommissionableNodes

<a id="chip.ChipDeviceCtrl.ChipDeviceControllerBase.DiscoverAllCommissioning"></a>

#### DiscoverAllCommissioning

```python
def DiscoverAllCommissioning()
```

Deprecated, use DiscoverCommissionableNodes

<a id="chip.ChipDeviceCtrl.ChipDeviceControllerBase.OpenCommissioningWindow"></a>

#### OpenCommissioningWindow
Expand Down
8 changes: 4 additions & 4 deletions docs/testing/yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,12 +347,12 @@ Compile chip-tool:

NOTE: use the target appropriate to your system

[chiptool.py](https://github.com/project-chip/connectedhomeip/blob/master/scripts/tests/yaml/chiptool.py)
[chiptool.py](https://github.com/project-chip/connectedhomeip/blob/master/scripts/tests/chipyaml/chiptool.py)
can be used to run tests against a commissioned DUT (commissioned by chip-tool).
This will start an interactive instance of chip-tool automatically.

```
./scripts/tests/yaml/chiptool.py tests Test_TC_OO_2_1 --server_path ./out/linux-x64-chip-tool/chip-tool
./scripts/tests/chipyaml/chiptool.py tests Test_TC_OO_2_1 --server_path ./out/linux-x64-chip-tool/chip-tool
```

Expand All @@ -361,14 +361,14 @@ NOTE: substitute the appropriate test name and chip-tool path as appropriate.
A list of available tests can be generated using:

```
./scripts/tests/yaml/chiptool.py list
./scripts/tests/chipyaml/chiptool.py list
```

Config variables can be passed to chiptool.py after the script by separating
with --

```
./scripts/tests/yaml/chiptool.py tests Test_TC_OO_2_1 --server_path ./out/linux-x64-chip-tool/chip-tool -- nodeId 0x12344321
./scripts/tests/chipyaml/chiptool.py tests Test_TC_OO_2_1 --server_path ./out/linux-x64-chip-tool/chip-tool -- nodeId 0x12344321
```

Expand Down
1 change: 1 addition & 0 deletions docs/zap_clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ Generally regenerate using one of:
| 1070 | 0x42E | TotalVolatileOrganicCompoundsConcentrationMeasurement |
| 1071 | 0x42F | RadonConcentrationMeasurement |
| 1105 | 0x451 | WiFiNetworkManagement |
| 1106 | 0x452 | ThreadBorderRouterManagement |
| 1107 | 0x453 | ThreadNetworkDirectory |
| 1283 | 0x503 | WakeOnLan |
| 1284 | 0x504 | Channel |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -567,9 +567,9 @@ cluster NetworkCommissioning = 49 {
readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5;
readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6;
readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7;
readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8;
readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9;
readonly attribute optional int16u threadVersion = 10;
provisional readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8;
provisional readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9;
provisional readonly attribute optional int16u threadVersion = 10;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -567,9 +567,9 @@ cluster NetworkCommissioning = 49 {
readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5;
readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6;
readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7;
readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8;
readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9;
readonly attribute optional int16u threadVersion = 10;
provisional readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8;
provisional readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9;
provisional readonly attribute optional int16u threadVersion = 10;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Loading

0 comments on commit ee5c871

Please sign in to comment.