[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH nbdkit] tests: Convert some tests to use nbdsh instead of qemu-io.



On Wed, Sep 11, 2019 at 08:48:28AM -0500, Eric Blake wrote:
> On 9/11/19 5:40 AM, Richard W.M. Jones wrote:
> > Very much a work in progress as there are still many tests using
> > qemu-io which are candidates for conversion.
> > 
> > You'll notice at the end of test-full.sh that the new test has some
> > duplicated code which looks as if it ought to be refactored into a
> > Python function.  When I tried to do that, I got loads of strange
> > Python problems which may indicate bugs in nbdsh itself or problems
> > with my understanding of how Python works, but I wasn't sure how to
> > fix it.  The current implementation works.
> 
> I'm not sure if I'd spot the problem, but I'd least need to see your
> alternative that didn't work before I can tell for sure :)

Attached is my alternative (on top of the current patch), which seems
to me straightforward, but actually fails with the attached error.

I tried variations inserting ‘global h’ in various places but couldn't
make it work.

Also note there are two related errors, because ‘nbd’ somehow get
"unimported" from the function too.

Needs help from someone who knows more Python :-)

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
>From d88957e9572e69490e109526f905745555fe8589 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones redhat com>
Date: Wed, 11 Sep 2019 14:54:49 +0100
Subject: [PATCH] tests/test-full.sh: Refactor to tests into a single function
 (NOT WORKING).

---
 tests/test-full.sh | 24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/tests/test-full.sh b/tests/test-full.sh
index 8f237dd..f060f4f 100755
--- a/tests/test-full.sh
+++ b/tests/test-full.sh
@@ -55,19 +55,15 @@ nbdsh --connect "nbd+unix://?socket=$sock" \
 # All writes should fail with the ENOSPC error.
 nbdsh --connect "nbd+unix://?socket=$sock" \
       -c '
-try:
-    h.pwrite (bytearray (512), 0)
-    # This should not happen.
-    exit (1)
-except nbd.Error as ex:
-    # Check the errno is expected.
-    assert ex.errno == "ENOSPC"
+def test (offset):
+    try:
+        h.pwrite (bytearray (512), offset)
+        # This should not happen.
+        exit (1)
+    except nbd.Error as ex:
+        # Check the errno is expected.
+        assert ex.errno == "ENOSPC"
 
-try:
-    h.pwrite (bytearray (512), 1048064)
-    # This should not happen.
-    exit (1)
-except nbd.Error as ex:
-    # Check the errno is expected.
-    assert ex.errno == "ENOSPC"
+test (0)
+test (1048064)
 '
-- 
2.23.0

/home/rjones/d/nbdkit/server/nbdkit -v -P full.pid -U /tmp/tmp.sHet2Luahj -- /home/rjones/d/nbdkit/plugins/full/.libs/nbdkit-full-plugin.so 1M
nbdkit: debug: TLS disabled: could not load TLS certificates
nbdkit: debug: registering plugin /home/rjones/d/nbdkit/plugins/full/.libs/nbdkit-full-plugin.so
nbdkit: debug: registered plugin /home/rjones/d/nbdkit/plugins/full/.libs/nbdkit-full-plugin.so (name full)
nbdkit: debug: full: load
nbdkit: debug: full: config key=size, value=1M
nbdkit: debug: full: config_complete
nbdkit: debug: using thread model: parallel
nbdkit: debug: bound to unix socket /tmp/tmp.sHet2Luahj
nbdkit: debug: forked into background (new pid = 422301)
nbdkit: debug: written pidfile /home/rjones/d/nbdkit/tests/full.pid
libnbd: debug: nbd1: nbd_create: opening handle
libnbd: debug: nbd1: nbd_close: closing handle
libnbd: debug: nbd2: nbd_create: opening handle
libnbd: debug: nbd2: nbd_close: closing handle
libnbd: debug: nbd3: nbd_create: opening handle
libnbd: debug: nbd3: nbd_close: closing handle
libnbd: debug: nbd4: nbd_create: opening handle
libnbd: debug: nbd4: nbd_close: closing handle
libnbd: debug: nbd5: nbd_create: opening handle
libnbd: debug: nbd5: nbd_connect_uri: enter: uri="nbd+unix://?socket=/tmp/tmp.sHet2Luahj"
libnbd: debug: nbd5: nbd_connect_uri: event CmdConnectUnix: START -> CONNECT_UNIX.START
libnbd: debug: nbd5: nbd_connect_uri: transition: CONNECT_UNIX.START -> CONNECT.START
libnbd: debug: nbd5: nbd_connect_uri: poll start: events=4
libnbd: debug: nbd5: nbd_connect_uri: poll end: r=1 revents=4
libnbd: debug: nbd5: nbd_connect_uri: event NotifyWrite: CONNECT.START -> CONNECT.CONNECTING
libnbd: debug: nbd5: nbd_connect_uri: transition: CONNECT.CONNECTING -> MAGIC.START
libnbd: debug: nbd5: nbd_connect_uri: transition: MAGIC.START -> MAGIC.RECV_MAGIC
libnbd: debug: nbd5: nbd_connect_uri: poll start: events=1
nbdkit: debug: accepted connection
nbdkit: full[1]: debug: newstyle negotiation: flags: global 0x3
libnbd: debug: nbd5: nbd_connect_uri: poll end: r=1 revents=1
libnbd: debug: nbd5: nbd_connect_uri: transition: MAGIC.RECV_MAGIC -> MAGIC.CHECK_MAGIC
libnbd: debug: nbd5: nbd_connect_uri: transition: MAGIC.CHECK_MAGIC -> NEWSTYLE.START
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.START -> NEWSTYLE.RECV_GFLAGS
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.RECV_GFLAGS -> NEWSTYLE.CHECK_GFLAGS
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.CHECK_GFLAGS -> NEWSTYLE.SEND_CFLAGS
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.SEND_CFLAGS -> NEWSTYLE.OPT_STARTTLS.START
nbdkit: libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_STARTTLS.START -> NEWSTYLE.OPT_STRUCTURED_REPLY.START
fulllibnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_STRUCTURED_REPLY.START -> NEWSTYLE.OPT_STRUCTURED_REPLY.SEND
[1]: libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_STRUCTURED_REPLY.SEND -> NEWSTYLE.OPT_STRUCTURED_REPLY.RECV_REPLY
debug: newstyle negotiation: client flags: 0x3libnbd: debug: nbd5: nbd_connect_uri: poll start: events=1

nbdkit: full[1]: debug: newstyle negotiation: NBD_OPT_STRUCTURED_REPLY: client requested structured replies
libnbd: debug: nbd5: nbd_connect_uri: poll end: r=1 revents=1
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_STRUCTURED_REPLY.RECV_REPLY -> NEWSTYLE.OPT_STRUCTURED_REPLY.RECV_REPLY_PAYLOAD
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_STRUCTURED_REPLY.RECV_REPLY_PAYLOAD -> NEWSTYLE.OPT_STRUCTURED_REPLY.CHECK_REPLY
libnbd: debug: nbd5: nbd_connect_uri: negotiated structured replies on this connection
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_STRUCTURED_REPLY.CHECK_REPLY -> NEWSTYLE.OPT_SET_META_CONTEXT.START
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_SET_META_CONTEXT.START -> NEWSTYLE.OPT_GO.START
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.START -> NEWSTYLE.OPT_GO.SEND
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.SEND -> NEWSTYLE.OPT_GO.SEND_EXPORTNAMELEN
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.SEND_EXPORTNAMELEN -> NEWSTYLE.OPT_GO.SEND_EXPORT
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.SEND_EXPORT -> NEWSTYLE.OPT_GO.SEND_NRINFOS
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.SEND_NRINFOS -> NEWSTYLE.OPT_GO.RECV_REPLY
nbdkit: libnbd: debug: nbd5: nbd_connect_uri: poll start: events=1
full[1]: debug: newstyle negotiation: NBD_OPT_GO: client requested export ''
nbdkit: full[1]: debug: full: open readonly=0
nbdkit: full[1]: debug: full: backend readonly=0
nbdkit: full[1]: debug: full: get_size
nbdkit: full[1]: debug: full: can_write
nbdkit: full[1]: debug: full: can_zero
nbdkit: full[1]: debug: full: can_write
nbdkit: full[1]: debug: full: can_fast_zero
nbdkit: full[1]: debug: full: can_zero
nbdkit: full[1]: debug: full: can_trim
nbdkit: full[1]: debug: full: can_write
nbdkit: full[1]: debug: full: can_fua
nbdkit: full[1]: debug: full: can_write
nbdkit: full[1]: debug: full: can_flush
nbdkit: full[1]: debug: full: is_rotational
nbdkit: full[1]: debug: full: can_multi_conn
nbdkit: full[1]: debug: full: can_cache
nbdkit: full[1]: debug: full: can_extents
nbdkit: full[1]: debug: newstyle negotiation: flags: export 0xde1
nbdkit: libnbd: debug: nbd5: nbd_connect_uri: poll end: r=1 revents=1
full[1]libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.RECV_REPLY -> NEWSTYLE.OPT_GO.RECV_REPLY_PAYLOAD
: debug: libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.RECV_REPLY_PAYLOAD -> NEWSTYLE.OPT_GO.CHECK_REPLY
handshake complete, processing requests with 16 threads
libnbd: debug: nbd5: nbd_connect_uri: exportsize: 1048576 eflags: 0xde1
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.CHECK_REPLY -> NEWSTYLE.OPT_GO.RECV_REPLY
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.RECV_REPLY -> NEWSTYLE.OPT_GO.RECV_REPLY_PAYLOAD
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.RECV_REPLY_PAYLOAD -> NEWSTYLE.OPT_GO.CHECK_REPLY
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.CHECK_REPLY -> READY
libnbd: debug: nbd5: nbd_connect_uri: leave: ret=0
nbdkit: debug: starting worker thread full.0
nbdkit: debug: libnbd: debug: nbd5: nbd_pread: enter: buf=<buf> count=512 offset=0 flags=0x0
starting worker thread full.1libnbd: debug: nbd5: nbd_pread: event CmdIssue: READY -> ISSUE_COMMAND.START

libnbd: debug: nbd5: nbd_pread: transition: ISSUE_COMMAND.START -> ISSUE_COMMAND.SEND_REQUEST
libnbd: debug: nbd5: nbd_pread: transition: ISSUE_COMMAND.SEND_REQUEST -> ISSUE_COMMAND.PREPARE_WRITE_PAYLOAD
libnbd: debug: nbd5: nbd_pread: transition: ISSUE_COMMAND.PREPARE_WRITE_PAYLOAD -> ISSUE_COMMAND.FINISH
libnbd: debug: nbd5: nbd_pread: transition: ISSUE_COMMAND.FINISH -> READY
libnbd: debug: nbd5: nbd_pread: poll start: events=1
nbdkit: debug: starting worker thread full.2
nbdkit: debug: starting worker thread full.5
nbdkit: full.0: debug: full: pread count=512 offset=0
libnbd: debug: nbd5: nbd_pread: poll end: r=1 revents=1
libnbd: debug: nbd5: nbd_pread: event NotifyRead: READY -> REPLY.START
nbdkit: libnbd: debug: nbd5: nbd_pread: transition: REPLY.START -> REPLY.RECV_REPLY
debug: libnbd: debug: nbd5: nbd_pread: transition: REPLY.RECV_REPLY -> REPLY.CHECK_SIMPLE_OR_STRUCTURED_REPLY
starting worker thread full.8libnbd: debug: nbd5: nbd_pread: transition: REPLY.CHECK_SIMPLE_OR_STRUCTURED_REPLY -> REPLY.STRUCTURED_REPLY.START

libnbd: debug: nbd5: nbd_pread: transition: REPLY.STRUCTURED_REPLY.START -> REPLY.STRUCTURED_REPLY.RECV_REMAINING
libnbd: debug: nbd5: nbd_pread: transition: REPLY.STRUCTURED_REPLY.RECV_REMAINING -> REPLY.STRUCTURED_REPLY.CHECK
libnbd: debug: nbd5: nbd_pread: transition: REPLY.STRUCTURED_REPLY.CHECK -> REPLY.STRUCTURED_REPLY.RECV_OFFSET_DATA
libnbd: debug: nbd5: nbd_pread: transition: REPLY.STRUCTURED_REPLY.RECV_OFFSET_DATA -> REPLY.STRUCTURED_REPLY.RECV_OFFSET_DATA_DATA
libnbd: debug: nbd5: nbd_pread: transition: REPLY.STRUCTURED_REPLY.RECV_OFFSET_DATA_DATA -> REPLY.STRUCTURED_REPLY.FINISH
libnbd: debug: nbd5: nbd_pread: transition: REPLY.STRUCTURED_REPLY.FINISH -> REPLY.FINISH_COMMAND
nbdkit: libnbd: debug: nbd5: nbd_pread: transition: REPLY.FINISH_COMMAND -> READY
debug: libnbd: debug: nbd5: nbd_pread: leave: ret=0
starting worker thread full.3
nbdkit: debug: starting worker thread full.12libnbd: debug: nbd5: nbd_pread: enter: buf=<buf> count=512 offset=512 flags=0x0

libnbd: debug: nbd5: nbd_pread: event CmdIssue: READY -> ISSUE_COMMAND.START
libnbd: debug: nbd5: nbd_pread: transition: ISSUE_COMMAND.START -> ISSUE_COMMAND.SEND_REQUEST
libnbd: debug: nbd5: nbd_pread: transition: ISSUE_COMMAND.SEND_REQUEST -> ISSUE_COMMAND.PREPARE_WRITE_PAYLOAD
libnbd: debug: nbd5: nbd_pread: transition: ISSUE_COMMAND.PREPARE_WRITE_PAYLOAD -> ISSUE_COMMAND.FINISH
libnbd: debug: nbd5: nbd_pread: transition: ISSUE_COMMAND.FINISH -> READY
libnbd: debug: nbd5: nbd_pread: poll start: events=1
nbdkit: debug: starting worker thread full.14
nbdkit: debug: starting worker thread full.4
nbdkit: debug: starting worker thread full.9
nbdkit: debug: starting worker thread full.10
nbdkit: debug: starting worker thread full.11
nbdkit: debug: starting worker thread full.6
nbdkit: debug: starting worker thread full.13
nbdkit: debug: starting worker thread full.7
nbdkit: full.1: debug: full: pread count=512 offset=512
nbdkit: libnbd: debug: nbd5: nbd_pread: poll end: r=1 revents=1
debug: libnbd: debug: nbd5: nbd_pread: event NotifyRead: READY -> REPLY.START
starting worker thread full.15
libnbd: debug: nbd5: nbd_pread: transition: REPLY.START -> REPLY.RECV_REPLY
libnbd: debug: nbd5: nbd_pread: transition: REPLY.RECV_REPLY -> REPLY.CHECK_SIMPLE_OR_STRUCTURED_REPLY
libnbd: debug: nbd5: nbd_pread: transition: REPLY.CHECK_SIMPLE_OR_STRUCTURED_REPLY -> REPLY.STRUCTURED_REPLY.START
libnbd: debug: nbd5: nbd_pread: transition: REPLY.STRUCTURED_REPLY.START -> REPLY.STRUCTURED_REPLY.RECV_REMAINING
libnbd: debug: nbd5: nbd_pread: transition: REPLY.STRUCTURED_REPLY.RECV_REMAINING -> REPLY.STRUCTURED_REPLY.CHECK
libnbd: debug: nbd5: nbd_pread: transition: REPLY.STRUCTURED_REPLY.CHECK -> REPLY.STRUCTURED_REPLY.RECV_OFFSET_DATA
libnbd: debug: nbd5: nbd_pread: transition: REPLY.STRUCTURED_REPLY.RECV_OFFSET_DATA -> REPLY.STRUCTURED_REPLY.RECV_OFFSET_DATA_DATA
libnbd: debug: nbd5: nbd_pread: transition: REPLY.STRUCTURED_REPLY.RECV_OFFSET_DATA_DATA -> REPLY.STRUCTURED_REPLY.FINISH
libnbd: debug: nbd5: nbd_pread: transition: REPLY.STRUCTURED_REPLY.FINISH -> REPLY.FINISH_COMMAND
libnbd: debug: nbd5: nbd_pread: transition: REPLY.FINISH_COMMAND -> READY
libnbd: debug: nbd5: nbd_pread: leave: ret=0
libnbd: debug: nbd5: nbd_pread: enter: buf=<buf> count=512 offset=1048064 flags=0x0
libnbd: debug: nbd5: nbd_pread: event CmdIssue: READY -> ISSUE_COMMAND.START
libnbd: debug: nbd5: nbd_pread: transition: ISSUE_COMMAND.START -> ISSUE_COMMAND.SEND_REQUEST
libnbd: debug: nbd5: nbd_pread: transition: ISSUE_COMMAND.SEND_REQUEST -> ISSUE_COMMAND.PREPARE_WRITE_PAYLOAD
libnbd: debug: nbd5: nbd_pread: transition: ISSUE_COMMAND.PREPARE_WRITE_PAYLOAD -> ISSUE_COMMAND.FINISH
libnbd: debug: nbd5: nbd_pread: transition: ISSUE_COMMAND.FINISH -> READY
libnbd: debug: nbd5: nbd_pread: poll start: events=1
nbdkit: full.2: debug: full: pread count=512 offset=1048064
libnbd: debug: nbd5: nbd_pread: poll end: r=1 revents=1
libnbd: debug: nbd5: nbd_pread: event NotifyRead: READY -> REPLY.START
libnbd: debug: nbd5: nbd_pread: transition: REPLY.START -> REPLY.RECV_REPLY
libnbd: debug: nbd5: nbd_pread: transition: REPLY.RECV_REPLY -> REPLY.CHECK_SIMPLE_OR_STRUCTURED_REPLY
libnbd: debug: nbd5: nbd_pread: transition: REPLY.CHECK_SIMPLE_OR_STRUCTURED_REPLY -> REPLY.STRUCTURED_REPLY.START
libnbd: debug: nbd5: nbd_pread: transition: REPLY.STRUCTURED_REPLY.START -> REPLY.STRUCTURED_REPLY.RECV_REMAINING
libnbd: debug: nbd5: nbd_pread: transition: REPLY.STRUCTURED_REPLY.RECV_REMAINING -> REPLY.STRUCTURED_REPLY.CHECK
libnbd: debug: nbd5: nbd_pread: transition: REPLY.STRUCTURED_REPLY.CHECK -> REPLY.STRUCTURED_REPLY.RECV_OFFSET_DATA
libnbd: debug: nbd5: nbd_pread: transition: REPLY.STRUCTURED_REPLY.RECV_OFFSET_DATA -> REPLY.STRUCTURED_REPLY.RECV_OFFSET_DATA_DATA
libnbd: debug: nbd5: nbd_pread: transition: REPLY.STRUCTURED_REPLY.RECV_OFFSET_DATA_DATA -> REPLY.STRUCTURED_REPLY.FINISH
libnbd: debug: nbd5: nbd_pread: transition: REPLY.STRUCTURED_REPLY.FINISH -> REPLY.FINISH_COMMAND
libnbd: debug: nbd5: nbd_pread: transition: REPLY.FINISH_COMMAND -> READY
libnbd: debug: nbd5: nbd_pread: leave: ret=0
libnbd: debug: nbd5: nbd_close: closing handle
nbdkit: full.5: debug: client closed input socket, closing connection
nbdkit: full.5: debug: exiting worker thread full.5
nbdkit: full.8: debug: exiting worker thread full.8
nbdkit: full.3: debug: exiting worker thread full.3
nbdkit: full.0: debug: exiting worker thread full.0
nbdkit: full.12: debug: exiting worker thread full.12
nbdkit: full.9: debug: exiting worker thread full.9
nbdkit: full.11: debug: exiting worker thread full.11
nbdkit: full.6: debug: exiting worker thread full.6
nbdkit: full.1: debug: exiting worker thread full.1
nbdkit: full.4: debug: exiting worker thread full.4
nbdkit: full.14: debug: exiting worker thread full.14
nbdkit: full.13: debug: exiting worker thread full.13
nbdkit: full.7: debug: exiting worker thread full.7
nbdkit: full.10: debug: exiting worker thread full.10
nbdkit: full.15: debug: exiting worker thread full.15
nbdkit: full.2: debug: exiting worker thread full.2
nbdkit: full[1]: debug: close
libnbd: debug: nbd1: nbd_create: opening handle
libnbd: debug: nbd1: nbd_close: closing handle
libnbd: debug: nbd2: nbd_create: opening handle
libnbd: debug: nbd2: nbd_close: closing handle
libnbd: debug: nbd3: nbd_create: opening handle
libnbd: debug: nbd3: nbd_close: closing handle
libnbd: debug: nbd4: nbd_create: opening handle
libnbd: debug: nbd4: nbd_close: closing handle
libnbd: debug: nbd5: nbd_create: opening handle
libnbd: debug: nbd5: nbd_connect_uri: enter: uri="nbd+unix://?socket=/tmp/tmp.sHet2Luahj"
libnbd: debug: nbd5: nbd_connect_uri: event CmdConnectUnix: START -> CONNECT_UNIX.START
libnbd: debug: nbd5: nbd_connect_uri: transition: CONNECT_UNIX.START -> CONNECT.START
libnbd: debug: nbd5: nbd_connect_uri: poll start: events=4
libnbd: debug: nbd5: nbd_connect_uri: poll end: r=1 revents=4
libnbd: debug: nbd5: nbd_connect_uri: event NotifyWrite: CONNECT.START -> CONNECT.CONNECTING
libnbd: debug: nbd5: nbd_connect_uri: transition: CONNECT.CONNECTING -> MAGIC.START
libnbd: debug: nbd5: nbd_connect_uri: transition: MAGIC.START -> MAGIC.RECV_MAGIC
libnbd: debug: nbd5: nbd_connect_uri: poll start: events=1
nbdkit: debug: accepted connection
nbdkit: full[2]: debug: newstyle negotiation: flags: global 0x3
libnbd: debug: nbd5: nbd_connect_uri: poll end: r=1 revents=1
libnbd: debug: nbd5: nbd_connect_uri: transition: MAGIC.RECV_MAGIC -> MAGIC.CHECK_MAGIC
libnbd: debug: nbd5: nbd_connect_uri: transition: MAGIC.CHECK_MAGIC -> NEWSTYLE.START
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.START -> NEWSTYLE.RECV_GFLAGS
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.RECV_GFLAGS -> NEWSTYLE.CHECK_GFLAGS
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.CHECK_GFLAGS -> NEWSTYLE.SEND_CFLAGS
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.SEND_CFLAGS -> NEWSTYLE.OPT_STARTTLS.START
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_STARTTLS.START -> NEWSTYLE.OPT_STRUCTURED_REPLY.START
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_STRUCTURED_REPLY.START -> NEWSTYLE.OPT_STRUCTURED_REPLY.SEND
nbdkit: libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_STRUCTURED_REPLY.SEND -> NEWSTYLE.OPT_STRUCTURED_REPLY.RECV_REPLY
full[2]libnbd: debug: nbd5: nbd_connect_uri: poll start: events=1
: debug: newstyle negotiation: client flags: 0x3
nbdkit: full[2]: debug: newstyle negotiation: NBD_OPT_STRUCTURED_REPLY: client requested structured replies
libnbd: debug: nbd5: nbd_connect_uri: poll end: r=1 revents=1
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_STRUCTURED_REPLY.RECV_REPLY -> NEWSTYLE.OPT_STRUCTURED_REPLY.RECV_REPLY_PAYLOAD
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_STRUCTURED_REPLY.RECV_REPLY_PAYLOAD -> NEWSTYLE.OPT_STRUCTURED_REPLY.CHECK_REPLY
libnbd: debug: nbd5: nbd_connect_uri: negotiated structured replies on this connection
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_STRUCTURED_REPLY.CHECK_REPLY -> NEWSTYLE.OPT_SET_META_CONTEXT.START
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_SET_META_CONTEXT.START -> NEWSTYLE.OPT_GO.START
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.START -> NEWSTYLE.OPT_GO.SEND
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.SEND -> NEWSTYLE.OPT_GO.SEND_EXPORTNAMELEN
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.SEND_EXPORTNAMELEN -> NEWSTYLE.OPT_GO.SEND_EXPORT
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.SEND_EXPORT -> NEWSTYLE.OPT_GO.SEND_NRINFOS
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.SEND_NRINFOS -> NEWSTYLE.OPT_GO.RECV_REPLY
nbdkit: libnbd: debug: nbd5: nbd_connect_uri: poll start: events=1
full[2]: debug: newstyle negotiation: NBD_OPT_GO: client requested export ''
nbdkit: full[2]: debug: full: open readonly=0
nbdkit: full[2]: debug: full: backend readonly=0
nbdkit: full[2]: debug: full: get_size
nbdkit: full[2]: debug: full: can_write
nbdkit: full[2]: debug: full: can_zero
nbdkit: full[2]: debug: full: can_write
nbdkit: full[2]: debug: full: can_fast_zero
nbdkit: full[2]: debug: full: can_zero
nbdkit: full[2]: debug: full: can_trim
nbdkit: full[2]: debug: full: can_write
nbdkit: full[2]: debug: full: can_fua
nbdkit: full[2]: debug: full: can_write
nbdkit: full[2]: debug: full: can_flush
nbdkit: full[2]: debug: full: is_rotational
nbdkit: full[2]: debug: full: can_multi_conn
nbdkit: full[2]: debug: full: can_cache
nbdkit: full[2]: debug: full: can_extents
nbdkit: full[2]: debug: newstyle negotiation: flags: export 0xde1
nbdkit: full[2]libnbd: debug: nbd5: nbd_connect_uri: poll end: r=1 revents=1
: debug: libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.RECV_REPLY -> NEWSTYLE.OPT_GO.RECV_REPLY_PAYLOAD
handshake complete, processing requests with 16 threads
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.RECV_REPLY_PAYLOAD -> NEWSTYLE.OPT_GO.CHECK_REPLY
libnbd: debug: nbd5: nbd_connect_uri: exportsize: 1048576 eflags: 0xde1
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.CHECK_REPLY -> NEWSTYLE.OPT_GO.RECV_REPLY
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.RECV_REPLY -> NEWSTYLE.OPT_GO.RECV_REPLY_PAYLOAD
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.RECV_REPLY_PAYLOAD -> NEWSTYLE.OPT_GO.CHECK_REPLY
libnbd: debug: nbd5: nbd_connect_uri: transition: NEWSTYLE.OPT_GO.CHECK_REPLY -> READY
libnbd: debug: nbd5: nbd_connect_uri: leave: ret=0
nbdkit: debug: starting worker thread full.1
nbdkit: debug: starting worker thread full.0
nbdkit: debug: starting worker thread full.2
nbdkit: debug: starting worker thread full.3
nbdkit: debug: starting worker thread full.4
nbdkit: debug: starting worker thread full.5
nbdkit: debug: starting worker thread full.9
nbdkit: debug: starting worker thread full.6
nbdkit: debug: starting worker thread full.7
nbdkit: debug: starting worker thread full.13
nbdkit: debug: starting worker thread full.10
nbdkit: debug: starting worker thread full.11
nbdkit: debug: starting worker thread full.12
nbdkit: debug: starting worker thread full.8
nbdkit: debug: starting worker thread full.14
nbdkit: debug: starting worker thread full.15
Traceback (most recent call last):
  File "<string>", line 4, in test
NameError: name 'h' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib64/python3.7/site-packages/nbd.py", line 1343, in <module>
    nbdsh.shell()
  File "/usr/lib64/python3.7/site-packages/nbdsh.py", line 62, in shell
    exec (c)
  File "<string>", line 11, in <module>
  File "<string>", line 7, in test
NameError: name 'nbd' is not defined
libnbd: debug: nbd5: nbd_close: closing handle
nbdkit: full.1: debug: client closed input socket, closing connection
nbdkit: full.1: debug: exiting worker thread full.1
nbdkit: full.0: debug: exiting worker thread full.0
nbdkit: full.2: debug: exiting worker thread full.2
nbdkit: full.3: debug: exiting worker thread full.3
nbdkit: full.6: debug: exiting worker thread full.6
nbdkit: full.7: debug: exiting worker thread full.7
nbdkit: full.9: debug: exiting worker thread full.9
nbdkit: full.4: debug: exiting worker thread full.4
nbdkit: full.15: debug: exiting worker thread full.15
nbdkit: full.5: debug: exiting worker thread full.5
nbdkit: full.10: debug: exiting worker thread full.10
nbdkit: full.11: debug: exiting worker thread full.11
nbdkit: full.12: debug: exiting worker thread full.12
nbdkit: full.8: debug: exiting worker thread full.8
nbdkit: full.14: debug: exiting worker thread full.14
nbdkit: full.13: debug: exiting worker thread full.13
nbdkit: full[2]: debug: close
./test-full.sh: run cleanup hooks: exit code 1
nbdkit: debug: full: unload plugin
FAIL test-full.sh (exit status: 1)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]