[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] tests: Add tmp105 unit test
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] tests: Add tmp105 unit test |
Date: |
Thu, 13 Dec 2012 00:17:30 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
Am 12.12.2012 20:43, schrieb Blue Swirl:
> On Wed, Dec 12, 2012 at 6:29 AM, Andreas Färber <address@hidden> wrote:
>> +static void omap_i2c_send(uint8_t addr, const void *buf, uint16_t len)
>
> With const uint8_t *buf you could avoid a few casts below.
Good idea, thanks. I was working with other data types before, where
void* saved casts.
>> + qtest_add_func("/tmp105/tx-rx", send_and_receive);
>
> A register fuzzing test (like rtc-test.c) would be nice too.
I'm aware of your register fuzzing tests. However we do not directly
access registers of the tmp105, so those should go into an
omap_i2c-test.c file instead if someone wants to ever test that
implementation.
Alex H. has pointed to some more real-world test cases which I'd invite
him to add here as follow-ups.
My quest for tonight will be to generalize the I2C API for libqos by
comparing the tegra_i2c implementation. I hope my omap_i2c_* API is
pretty close already if we add one parameter for an adapter struct.
Andreas