From: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
To: "snabb-devel@googlegroups.com" <snabb-devel@googlegroups.com>
Cc: VirtualOpenSystems Technical Team <tech@virtualopensystems.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [snabb-devel] Re: [PATCH v2] qtest: enable vhost-user-test
Date: Thu, 19 Jun 2014 23:31:30 +0300 [thread overview]
Message-ID: <CADDJ2=PAR7zQfuu5uzr9mArsg_6xLHBb82FE1kX0mYcACY2OqQ@mail.gmail.com> (raw)
In-Reply-To: <20140619182409.GA22948@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2792 bytes --]
On Thu, Jun 19, 2014 at 9:24 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> On Thu, Jun 19, 2014 at 08:35:42PM +0300, Nikolay Nikolaev wrote:
> > Use qtest-obj-y to get the right library order. CONFIG_POSIX ensures
> > mingw compilation won't break.
> >
> > Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
>
> okay but why does non posix work without -lutil and posix doesn't?
>
There are 2 things here:
1. vhost-user-test links to qemu-char.o, which uses qemu_openpty_raw from
libqemuutil.a.
qemu_openpty_raw requires openpty from libutil. We added LIBS=-lutil in
tests/Makefile to satisfy this dependency.
2. tests/Makefile is included in the main Makefile, so LIBS is applied to
all make targets. Making LIBS depend on CONFIG_POSIX actually switches
on/off -lutil globally.
Probably the best solution would be to just stub qemu_openpty_raw an drop
-lutil.
regards,
Nikolay Nikolaev
>
> > ---
> > 0 files changed
> >
> > diff --git a/tests/Makefile b/tests/Makefile
> > index 4caf7de..5661d52 100644
> > --- a/tests/Makefile
> > +++ b/tests/Makefile
> > @@ -156,7 +156,7 @@ gcov-files-i386-y += hw/usb/hcd-ehci.c
> > gcov-files-i386-y += hw/usb/hcd-uhci.c
> > gcov-files-i386-y += hw/usb/dev-hid.c
> > gcov-files-i386-y += hw/usb/dev-storage.c
> > -#check-qtest-i386-y += tests/vhost-user-test$(EXESUF)
> > +check-qtest-i386-$(CONFIG_POSIX) += tests/vhost-user-test$(EXESUF)
> > check-qtest-x86_64-y = $(check-qtest-i386-y)
> > gcov-files-i386-y += i386-softmmu/hw/timer/mc146818rtc.c
> > gcov-files-x86_64-y = $(subst
> i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y))
> > @@ -323,11 +323,14 @@ tests/es1370-test$(EXESUF): tests/es1370-test.o
> > tests/intel-hda-test$(EXESUF): tests/intel-hda-test.o
> > tests/ioh3420-test$(EXESUF): tests/ioh3420-test.o
> > tests/usb-hcd-ehci-test$(EXESUF): tests/usb-hcd-ehci-test.o
> $(libqos-pc-obj-y)
> > -tests/vhost-user-test$(EXESUF): tests/vhost-user-test.o qemu-char.o
> qemu-timer.o libqemuutil.a libqemustub.a
> > +tests/vhost-user-test$(EXESUF): tests/vhost-user-test.o qemu-char.o
> qemu-timer.o $(qtest-obj-y)
> > tests/qemu-iotests/socket_scm_helper$(EXESUF):
> tests/qemu-iotests/socket_scm_helper.o
> > tests/test-qemu-opts$(EXESUF): tests/test-qemu-opts.o libqemuutil.a
> libqemustub.a
> >
> > -#LIBS+= -lutil
> > +
> > +ifeq ($(CONFIG_POSIX),y)
> > +LIBS+= -lutil
> > +endif
> >
> > # QTest rules
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Snabb Switch development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to snabb-devel+unsubscribe@googlegroups.com.
> To post to this group, send an email to snabb-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/snabb-devel.
>
[-- Attachment #2: Type: text/html, Size: 4018 bytes --]
next prev parent reply other threads:[~2014-06-19 20:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-19 17:35 [Qemu-devel] [PATCH v2] qtest: enable vhost-user-test Nikolay Nikolaev
2014-06-19 18:24 ` Michael S. Tsirkin
2014-06-19 20:31 ` Nikolay Nikolaev [this message]
2014-06-30 9:40 ` Michael S. Tsirkin
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='CADDJ2=PAR7zQfuu5uzr9mArsg_6xLHBb82FE1kX0mYcACY2OqQ@mail.gmail.com' \
--to=n.nikolaev@virtualopensystems.com \
--cc=qemu-devel@nongnu.org \
--cc=snabb-devel@googlegroups.com \
--cc=tech@virtualopensystems.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).