Actions
Bug #9874
closedAdd fksmbcl development tool
Start date:
2018-10-06
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
Description
During development of the SMB 2.1 client, I found it helpful to have another
"run all the kernel code in use-space wrappers" scaffolding, similar to what
the SMB server has in usr/src/cmd/smbsrv/fksmbd
The ability to use source-level debugging etc. is a huge accelerator for this kind of new code development.
There are also some unit test cases that are easier to run via this tool than in the real (in-kernel) build.
Related issues
Updated by Gordon Ross over 3 years ago
Description:
Add a development tool allowing user-level development, debug, and testing of the SMB client code.
See demo sessions below.
Demo 1 (testing)
$ cd usr/src/cmd/fs.d/smbclnt/fksmbcl $ ./Run.sh //phobos # Start with: > logon [user [dom [pw]]] > shares > mount {share} > logon test test test > shares open pipe: /srvsvc enum strings backups public junk c$ Default Share a_share test1 hyperv testca b_share test2 ipc$ Remote IPC test iso home > mount test > dir 1224750917 . 1224750917 .. 2719655930 test_mux 4037555480 mkdir_dup 2014037313 denytest2.exe 3163926770 rawcontext 3224315293 testsmb2_dir 2396973620 locktest 3409360567 smb2_readtest.dir 932498676 torture_dosmode 583318148 oplock_test 310779346 test_disconnect 1732008523 compound_interim_dir 2851893553 replaytestdir 900818955 test9.dat 3908265151 lock1.txt 4088662112 .DS_Store 3667475210 test_rename 3582954431 gwr 2610231017 compound_related2.dat 2452346625 test_dir > umount > logoff > exit $
Demo 2 (debuggng)
$ dbx Do one of: attach ${PID} or: debug ${ROOT}/usr/lib/smbfs/fksmbcl Reading fksmbcl [...] then: run -v //localhost (dbx) stop in smb_iod_waitrq (2) stop in smb_iod_waitrq (dbx) run //phobos Running: fksmbcl //phobos (process id 25284) # Start with: > logon [user [dom [pw]]] > shares > mount {share} > logon test test test Reading [...] > mount test t@1 (l@1) stopped in smb_iod_waitrq at line 720 in file "smb_iod.c" 720 struct smb_vc *vcp = rqp->sr_vc; (dbx) where current thread: t@1 =>[1] smb_iod_waitrq(rqp = 0x808ed80), line 720 in "smb_iod.c" [2] smb_rq_reply(rqp = 0x808ed80), line 474 in "smb_rq.c" [3] smb_rq_simple_timed(rqp = 0x808ed80, timeout = 30), line 254 in "smb_rq.c" [4] smb_rq_simple(rqp = 0x808ed80), line 231 in "smb_rq.c" [5] smb_smb_treeconnect(ssp = 0x80b7a40, scred = 0x8046d54), line 246 in "smb_smb.c" [6] smb_share_tcon(ssp = 0x80b7a40, scred = 0x8046d54), line 816 in "smb_conn.c" [7] smb_usr_get_tree(sdp = 0x808ff80, cmd = 7238415, arg = 134959920, flags = 0, cr = 0xfec6b458), line 764 in "smb_usr.c" [8] nsmb_drv_ioctl(dev = 262146U, cmd = 7238415, arg = 134959920, flags = 0), line 278 in "nsmb_drv.c" [9] nsmb_ioctl(fd = 262146, cmd = 7238415, arg = 0x80b5330), line 81 in "fkdev.c" [10] smb_ctx_get_tree(ctx = 0x8099008), line 1306 in "ctx.c" [11] do_mount(argc = 2, argv = 0x8046e84), line 337 in "fksmbcl_main.c" [12] run_cli(), line 201 in "fksmbcl_main.c" [13] main(argc = 2, argv = 0x8046ef8), line 137 in "fksmbcl_main.c" (dbx) next t@1 (l@1) stopped in smb_iod_waitrq at line 724 in file "smb_iod.c" 724 if (rqp->sr_flags & SMBR_INTERNAL) { (dbx) next t@1 (l@1) stopped in smb_iod_waitrq at line 734 in file "smb_iod.c" 734 ASSERT(curthread != vcp->iod_thr); (dbx)
Updated by Electric Monk about 3 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit 8329232e00f1048795bae53acb230316243aadb5
commit 8329232e00f1048795bae53acb230316243aadb5 Author: Gordon Ross <gwr@nexenta.com> Date: 2019-03-14T14:38:30.000Z 9874 Add fksmbcl development tool Reviewed by: Evan Layton <evan.layton@nexenta.com> Reviewed by: Matt Barden <matt.barden@nexenta.com> Approved by: Joshua M. Clulow <josh@sysmgr.org>
Updated by Dan McDonald about 3 years ago
- Related to Bug #10599: SPARC build broken after 9874 added
Actions