Hello Anthony, Here's my enhanced attempt to resolve our QTest endianness crisis. :)
Patch 1 fixes some minor type inconsistencies I noticed in qtest.c. Patch 2 uses helpers to fix libi2c-omap.c asserting on Big Endian hosts. Patch 3 improves the readability of assertions in tmp105-test.c. Patch 4 adds debug output to tmp105.c to verify my changes. Patch 5 reimplements my helpers for QTest. Some notes on the implementation: * Only readw and writew were tested, only on x86_64 so far. May need swapping. * gtk-doc and protocol documentation is left out. * I chose read[bwlq] over mmio_read[bwlq] since we're not using pio_in[bwl]. Patch 4 is kind of a v2 to my debug output revamp RFC. Regards, Andreas v1 -> v2: * Rename helpers from omap_i2c_{read,write}16() to {read,write}w(). * Clarify STAT vs. DATA, add an assertion to avoid unused variable warning. * Add patch with debug output for tmp105.c. * Add patch with strtoul() cleanups. * Add proposal for QTest-level {read,write}w support. Cc: Anthony Liguori <anth...@codemonkey.ws> Cc: Blue Swirl <blauwir...@gmail.com> Cc: Alexander Graf <ag...@suse.de> Cc: Peter Maydell <peter.mayd...@linaro.org> Andreas Färber (5): qtest: Use strtoull() for uint64_t libi2c-omap: Fix endianness dependency tmp105-test: Combine assertions of 16-bit responses tmp105: Add debug output qtest: Add MMIO support hw/tmp105.c | 27 +++++++++++++++++++++-- qtest.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++---- tests/libi2c-omap.c | 53 +++++++++++++++++++++++++------------------- tests/libqtest.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++ tests/libqtest.h | 56 ++++++++++++++++++++++++++++++++++++++++++++++ tests/tmp105-test.c | 8 +++---- 6 Dateien geändert, 232 Zeilen hinzugefügt(+), 33 Zeilen entfernt(-) -- 1.7.10.4