[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 11/21] test/avocado/machine_aspeed.py: Add an I2C RTC test
From: |
Joel Stanley |
Subject: |
Re: [PATCH 11/21] test/avocado/machine_aspeed.py: Add an I2C RTC test |
Date: |
Mon, 6 Jun 2022 23:16:25 +0000 |
On Mon, 6 Jun 2022 at 15:08, Cédric Le Goater <clg@kaod.org> wrote:
>
> Add a RTC device on bus 15 and check that the ouput of the hwclock
spelling: output
> command matches the current year.
>
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Joel Stanley <joel@jms.id.au>
> ---
> tests/avocado/machine_aspeed.py | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py
> index a3b4b9e5093c..28b8a4c8124b 100644
> --- a/tests/avocado/machine_aspeed.py
> +++ b/tests/avocado/machine_aspeed.py
> @@ -136,10 +136,18 @@ def test_arm_ast2600_evb_builroot(self):
>
> self.vm.add_args('-device',
> 'tmp423,bus=aspeed.i2c.bus.15,address=0x4c');
> + self.vm.add_args('-device',
> + 'ds1338,bus=aspeed.i2c.bus.15,address=0x32');
Is there any value running this on the 2400 and 2500 machine types
too? They all use the same model so perhaps not?
> 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');
>
> + exec_command_and_wait_for_pattern(self,
> + 'echo ds1307 0x32 >
> /sys/class/i2c-dev/i2c-15/device/new_device',
> + 'i2c i2c-15: new_device: Instantiated device ds1307 at 0x32');
> + year = time.strftime("%Y")
> + exec_command_and_wait_for_pattern(self, 'hwclock -f /dev/rtc1',
> year);
> +
> self.do_test_arm_aspeed_buidroot_poweroff()
> --
> 2.35.3
>
- Re: [PATCH 04/21] aspeed: i2c: Use reg array instead of individual vars, (continued)
- [PATCH 06/21] aspeed: i2c: Add PKT_DONE IRQ to trace, Cédric Le Goater, 2022/06/06
- [PATCH 05/21] aspeed: i2c: Add new mode support, Cédric Le Goater, 2022/06/06
- [PATCH 07/21] aspeed: i2c: Move regs and helpers to header file, Cédric Le Goater, 2022/06/06
- [PATCH 08/21] test/avocado/machine_aspeed.py: Move OpenBMC tests, Cédric Le Goater, 2022/06/06
- [PATCH 09/21] test/avocado/machine_aspeed.py: Add tests using buildroot images, Cédric Le Goater, 2022/06/06
- [PATCH 10/21] test/avocado/machine_aspeed.py: Add I2C tests to ast2600-evb, Cédric Le Goater, 2022/06/06
- [PATCH 11/21] test/avocado/machine_aspeed.py: Add an I2C RTC test, Cédric Le Goater, 2022/06/06
- Re: [PATCH 11/21] test/avocado/machine_aspeed.py: Add an I2C RTC test,
Joel Stanley <=
- [PATCH 12/21] aspeed/i2c: Add ast1030 controller models, Cédric Le Goater, 2022/06/06
- [PATCH 13/21] aspeed: Add I2C buses to AST1030 model, Cédric Le Goater, 2022/06/06
- [PATCH 14/21] hw/i2c/aspeed: rework raise interrupt trace event, Cédric Le Goater, 2022/06/06
- [PATCH 15/21] hw/i2c/aspeed: add DEV_ADDR in old register mode, Cédric Le Goater, 2022/06/06
- [PATCH 16/21] hw/i2c: support multiple masters, Cédric Le Goater, 2022/06/06
- [PATCH 17/21] hw/i2c: add asynchronous send, Cédric Le Goater, 2022/06/06