Thread (46 messages) 46 messages, 7 authors, 2024-02-12

Re: [dpdk-dev] [PATCH v2 8/9] test/vfio_user: introduce functional test

From: Xia, Chenbo <hidden>
Date: 2021-01-19 03:27:21

Hi David,
-----Original Message-----
From: dev <redacted> On Behalf Of David Christensen
Sent: Friday, January 15, 2021 3:03 AM
To: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2 8/9] test/vfio_user: introduce functional
test



On 1/13/21 10:14 PM, Chenbo Xia wrote:
quoted
This patch introduces functional test for vfio_user client and
server. Note that the test can only be run with server and client
both started and server should be started first.
Receiving a build warning on RHEL 8.3 (gcc 8.3.1) for POWER with this patch:

../app/test/test_vfio_user.c: In function ‘test_dev_cfg_rw’:
../app/test/test_vfio_user.c:60:3: warning: implicit declaration of
function ‘memcpy’ [-Wimplicit-function-declaration]
    memcpy(buf, loc, count);
    ^~~~~~
../app/test/test_vfio_user.c:60:3: warning: incompatible implicit
declaration of built-in function ‘memcpy’
../app/test/test_vfio_user.c:60:3: note: include ‘<string.h>’ or provide
a declaration of ‘memcpy’
../app/test/test_vfio_user.c:18:1:
+#include <string.h>

../app/test/test_vfio_user.c:60:3:
    memcpy(buf, loc, count);
    ^~~~~~
../app/test/test_vfio_user.c:64:2: warning: incompatible implicit
declaration of built-in function ‘memcpy’
   memcpy(loc, buf, count);
   ^~~~~~
../app/test/test_vfio_user.c:64:2: note: include ‘<string.h>’ or provide
a declaration of ‘memcpy’
../app/test/test_vfio_user.c: In function ‘test_get_mem’:
../app/test/test_vfio_user.c:192:2: warning: incompatible implicit
declaration of built-in function ‘memcpy’
   memcpy(server_mem->entry, mem->entry, entry_sz);
   ^~~~~~
../app/test/test_vfio_user.c:192:2: note: include ‘<string.h>’ or
provide a declaration of ‘memcpy’
../app/test/test_vfio_user.c: In function ‘test_create_device’:
../app/test/test_vfio_user.c:226:6: warning: implicit declaration of
function ‘strcmp’ [-Wimplicit-function-declaration]
   if (strcmp(sock, test_sock)) {
       ^~~~~~
Will fix in new version.
Also, when running vfio_user_autotest_server, I'm unable to exit the
application with CTRL-C directly.  If a run a second test with
vfio_user_autotest_client then the server test runs to completion
without an error and I'm able to exit the test app normally.  Any way to
get out of the server test without running the matching client test?
Oops..I didn't realize it cannot exit with ctrl-C. It should be fixed.
And normally, because this library has a client/server model, we need a server
and client both launched to complete the test.

Thanks!
Chenbo
Dave
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help