From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXFbU-0001ek-Lw for qemu-devel@nongnu.org; Thu, 25 Sep 2014 16:25:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXFbO-0006iK-DX for qemu-devel@nongnu.org; Thu, 25 Sep 2014 16:25:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56162) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXFbO-0006hp-5O for qemu-devel@nongnu.org; Thu, 25 Sep 2014 16:25:22 -0400 From: Eduardo Habkost Date: Thu, 25 Sep 2014 17:18:19 -0300 Message-Id: <1411676309-20218-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [RFC 00/10] Target-specific unit test support, add unit tests for target-i386/cpu.c code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Igor Mammedov , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Paolo Bonzini This is an attempt to write unit tests for the target-i386/cpu.c code. By now, I just implemented 3 simple test cases, to ensure X86CPU objects can be created, and to ensure the CPU features are set properly depending on the CPU model table. Eduardo Habkost (10): tests: Add missing include to test-bitops.c bitops.h: Don't include qemu-common.h bitmap.h: Don't include qemu-common.h tests: Move fake yield_until_fd_readable() to coroutine-stub.c tests: Support target-specific unit tests tests: Make test-x86-cpuid target-specific tests: Add unit test for X86CPU code target-i386: Isolate enabled-by-default features to a separate array tests: test-x86-cpu: Add TCG feature bit initialization test tests: test-x86-cpu: Add KVM feature bit initialization test include/qemu/bitmap.h | 5 +- include/qemu/bitops.h | 4 +- target-i386/cpu.c | 12 ++-- tests/.gitignore | 1 + tests/Makefile | 48 ++++++++++--- tests/aio-stub.c | 20 ++++++ tests/block-stub.c | 11 +++ tests/coroutine-stub.c | 13 ++++ tests/monitor-stub.c | 34 +++++++++ tests/test-bitops.c | 1 + tests/test-vmstate.c | 11 --- tests/test-x86-cpu.c | 97 ++++++++++++++++++++++++++ tests/timer-stub.c | 65 +++++++++++++++++ tests/vl-stub.c | 45 ++++++++++++ tests/x86-stub.c | 186 +++++++++++++++++++++++++++++++++++++++++++++++++ 15 files changed, 525 insertions(+), 28 deletions(-) create mode 100644 tests/aio-stub.c create mode 100644 tests/block-stub.c create mode 100644 tests/coroutine-stub.c create mode 100644 tests/monitor-stub.c create mode 100644 tests/test-x86-cpu.c create mode 100644 tests/timer-stub.c create mode 100644 tests/vl-stub.c create mode 100644 tests/x86-stub.c -- 1.9.3