summaryrefslogtreecommitdiffstats
path: root/tests/tmp105-test.c
Commit message (Collapse)AuthorAgeFilesLines
* libqtest: escape strings in QMP commands, fix leakPaolo Bonzini2014-07-011-2/+2
| | | | | | | | | | | | | | libqtest is using g_strdup_printf to format QMP commands, but this does not work if the argument strings need to be escaped. Instead, use the fancy %-formatting functionality of QObject. The only change required in tests is that strings have to be formatted as %s, not '%s' or \"%s\". Luckily this usage of parameterized QMP commands is not that frequent. The leak is in socket_sendf. Since we are extracting the send loop to a new function, fix it now. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* tmp105-test: Test QOM property and precisionPaolo Bonzini2014-03-311-3/+76
| | | | | | | | | This adds a regression test for commit efdf6a56a7c73753dd135ed085a223a119b5d805 (tmp105: Read temperature in milli-celsius). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* tmp105-test: Add a second sensor and test that onePaolo Bonzini2014-03-311-8/+9
| | | | | | | This will make it easier to reach the device under test via QOM. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* tmp105-test: Wrap simple building blocks for testingPaolo Bonzini2014-03-311-18/+36
| | | | | | | | The next patches will add more reads and writes. Add a simple testing API for this. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* qtest: Include system headers before user headersStefan Hajnoczi2014-02-171-2/+3
| | | | | | | | It is dangerous to include user headers before system headers since user macros can affect system headers. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* qtest: Use -display none by defaultAndreas Färber2013-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | This avoids each test needing to add it to suppress windows popping up. [Commit 7ceeedd016facf8d58e14a0d1417fa7225d71072 ("blockdev-test: add test case for drive_add duplicate IDs") and commit 43cd209803d6cffb1e1a028c9ff2fd0ff4fce954 ("qdev-monitor-test: add device_add leak test cases") added qtest tests without specifying -display none. As a result, "make check" now tries to use graphics (GTK or SDL). Since graphics are not used by the test and inappropriate for headless "make check" runs, add the missing -display none. This fixes "make check" in the QEMU buildbot. -- Stefan] Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* libqos: Relocate I2C filesAndreas Färber2013-05-031-1/+1
| | | | | | | | | | | Commit c4efe1cada311b9dc0df5beb71c4227ff3414aa1 (qtest: add libqos including PCI support) created a libqos/ subdirectory but left the existing I2C libqos files libi2c*.[hc] in tests/. Clean this up. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Message-id: 1367502986-15104-1-git-send-email-afaerber@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* hw: move headers to include/Paolo Bonzini2013-04-081-1/+1
| | | | | | | | | Many of these should be cleaned up with proper qdev-/QOM-ification. Right now there are many catch-all headers in include/hw/ARCH depending on cpu.h, and this makes it necessary to compile these files per-target. However, fixing this does not belong in these patches. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* tests: Add tmp105 qtest test caseAndreas Färber2013-01-161-0/+76
Exercise all four commands of the TMP105, testing for an issue in the I2C TX path. The test case uses the N800's OMAP I2C and is the first for ARM. Signed-off-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud