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-DA-1.2] - python script is failing at Test Step 2 #27287

Closed
Rajashreekalmane opened this issue Jun 16, 2023 · 5 comments
Closed

[TC-DA-1.2] - python script is failing at Test Step 2 #27287

Rajashreekalmane opened this issue Jun 16, 2023 · 5 comments

Comments

@Rajashreekalmane
Copy link

Rajashreekalmane commented Jun 16, 2023

Summary:
TC_DA_1.2 test case is failing while sending AttestationRequest at test step 2


[MatterTest] 06-16 14:46:17.460 INFO [Test] test_TC_DA_1_2
[MatterTest] 06-16 14:46:17.461 INFO ***** Test Step 0 : Commissioning, already done
[MatterTest] 06-16 14:46:17.461 INFO ***** Test Step 1 : Generate 32-byte nonce
[MatterTest] 06-16 14:46:17.461 INFO ***** Test Step 2 : Send AttestationRequest
[1686906977.462240][150171:150175] CHIP:DIS: Found an existing secure session to [1:0000000012344321]!
[1686906977.462750][150171:150175] CHIP:EM: <<< [E:46118i S:17909 M:242122262] (S) Msg TX to 1:0000000012344321 [8914] --- Type 0001:08 (IM:InvokeCommandRequest)
[1686906977.462776][150171:150175] CHIP:IN: (S) Sending msg 242122262 on secure session with LSID: 17909
[1686906977.684382][150171:150175] CHIP:EM: >>> [E:46118i S:17909 M:172150126 (Ack:242122262)] (S) Msg RX from 1:0000000012344321 [8914] --- Type 0000:10 (SecureChannel:StandaloneAck)
[1686906977.689654][150171:150175] CHIP:EM: >>> [E:46118i S:17909 M:172150127 (Ack:242122262)] (S) Msg RX from 1:0000000012344321 [8914] --- Type 0001:09 (IM:InvokeCommandResponse)
[1686906977.689859][150171:150175] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0001
[1686906977.695370][150171:150175] CHIP:EM: <<< [E:46118i S:17909 M:242122263 (Ack:172150127)] (S) Msg TX to 1:0000000012344321 [8914] --- Type 0000:10 (SecureChannel:StandaloneAck)
[1686906977.695423][150171:150175] CHIP:IN: (S) Sending msg 242122263 on secure session with LSID: 17909
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.10/logging/__init__.py", line 1100, in emit
    msg = self.format(record)
  File "/usr/lib/python3.10/logging/__init__.py", line 943, in format
    return fmt.format(record)
  File "/usr/lib/python3.10/logging/__init__.py", line 678, in format
    record.message = record.getMessage()
  File "/usr/lib/python3.10/logging/__init__.py", line 368, in getMessage
    msg = msg % self.args
TypeError: %d format: a real number is required, not str
Call stack:
  File "/home/grl/May30/connectedhomeip/src/python_testing/TC_DA_1_2.py", line 391, in <module>
    default_matter_test_main()
  File "/home/grl/May30/connectedhomeip/src/python_testing/matter_testing_support.py", line 943, in default_matter_test_main
    runner.run()

Reproduction steps:
Setting up the environment :
Step 1 : cloned Connectedhomeip using mentioned command : git clone https://github.com/project-chip/connectedhomeip.git
step 2 : cd connectedhomeip
step 3 : pulled latest commit
step 4: source scripts/bootstrap.sh
step 5 : ./scripts/build_python.sh --install_wheel build-env
step 6 : source scripts/activate.sh

executed the below mentioned command to put DUT into a commissionable state,
./chip-all-clusters-app
Once DUT reach the commissionable state sent below mentioned command on TH.
rm -f admin_storage.json && python3 TC_DA_1_2.py --discriminator 3840 --passcode 20202021 --commissioning-method on-network --paa-trust-store-path /paa_roots --storage-path admin_storage.json

system configuration
Chip-tool - Linux
DUT - RPI
Commit-ID : 40fb7c2
Dut application: all-clusters-app

PFA logs below
TC_DA_1_2.txt
TC_DA_1.2_DUT.txt

@bzbarsky-apple
Copy link
Contributor

The relevant line is:

            logging.info("Starting commissioning for root index %d, fabric ID 0x%016X, node ID 0x%016X" %
                         (conf.root_of_trust_index, conf.fabric_id, node_id))

and presumably the problem is that conf.root_of_trust_index is somehow a string, not a number, in spite of being declared like so: root_of_trust_index: int.

@tcarmelveilleux
Copy link
Contributor

This was always working before. There must be something new that got broken from someone else's PR

@cecille
Copy link
Contributor

cecille commented Jun 16, 2023

The many print errors are coming from a bad merge or something on the update to the matter testing support - print step can now take either a string or an int, but it got changed back by accident.

That all is a red herring though - I believe the real error is here:

File "/home/grl/May30/connectedhomeip/src/python_testing/TC_DA_1_2.py", line 256, in test_TC_DA_1_2
asserts.assert_in(vendor_id, range(1, 0xfff0), "Vendor ID is out of range")
File "/home/grl/May30/connectedhomeip/.environment/pigweed-venv/lib/python3.10/site-packages/mobly/asserts.py", line 149, in assert_in
_call_unittest_assertion(_pyunit_proxy.assertIn,
File "/home/grl/May30/connectedhomeip/.environment/pigweed-venv/lib/python3.10/site-packages/mobly/asserts.py", line 52, in _call_unittest_assertion
raise signals.TestFailure(my_msg, extras=extras)

@cecille
Copy link
Contributor

cecille commented Jun 16, 2023

AKA, I think you're using a test vendor ID. You can bypass that check for dev and in the CI by using the PICS_SDK_CI_ONLY PICS, but for real cert the vendor ID needs to be the manufacturer assigned vendor ID, which is not in that range

tcarmelveilleux pushed a commit to tcarmelveilleux/connectedhomeip that referenced this issue Jun 16, 2023
- Silent stacktraces were red herrings because step printing got
  broken by a bad merge.

Issue project-chip#27287
andy31415 pushed a commit that referenced this issue Jun 16, 2023
- Silent stacktraces were red herrings because step printing got
  broken by a bad merge.

Issue #27287

Co-authored-by: [email protected] <[email protected]>
@Rajashreekalmane
Copy link
Author

Rajashreekalmane commented Jun 20, 2023

Above described issue resolved in latest Commit : f5c4621

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

No branches or pull requests

4 participants