diff options
Diffstat (limited to 'lib9p/tests/testclient-sess.explog')
-rw-r--r-- | lib9p/tests/testclient-sess.explog | 71 |
1 files changed, 60 insertions, 11 deletions
diff --git a/lib9p/tests/testclient-sess.explog b/lib9p/tests/testclient-sess.explog index 6aab242..3e2209a 100644 --- a/lib9p/tests/testclient-sess.explog +++ b/lib9p/tests/testclient-sess.explog @@ -18,10 +18,10 @@ < Rattach { tag=0 qid={ type=(DIR) vers=1 path=1 } } > Tattach { tag=0 fid=1 afid=NOFID uname="bob" aname="" n_uid=1001 } < Rattach { tag=0 qid={ type=(DIR) vers=1 path=1 } } -> Twalk { tag=0 fid=0 newfid=2 nwname=1 wname=["whoami" ] } -< Rwalk { tag=0 nwqid=1 wqid=[{ type=(0) vers=1 path=8 } ] } -> Twalk { tag=0 fid=1 newfid=3 nwname=1 wname=["whoami" ] } -< Rwalk { tag=0 nwqid=1 wqid=[{ type=(0) vers=1 path=8 } ] } +> Twalk { tag=0 fid=0 newfid=2 nwname=1 wname=[ "whoami" ] } +< Rwalk { tag=0 nwqid=1 wqid=[ { type=(0) vers=1 path=8 } ] } +> Twalk { tag=0 fid=1 newfid=3 nwname=1 wname=[ "whoami" ] } +< Rwalk { tag=0 nwqid=1 wqid=[ { type=(0) vers=1 path=8 } ] } > Topen { tag=0 fid=2 mode=(MODE_READ) } < Ropen { tag=0 qid={ type=(0) vers=1 path=8 } iounit=0 } > Topen { tag=0 fid=3 mode=(MODE_READ) } @@ -31,6 +31,55 @@ > Tread { tag=0 fid=3 offset=0 count=100 } < Rread { tag=0 count=9 data="1001 bob\n" } +# walk ######################################################################### +> Tversion { tag=0 max_msg_size=8192 version="9P2000" } +< Rversion { tag=0 max_msg_size=4120 version="9P2000" } +> Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" n_uid=0 } +< Rattach { tag=0 qid={ type=(DIR) vers=1 path=1 } } + +# dup +> Twalk { tag=0 fid=0 newfid=1 nwname=0 wname=[ ] } +< Rwalk { tag=0 nwqid=0 wqid=[ ] } + +# "The walk request carries as arguments an existing fid"... +> Twalk { tag=0 fid=2 newfid=3 nwname=0 wname=[ ] } +< Rerror { tag=0 errstr="bad file number 2" errnum=L_EBADF } + +# ..."and a proposed newfid"... +> Twalk { tag=0 fid=1 newfid=NOFID nwname=0 wname=[ ] } +< Rerror { tag=0 errstr="cannot assign to NOFID" errnum=L_EBADF } + +# ..."(which must not be in use"... +> Twalk { tag=0 fid=1 newfid=0 nwname=0 wname=[ ] } +< Rerror { tag=0 errstr="FID already in use" errnum=L_EBADF } + +# ..."unless it is the same as fid)"... +> Twalk { tag=0 fid=1 newfid=1 nwname=0 wname=[ ] } +< Rwalk { tag=0 nwqid=0 wqid=[ ] } + +# ... "that the client wishes to associate with the result of +# traversing the directory hierarchy by `walking' the heierarchy using +# the successive path name elements wname."... + +# ..."The fid must represent a directory"... +> Twalk { tag=0 fid=1 newfid=2 nwname=1 wname=[ "README.md" ] } +< Rwalk { tag=0 nwqid=1 wqid=[ { type=(0) vers=1 path=4 } ] } +> Twalk { tag=0 fid=2 newfid=3 nwname=1 wname=[ ".." ] } +< Rerror { tag=0 errstr="not a directory" errnum=L_ENOTDIR } + +# ..."unless zero path name elements are specified." +> Twalk { tag=0 fid=2 newfid=3 nwname=0 wname=[ ] } +< Rwalk { tag=0 nwqid=0 wqid=[ ] } + +# "The fid must be valid in the current session" (tested above)... + +# ..."and must not have been opened for I/O by an open or create +# message."... +> Topen { tag=0 fid=3 mode=(MODE_READ) } +< Ropen { tag=0 qid={ type=(0) vers=1 path=4 } iounit=0 } +> Twalk { tag=0 fid=3 newfid=4 nwname=0 wname=[ ] } +< Rerror { tag=0 errstr="cannot walk on FID open for I/O" errnum=L_EALREADY } + # flush ######################################################################## > Tversion { tag=0 max_msg_size=8192 version="9P2000" } < Rversion { tag=0 max_msg_size=4120 version="9P2000" } @@ -38,8 +87,8 @@ < Rattach { tag=0 qid={ type=(DIR) vers=1 path=1 } } # flush, but original response comes back first -> Twalk { tag=0 fid=0 newfid=1 nwname=1 wname=["slowread" ] } -< Rwalk { tag=0 nwqid=1 wqid=[{ type=(0) vers=1 path=6 } ] } +> Twalk { tag=0 fid=0 newfid=1 nwname=1 wname=[ "slowread" ] } +< Rwalk { tag=0 nwqid=1 wqid=[ { type=(0) vers=1 path=6 } ] } > Topen { tag=0 fid=1 mode=(MODE_READ) } < Ropen { tag=0 qid={ type=(0) vers=1 path=6 } iounit=0 } > Tread { tag=1 fid=1 offset=0 count=6 } @@ -48,14 +97,14 @@ < Rflush { tag=2 } # flush, succeeds -> Twalk { tag=1 fid=0 newfid=2 nwname=1 wname=["slowread-flushable" ] } -< Rwalk { tag=1 nwqid=1 wqid=[{ type=(0) vers=1 path=7 } ] } +> Twalk { tag=1 fid=0 newfid=2 nwname=1 wname=[ "slowread-flushable" ] } +< Rwalk { tag=1 nwqid=1 wqid=[ { type=(0) vers=1 path=7 } ] } > Topen { tag=0 fid=2 mode=(MODE_READ) } < Ropen { tag=0 qid={ type=(0) vers=1 path=7 } iounit=0 } > Tread { tag=1 fid=2 offset=0 count=6 } > Tflush { tag=2 oldtag=1 } < Rflush { tag=2 } -< Rerror { tag=1 errstr="request canceled by flush" errnum=125 } +< Rerror { tag=1 errstr="request canceled by flush" errnum=L_ECANCELED } # flush, unknown tag > Tflush { tag=0 oldtag=99 } @@ -66,8 +115,8 @@ < Rversion { tag=0 max_msg_size=4120 version="9P2000" } > Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" n_uid=0 } < Rattach { tag=0 qid={ type=(DIR) vers=1 path=1 } } -> Twalk { tag=0 fid=0 newfid=0 nwname=1 wname=["shutdown" ] } -< Rwalk { tag=0 nwqid=1 wqid=[{ type=(0) vers=1 path=5 } ] } +> Twalk { tag=0 fid=0 newfid=0 nwname=1 wname=[ "shutdown" ] } +< Rwalk { tag=0 nwqid=1 wqid=[ { type=(0) vers=1 path=5 } ] } > Topen { tag=0 fid=0 mode=(MODE_WRITE) } < Ropen { tag=0 qid={ type=(0) vers=1 path=5 } iounit=0 } > Twrite { tag=0 fid=0 offset=0 count=2 data="1\n" } |