From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StNqh-00084l-Ix for qemu-devel@nongnu.org; Mon, 23 Jul 2012 14:59:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1StNqg-0001oA-DV for qemu-devel@nongnu.org; Mon, 23 Jul 2012 14:59:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36639) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StNqg-0001nr-4y for qemu-devel@nongnu.org; Mon, 23 Jul 2012 14:59:18 -0400 Date: Mon, 23 Jul 2012 15:59:58 -0300 From: Eduardo Habkost Message-ID: <20120723185958.GT13029@otherpad.lan.raisama.net> References: <1341951743-2285-1-git-send-email-ehabkost@redhat.com> <1341951743-2285-7-git-send-email-ehabkost@redhat.com> <20120713185133.GD13029@otherpad.lan.raisama.net> <20120716174258.GA18479@otherpad.lan.raisama.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [QEMU RFC PATCH 6/7] i386: topology & APIC ID utility functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Anthony Liguori , Igor Mammedov , seabios@seabios.org, qemu-devel@nongnu.org, Gleb Natapov On Mon, Jul 23, 2012 at 04:49:07PM +0000, Blue Swirl wrote: > On Mon, Jul 16, 2012 at 5:42 PM, Eduardo Habkost wrote: > > On Sat, Jul 14, 2012 at 09:14:30AM +0000, Blue Swirl wrote: > > [...] > >> >> > diff --git a/tests/Makefile b/tests/Makefile > >> >> > index b605e14..89bd890 100644 > >> >> > --- a/tests/Makefile > >> >> > +++ b/tests/Makefile > >> >> > @@ -15,6 +15,7 @@ check-unit-y += tests/test-string-output-visitor$(EXESUF) > >> >> > check-unit-y += tests/test-coroutine$(EXESUF) > >> >> > check-unit-y += tests/test-visitor-serialization$(EXESUF) > >> >> > check-unit-y += tests/test-iov$(EXESUF) > >> >> > +check-unit-y += tests/test-x86-cpuid$(EXESUF) > >> >> > >> >> This probably tries to build the cpuid test also for non-x86 targets > >> >> and break them all. > >> > > >> > I don't think there's any concept of "targets" for the check-unit tests. > >> > >> How about: > >> check-qtest-i386-y = tests/test-x86-cpuid$(EXESUF) > > > > test-x86-cpuid is not a qtest test case. > > Why not? I don't think it is a unit test either, judging from what the > other unit tests do. It is absolutely a unit test. I don't know why you don't think so. It simply checks the results of the APIC ID calculation functions. > > > > >> > >> > I had to do the following, to be able to make a test that uses the > >> > target-i386 code: > >> > > >> >> > +tests/test-x86-cpuid.o: QEMU_INCLUDES += -Itarget-i386 > >> > > >> > Any suggestions to avoid this hack would be welcome. > >> > >> Maybe it would be simpler to adjust #include path in the file. > > > > Using the full path on the #include line would break in case > > target-i386/topology.h include other files from the target-i386 > > directory. > > That's fragile. Maybe the target-xyz files should use the full path. Yes, it would be fragile. That's why I used -Itarget-i386 (not a perfect solution, but more likely to stay working and not break easily). I don't know if I understand what you propose. You mean to change the 256 target-specific #include lines inside qemu? $ git grep -f <(find target-* -name '*.h' | sed -e 's@target-[^/]*/@#include "@' | sort -u) target-* | wc -l 256 -- Eduardo