qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 10/21] test/avocado/machine_aspeed.py: Add I2C tests to ast2600-e


From: Cédric Le Goater
Subject: [PATCH 10/21] test/avocado/machine_aspeed.py: Add I2C tests to ast2600-evb
Date: Mon, 6 Jun 2022 17:07:21 +0200

Add a temperature tmp423 sensor device on bus 15 and check that the
device and manufacturer id registers contain the expected values.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 tests/avocado/machine_aspeed.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py
index 5374e7fad17a..a3b4b9e5093c 100644
--- a/tests/avocado/machine_aspeed.py
+++ b/tests/avocado/machine_aspeed.py
@@ -134,5 +134,12 @@ def test_arm_ast2600_evb_builroot(self):
         image_path = self.fetch_asset(image_url, asset_hash=image_hash,
                                       algorithm='sha256')
 
+        self.vm.add_args('-device',
+                         'tmp423,bus=aspeed.i2c.bus.15,address=0x4c');
         self.do_test_arm_aspeed_buidroot_start(image_path, '0xf00')
+        exec_command_and_wait_for_pattern(self,
+                                          'i2cget -y 15 0x4c 0xff', '0x23');
+        exec_command_and_wait_for_pattern(self,
+                                          'i2cget -y 15 0x4c 0xfe', '0x55');
+
         self.do_test_arm_aspeed_buidroot_poweroff()
-- 
2.35.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]