qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <lvivier@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Laurent Vivier" <lvivier@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Juan Quintela" <quintela@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [PATCH v2 1/2] tests/vhost-user-bridge: move to contrib/
Date: Fri,  7 Feb 2020 10:54:11 +0100	[thread overview]
Message-ID: <20200207095412.794912-1-lvivier@redhat.com> (raw)

vhost-user-bridge is not a test. Move it to contrib/ and
add it to the tools list.

It will be built only if tools (--enable-tools) and
vhost-user (--enable-vhost-user) are enabled (both are set
by default).

Suggested-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---

Notes:
    v2: update docs

 Makefile                                                      | 3 +++
 Makefile.objs                                                 | 1 +
 configure                                                     | 3 +++
 contrib/vhost-user-bridge/Makefile.objs                       | 1 +
 tests/vhost-user-bridge.c => contrib/vhost-user-bridge/main.c | 0
 docs/devel/migration.rst                                      | 2 +-
 tests/Makefile.include                                        | 1 -
 7 files changed, 9 insertions(+), 2 deletions(-)
 create mode 100644 contrib/vhost-user-bridge/Makefile.objs
 rename tests/vhost-user-bridge.c => contrib/vhost-user-bridge/main.c (100%)

diff --git a/Makefile b/Makefile
index 461d40bea6c2..23342a433e11 100644
--- a/Makefile
+++ b/Makefile
@@ -442,6 +442,7 @@ dummy := $(call unnest-vars,, \
                 libvhost-user-obj-y \
                 vhost-user-scsi-obj-y \
                 vhost-user-blk-obj-y \
+                vhost-user-bridge-obj-y \
                 vhost-user-input-obj-y \
                 vhost-user-gpu-obj-y \
                 qga-vss-dll-obj-y \
@@ -672,6 +673,8 @@ vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y) libvhost-user.a
 	$(call LINK, $^)
 vhost-user-blk$(EXESUF): $(vhost-user-blk-obj-y) libvhost-user.a
 	$(call LINK, $^)
+vhost-user-bridge$(EXESUF): $(vhost-user-bridge-obj-y) libvhost-user.a
+	$(call LINK, $^)
 
 rdmacm-mux$(EXESUF): LIBS += "-libumad"
 rdmacm-mux$(EXESUF): $(rdmacm-mux-obj-y) $(COMMON_LDADDS)
diff --git a/Makefile.objs b/Makefile.objs
index 26b9cff95436..0240100b9a17 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -109,6 +109,7 @@ vhost-user-scsi.o-cflags := $(LIBISCSI_CFLAGS)
 vhost-user-scsi.o-libs := $(LIBISCSI_LIBS)
 vhost-user-scsi-obj-y = contrib/vhost-user-scsi/
 vhost-user-blk-obj-y = contrib/vhost-user-blk/
+vhost-user-bridge-obj-y = contrib/vhost-user-bridge/
 rdmacm-mux-obj-y = contrib/rdmacm-mux/
 vhost-user-input-obj-y = contrib/vhost-user-input/
 vhost-user-gpu-obj-y = contrib/vhost-user-gpu/
diff --git a/configure b/configure
index 115dc38085f3..0415eb5c99d3 100755
--- a/configure
+++ b/configure
@@ -6223,6 +6223,9 @@ if test "$want_tools" = "yes" ; then
   if [ "$curl" = "yes" ]; then
       tools="elf2dmp\$(EXESUF) $tools"
   fi
+  if [ "$vhost_user" = "yes" ]; then
+      tools="vhost-user-bridge\$(EXESUF) $tools"
+  fi
 fi
 if test "$softmmu" = yes ; then
   if test "$linux" = yes; then
diff --git a/contrib/vhost-user-bridge/Makefile.objs b/contrib/vhost-user-bridge/Makefile.objs
new file mode 100644
index 000000000000..36a8d9b49a05
--- /dev/null
+++ b/contrib/vhost-user-bridge/Makefile.objs
@@ -0,0 +1 @@
+vhost-user-bridge-obj-y = main.o
diff --git a/tests/vhost-user-bridge.c b/contrib/vhost-user-bridge/main.c
similarity index 100%
rename from tests/vhost-user-bridge.c
rename to contrib/vhost-user-bridge/main.c
diff --git a/docs/devel/migration.rst b/docs/devel/migration.rst
index e88918f7639e..d00424460e23 100644
--- a/docs/devel/migration.rst
+++ b/docs/devel/migration.rst
@@ -807,7 +807,7 @@ The Linux kernel userfault support works on `/dev/shm` memory and on `hugetlbfs`
 for hugetlbfs which may be a problem in some configurations).
 
 The vhost-user code in QEMU supports clients that have Postcopy support,
-and the `vhost-user-bridge` (in `tests/`) and the DPDK package have changes
+and the `vhost-user-bridge` (in `contrib/`) and the DPDK package have changes
 to support postcopy.
 
 The client needs to open a userfaultfd and register the areas
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 2f1cafed720d..78cdbe91aed5 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -586,7 +586,6 @@ include $(SRC_PATH)/tests/qtest/Makefile.include
 
 tests/test-qga$(EXESUF): qemu-ga$(EXESUF)
 tests/test-qga$(EXESUF): tests/test-qga.o $(qtest-obj-y)
-tests/vhost-user-bridge$(EXESUF): tests/vhost-user-bridge.o $(test-util-obj-y) libvhost-user.a
 
 SPEED = quick
 
-- 
2.24.1



             reply	other threads:[~2020-02-07  9:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07  9:54 Laurent Vivier [this message]
2020-02-07  9:54 ` [PATCH v2 2/2] virtiofsd: add it to the tools list Laurent Vivier
2020-02-07 11:13   ` Juan Quintela
2020-02-10 17:02   ` Stefan Hajnoczi
2020-02-07 11:12 ` [PATCH v2 1/2] tests/vhost-user-bridge: move to contrib/ Juan Quintela
2020-02-10 17:02 ` Stefan Hajnoczi
2020-03-01 12:12 ` Michael S. Tsirkin
2020-03-02  9:50   ` Laurent Vivier
2020-03-02 10:53     ` Michael S. Tsirkin
2020-03-02 11:19       ` Laurent Vivier
2020-03-02 12:30         ` Laurent Vivier
2020-03-02 13:12           ` Philippe Mathieu-Daudé
2020-03-02 13:25             ` Laurent Vivier

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=20200207095412.794912-1-lvivier@redhat.com \
    --to=lvivier@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@redhat.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).