All of lore.kernel.org
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: Anthony Liguori <anthony@codemonkey.ws>,
	Igor Mammedov <imammedo@redhat.com>,
	seabios@seabios.org, qemu-devel@nongnu.org,
	Gleb Natapov <gleb@redhat.com>
Subject: Re: [Qemu-devel] [QEMU RFC PATCH 6/7] i386: topology & APIC ID utility functions
Date: Mon, 23 Jul 2012 19:11:11 +0000	[thread overview]
Message-ID: <CAAu8pHvviPAdGJ7fkYGLpioDwDaVdyrWYYb=_BB_4iN0AbEH0w@mail.gmail.com> (raw)
In-Reply-To: <20120723185958.GT13029@otherpad.lan.raisama.net>

On Mon, Jul 23, 2012 at 6:59 PM, Eduardo Habkost <ehabkost@redhat.com> wrote:
> On Mon, Jul 23, 2012 at 04:49:07PM +0000, Blue Swirl wrote:
>> On Mon, Jul 16, 2012 at 5:42 PM, Eduardo Habkost <ehabkost@redhat.com> 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.

Yes, but the other 'unit tests' (the names used here are very
confusing, btw) check supporting functions like coroutines, not
hardware. Hardware tests (qtest) need to bind to an architecture, in
this case x86.

>
>
>>
>> >
>> >>
>> >> > 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

That does not look very attractive either. Scripting could help for
such mechanical changes. Maybe later.

>
> --
> Eduardo

  reply	other threads:[~2012-07-23 19:11 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-10 20:22 [Qemu-devel] [RFC 0/7+1] QEMU APIC ID + topology bug + CPU hotplug Eduardo Habkost
2012-07-10 20:22 ` [Qemu-devel] [PATCH 1/7] cpus.h: include cpu-common.h Eduardo Habkost
2012-07-10 20:22 ` [Qemu-devel] [QEMU PATCH 2/7] hw/apic.c: rename bit functions to not conflict with bitops.h Eduardo Habkost
2012-07-12 19:24   ` Blue Swirl
2012-07-13 18:07     ` Eduardo Habkost
2012-07-14  9:09       ` Blue Swirl
2012-07-15  9:19         ` Gleb Natapov
2012-07-10 20:22 ` [Qemu-devel] [QEMU PATCH 3/7] kvm: set vcpu_id to APIC ID instead of CPU index Eduardo Habkost
2012-07-10 20:22 ` [Qemu-devel] [QEMU RFC PATCH 4/7] i386: create apic_id_for_cpu() function Eduardo Habkost
2012-07-10 20:22 ` [Qemu-devel] [QEMU RFC PATCH 5/7] pc: write lapic info (apic IDs) to fw_cfg so seabios can use it Eduardo Habkost
2012-07-12 19:29   ` Blue Swirl
2012-07-13 18:09     ` Eduardo Habkost
2012-07-10 20:22 ` [Qemu-devel] [QEMU RFC PATCH 6/7] i386: topology & APIC ID utility functions Eduardo Habkost
2012-07-12 19:37   ` Blue Swirl
2012-07-13 18:51     ` Eduardo Habkost
2012-07-14  9:14       ` Blue Swirl
2012-07-16 17:42         ` Eduardo Habkost
2012-07-23 16:49           ` Blue Swirl
2012-07-23 18:59             ` Eduardo Habkost
2012-07-23 19:11               ` Blue Swirl [this message]
2012-07-23 19:28                 ` Eduardo Habkost
2012-07-23 19:44                   ` Blue Swirl
2012-07-23 20:14                     ` Eduardo Habkost
2012-07-24 19:17                       ` Blue Swirl
2012-07-10 20:22 ` [Qemu-devel] [QEMU RFC PATCH 7/7] generate APIC IDs according to CPU topology Eduardo Habkost
2012-07-10 20:22 ` [Qemu-devel] [Seabios RFC PATCH 1/1] get lapic IDs from fw_cfg Eduardo Habkost
2012-07-12 13:51 ` [Qemu-devel] [RFC 0/7+1] QEMU APIC ID + topology bug + CPU hotplug Igor Mammedov
2012-07-12 14:00   ` Gleb Natapov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAu8pHvviPAdGJ7fkYGLpioDwDaVdyrWYYb=_BB_4iN0AbEH0w@mail.gmail.com' \
    --to=blauwirbel@gmail.com \
    --cc=anthony@codemonkey.ws \
    --cc=ehabkost@redhat.com \
    --cc=gleb@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seabios@seabios.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.