diff options
Diffstat (limited to 'lib9p/tests')
-rw-r--r-- | lib9p/tests/test_server/fs_flush.c | 30 | ||||
-rw-r--r-- | lib9p/tests/test_server/fs_shutdown.c | 30 | ||||
-rw-r--r-- | lib9p/tests/test_server/fs_whoami.c | 30 | ||||
-rw-r--r-- | lib9p/tests/testclient-p9p.explog | 30 | ||||
-rw-r--r-- | lib9p/tests/testclient-sess.c | 4 | ||||
-rw-r--r-- | lib9p/tests/testclient-sess.explog | 10 |
6 files changed, 67 insertions, 67 deletions
diff --git a/lib9p/tests/test_server/fs_flush.c b/lib9p/tests/test_server/fs_flush.c index 779eb91..821f32d 100644 --- a/lib9p/tests/test_server/fs_flush.c +++ b/lib9p/tests/test_server/fs_flush.c @@ -35,21 +35,21 @@ static struct lib9p_stat flush_file_stat(struct flush_file *self, struct lib9p_s assert(self); assert(ctx); return (struct lib9p_stat){ - .kern_type = 0, - .kern_dev = 0, - .file_qid = flush_file_qid(self), - .file_mode = 0444, - .file_atime = UTIL9P_ATIME, - .file_mtime = UTIL9P_MTIME, - .file_size = 6, - .file_name = lib9p_str(self->name), - .file_owner_uid = lib9p_str("root"), - .file_owner_gid = lib9p_str("root"), - .file_last_modified_uid = lib9p_str("root"), - .file_extension = lib9p_str(NULL), - .file_owner_n_uid = 0, - .file_owner_n_gid = 0, - .file_last_modified_n_uid = 0, + .fstype = 0, + .fsdev = 0, + .qid = flush_file_qid(self), + .mode = 0444, + .atime = UTIL9P_ATIME, + .mtime = UTIL9P_MTIME, + .length = 6, + .name = lib9p_str(self->name), + .owner_uname = lib9p_str("root"), + .owner_unum = 0, + .owner_gname = lib9p_str("root"), + .owner_gnum = 0, + .last_modifier_uname = lib9p_str("root"), + .last_modifier_unum = 0, + .extension = lib9p_str(NULL), }; } static void flush_file_wstat(struct flush_file *self, struct lib9p_srv_ctx *ctx, struct lib9p_stat) { diff --git a/lib9p/tests/test_server/fs_shutdown.c b/lib9p/tests/test_server/fs_shutdown.c index af2a989..2c3137c 100644 --- a/lib9p/tests/test_server/fs_shutdown.c +++ b/lib9p/tests/test_server/fs_shutdown.c @@ -34,21 +34,21 @@ static struct lib9p_stat shutdown_file_stat(struct shutdown_file *self, struct l assert(self); assert(ctx); return (struct lib9p_stat){ - .kern_type = 0, - .kern_dev = 0, - .file_qid = shutdown_file_qid(self), - .file_mode = 0222 | LIB9P_DM_APPEND, - .file_atime = UTIL9P_ATIME, - .file_mtime = UTIL9P_MTIME, - .file_size = 0, - .file_name = lib9p_str(self->name), - .file_owner_uid = lib9p_str("root"), - .file_owner_gid = lib9p_str("root"), - .file_last_modified_uid = lib9p_str("root"), - .file_extension = lib9p_str(NULL), - .file_owner_n_uid = 0, - .file_owner_n_gid = 0, - .file_last_modified_n_uid = 0, + .fstype = 0, + .fsdev = 0, + .qid = shutdown_file_qid(self), + .mode = 0222 | LIB9P_DM_APPEND, + .atime = UTIL9P_ATIME, + .mtime = UTIL9P_MTIME, + .length = 0, + .name = lib9p_str(self->name), + .owner_uname = lib9p_str("root"), + .owner_unum = 0, + .owner_gname = lib9p_str("root"), + .owner_gnum = 0, + .last_modifier_uname = lib9p_str("root"), + .last_modifier_unum = 0, + .extension = lib9p_str(NULL), }; } static void shutdown_file_wstat(struct shutdown_file *self, struct lib9p_srv_ctx *ctx, struct lib9p_stat) { diff --git a/lib9p/tests/test_server/fs_whoami.c b/lib9p/tests/test_server/fs_whoami.c index b81e6c8..c493000 100644 --- a/lib9p/tests/test_server/fs_whoami.c +++ b/lib9p/tests/test_server/fs_whoami.c @@ -57,21 +57,21 @@ static struct lib9p_stat whoami_file_stat(struct whoami_file *self, struct lib9p assert(ctx); return (struct lib9p_stat){ - .kern_type = 0, - .kern_dev = 0, - .file_qid = whoami_file_qid(self), - .file_mode = 0444, - .file_atime = UTIL9P_ATIME, - .file_mtime = UTIL9P_MTIME, - .file_size = whoami_len(ctx), - .file_name = lib9p_str(self->name), - .file_owner_uid = lib9p_str("root"), - .file_owner_gid = lib9p_str("root"), - .file_last_modified_uid = lib9p_str("root"), - .file_extension = lib9p_str(NULL), - .file_owner_n_uid = 0, - .file_owner_n_gid = 0, - .file_last_modified_n_uid = 0, + .fstype = 0, + .fsdev = 0, + .qid = whoami_file_qid(self), + .mode = 0444, + .atime = UTIL9P_ATIME, + .mtime = UTIL9P_MTIME, + .length = whoami_len(ctx), + .name = lib9p_str(self->name), + .owner_uname = lib9p_str("root"), + .owner_unum = 0, + .owner_gname = lib9p_str("root"), + .owner_gnum = 0, + .last_modifier_uname = lib9p_str("root"), + .last_modifier_unum = 0, + .extension = lib9p_str(NULL), }; } static void whoami_file_wstat(struct whoami_file *self, struct lib9p_srv_ctx *ctx, struct lib9p_stat) { diff --git a/lib9p/tests/testclient-p9p.explog b/lib9p/tests/testclient-p9p.explog index 8216297..54f1e4b 100644 --- a/lib9p/tests/testclient-p9p.explog +++ b/lib9p/tests/testclient-p9p.explog @@ -4,14 +4,14 @@ # SPDX-License-Identifier: AGPL-3.0-or-later > Tversion { tag=NOTAG max_msg_size=8192 version="9P2000" } < Rversion { tag=NOTAG max_msg_size=4120 version="9P2000" } -> Tauth { tag=0 afid=0 uname="nobody" aname="" n_uid=0 } +> Tauth { tag=0 afid=0 uname="nobody" aname="" unum=0 } < Rerror { tag=0 errstr="authentication not required" errnum=L_EOPNOTSUPP } -> Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" n_uid=0 } +> Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" unum=0 } < Rattach { tag=0 qid={ type=(DIR) vers=1 path=1 } } > Twalk { tag=0 fid=0 newfid=1 nwname=0 wname=[ ] } < Rwalk { tag=0 nwqid=0 wqid=[ ] } > Tstat { tag=0 fid=1 } -< Rstat { tag=0 stat={ kern_type=0 kern_dev=0 file_qid={ type=(DIR) vers=1 path=1 } file_mode=(DIR|0555) file_atime=1728337905 file_mtime=1728337904 file_size=0 file_name="" file_owner_uid="root" file_owner_gid="root" file_last_modified_uid="root" file_extension="" file_owner_n_uid=0 file_owner_n_gid=0 file_last_modified_n_uid=0 } } +< Rstat { tag=0 stat={ fstype=0 fsdev=0 qid={ type=(DIR) vers=1 path=1 } mode=(DIR|0555) atime=1728337905 mtime=1728337904 length=0 name="" owner_uname="root" owner_gname="root" last_modifier_uname="root" extension="" owner_unum=0 owner_gnum=0 last_modifier_unum=0 } } > Tclunk { tag=0 fid=1 } < Rclunk { tag=0 } > Twalk { tag=0 fid=0 newfid=1 nwname=0 wname=[ ] } @@ -26,14 +26,14 @@ < Rclunk { tag=0 } > Tversion { tag=NOTAG max_msg_size=8192 version="9P2000" } < Rversion { tag=NOTAG max_msg_size=4120 version="9P2000" } -> Tauth { tag=0 afid=0 uname="nobody" aname="" n_uid=0 } +> Tauth { tag=0 afid=0 uname="nobody" aname="" unum=0 } < Rerror { tag=0 errstr="authentication not required" errnum=L_EOPNOTSUPP } -> Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" n_uid=0 } +> Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" unum=0 } < Rattach { tag=0 qid={ type=(DIR) vers=1 path=1 } } > Twalk { tag=0 fid=0 newfid=1 nwname=1 wname=[ "Documentation" ] } < Rwalk { tag=0 nwqid=1 wqid=[ { type=(DIR) vers=1 path=2 } ] } > Tstat { tag=0 fid=1 } -< Rstat { tag=0 stat={ kern_type=0 kern_dev=0 file_qid={ type=(DIR) vers=1 path=2 } file_mode=(DIR|0555) file_atime=1728337905 file_mtime=1728337904 file_size=0 file_name="Documentation" file_owner_uid="root" file_owner_gid="root" file_last_modified_uid="root" file_extension="" file_owner_n_uid=0 file_owner_n_gid=0 file_last_modified_n_uid=0 } } +< Rstat { tag=0 stat={ fstype=0 fsdev=0 qid={ type=(DIR) vers=1 path=2 } mode=(DIR|0555) atime=1728337905 mtime=1728337904 length=0 name="Documentation" owner_uname="root" owner_gname="root" last_modifier_uname="root" extension="" owner_unum=0 owner_gnum=0 last_modifier_unum=0 } } > Tclunk { tag=0 fid=1 } < Rclunk { tag=0 } > Twalk { tag=0 fid=0 newfid=1 nwname=1 wname=[ "Documentation" ] } @@ -48,9 +48,9 @@ < Rclunk { tag=0 } > Tversion { tag=NOTAG max_msg_size=8192 version="9P2000" } < Rversion { tag=NOTAG max_msg_size=4120 version="9P2000" } -> Tauth { tag=0 afid=0 uname="nobody" aname="" n_uid=0 } +> Tauth { tag=0 afid=0 uname="nobody" aname="" unum=0 } < Rerror { tag=0 errstr="authentication not required" errnum=L_EOPNOTSUPP } -> Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" n_uid=0 } +> Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" unum=0 } < Rattach { tag=0 qid={ type=(DIR) vers=1 path=1 } } > Twalk { tag=0 fid=0 newfid=1 nwname=1 wname=[ "README.md" ] } < Rwalk { tag=0 nwqid=1 wqid=[ { type=(0) vers=1 path=4 } ] } @@ -64,9 +64,9 @@ < Rclunk { tag=0 } > Tversion { tag=NOTAG max_msg_size=8192 version="9P2000" } < Rversion { tag=NOTAG max_msg_size=4120 version="9P2000" } -> Tauth { tag=0 afid=0 uname="nobody" aname="" n_uid=0 } +> Tauth { tag=0 afid=0 uname="nobody" aname="" unum=0 } < Rerror { tag=0 errstr="authentication not required" errnum=L_EOPNOTSUPP } -> Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" n_uid=0 } +> Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" unum=0 } < Rattach { tag=0 qid={ type=(DIR) vers=1 path=1 } } > Twalk { tag=0 fid=0 newfid=1 nwname=2 wname=[ "Documentation", "x" ] } < Rwalk { tag=0 nwqid=2 wqid=[ { type=(DIR) vers=1 path=2 }, { type=(0) vers=1 path=3 } ] } @@ -80,21 +80,21 @@ < Rclunk { tag=0 } > Tversion { tag=NOTAG max_msg_size=8192 version="9P2000" } < Rversion { tag=NOTAG max_msg_size=4120 version="9P2000" } -> Tauth { tag=0 afid=0 uname="nobody" aname="" n_uid=0 } +> Tauth { tag=0 afid=0 uname="nobody" aname="" unum=0 } < Rerror { tag=0 errstr="authentication not required" errnum=L_EOPNOTSUPP } -> Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" n_uid=0 } +> Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" unum=0 } < Rattach { tag=0 qid={ type=(DIR) vers=1 path=1 } } > Twalk { tag=0 fid=0 newfid=1 nwname=2 wname=[ "Documentation", "x" ] } < Rwalk { tag=0 nwqid=2 wqid=[ { type=(DIR) vers=1 path=2 }, { type=(0) vers=1 path=3 } ] } > Tstat { tag=0 fid=1 } -< Rstat { tag=0 stat={ kern_type=0 kern_dev=0 file_qid={ type=(0) vers=1 path=3 } file_mode=(0444) file_atime=1728337905 file_mtime=1728337904 file_size=166 file_name="x" file_owner_uid="root" file_owner_gid="root" file_last_modified_uid="root" file_extension="" file_owner_n_uid=0 file_owner_n_gid=0 file_last_modified_n_uid=0 } } +< Rstat { tag=0 stat={ fstype=0 fsdev=0 qid={ type=(0) vers=1 path=3 } mode=(0444) atime=1728337905 mtime=1728337904 length=166 name="x" owner_uname="root" owner_gname="root" last_modifier_uname="root" extension="" owner_unum=0 owner_gnum=0 last_modifier_unum=0 } } > Tclunk { tag=0 fid=1 } < Rclunk { tag=0 } > Tversion { tag=NOTAG max_msg_size=8192 version="9P2000" } < Rversion { tag=NOTAG max_msg_size=4120 version="9P2000" } -> Tauth { tag=0 afid=0 uname="nobody" aname="" n_uid=0 } +> Tauth { tag=0 afid=0 uname="nobody" aname="" unum=0 } < Rerror { tag=0 errstr="authentication not required" errnum=L_EOPNOTSUPP } -> Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" n_uid=0 } +> Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" unum=0 } < Rattach { tag=0 qid={ type=(DIR) vers=1 path=1 } } > Twalk { tag=0 fid=0 newfid=1 nwname=1 wname=[ "shutdown" ] } < Rwalk { tag=0 nwqid=1 wqid=[ { type=(APPEND) vers=1 path=5 } ] } diff --git a/lib9p/tests/testclient-sess.c b/lib9p/tests/testclient-sess.c index 561c0c9..7cb7f97 100644 --- a/lib9p/tests/testclient-sess.c +++ b/lib9p/tests/testclient-sess.c @@ -95,9 +95,9 @@ int main(int argc, char *argv[]) { send9p(Tversion, .tag=0, .max_msg_size=(8*1024), .version=lib9p_str("9P2000.u")); recv9p(); /* Rversion */ ctx.version = LIB9P_VER_9P2000_u; - send9p(Tattach, .tag=0, .fid=0, .afid=LIB9P_FID_NOFID, .uname=lib9p_str("alice"), .n_uid=1000, .aname=lib9p_str("")); + send9p(Tattach, .tag=0, .fid=0, .afid=LIB9P_FID_NOFID, .uname=lib9p_str("alice"), .unum=1000, .aname=lib9p_str("")); recv9p(); /* Rattach */ - send9p(Tattach, .tag=0, .fid=1, .afid=LIB9P_FID_NOFID, .uname=lib9p_str("bob"), .n_uid=1001, .aname=lib9p_str("")); + send9p(Tattach, .tag=0, .fid=1, .afid=LIB9P_FID_NOFID, .uname=lib9p_str("bob"), .unum=1001, .aname=lib9p_str("")); recv9p(); /* Rattach */ wname[0] = lib9p_str("whoami"); send9p(Twalk, .tag=0, .fid=0, .newfid=2, .nwname=1, .wname=wname); recv9p(); /* Rwalk */ diff --git a/lib9p/tests/testclient-sess.explog b/lib9p/tests/testclient-sess.explog index f686045..a3838ac 100644 --- a/lib9p/tests/testclient-sess.explog +++ b/lib9p/tests/testclient-sess.explog @@ -14,9 +14,9 @@ # ext version, users ########################################################### > Tversion { tag=0 max_msg_size=8192 version="9P2000.u" } < Rversion { tag=0 max_msg_size=4120 version="9P2000.u" } -> Tattach { tag=0 fid=0 afid=NOFID uname="alice" aname="" n_uid=1000 } +> Tattach { tag=0 fid=0 afid=NOFID uname="alice" aname="" unum=1000 } < Rattach { tag=0 qid={ type=(DIR) vers=1 path=1 } } -> Tattach { tag=0 fid=1 afid=NOFID uname="bob" aname="" n_uid=1001 } +> Tattach { tag=0 fid=1 afid=NOFID uname="bob" aname="" unum=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 } ] } @@ -34,7 +34,7 @@ # 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 } +> Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" unum=0 } < Rattach { tag=0 qid={ type=(DIR) vers=1 path=1 } } # dup @@ -83,7 +83,7 @@ # flush ######################################################################## > 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 } +> Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" unum=0 } < Rattach { tag=0 qid={ type=(DIR) vers=1 path=1 } } # flush, but original response comes back first @@ -146,7 +146,7 @@ # shutdown ##################################################################### > 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 } +> Tattach { tag=0 fid=0 afid=NOFID uname="nobody" aname="" unum=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=(APPEND) vers=1 path=5 } ] } |