On Sun, 3 Nov 2002, Fabien Chevalier wrote: > > Hello, > > I wrote this afternoon this small test program. > It does not do all what i would have liked, but it does enough to > begin to compare libsmbclient releases.
One minor fix. In standard C you can't declare a variable after the first executable statement in a function. However, here is the result of running it against my copy of samba-head: ./lsmbctest >> Now running test smbc_init... Calling int smbc_init(mbc_get_auth_data_fn, int debug=<0>) Result : 0 >> Test <smbc_init> OK >> Now running test workgroups listing... Calling int smbc_opendir(const char *durl=<smb://>) Authentification required for SERVER <SERVER2> SHARE <IPC$> in WORKGROUP <SAMBANET>. Returning <><> Result : 10000, errno=0[Success] Calling int smbc_readdir(int dh=<10000>) Result : 0x804bb44, errno=0[Success] Found entry type <1>, named <SAMBANET> Calling int smbc_readdir(int dh=<10000>) Result : (nil), errno=0[Success] >> Test <workgroups listing> OK >> Now running test smbc_closedir... Calling int smbc_closedir(int dh=<10000>) Result : 0, errno=0[Success] >> Test <smbc_closedir> OK >> Now running test machines in workgroup listing... Calling int smbc_opendir(const char *durl=<smb://SAMBANET>) Authentification required for SERVER <SERVER2> SHARE <IPC$> in WORKGROUP <SAMBANET>. Returning <><> Result : 10001, errno=0[Success] Calling int smbc_readdir(int dh=<10001>) Result : 0x804bb44, errno=0[Success] Found entry type <2>, named <N6A3B8> Calling int smbc_readdir(int dh=<10001>) Result : 0x804bb44, errno=0[Success] Found entry type <2>, named <SAMBA1> Calling int smbc_readdir(int dh=<10001>) Result : 0x804bb44, errno=0[Success] Found entry type <2>, named <SERVER2> Calling int smbc_readdir(int dh=<10001>) Result : (nil), errno=0[Success] >> Test <machines in workgroup listing> OK Calling int smbc_closedir(int dh=<10001>) Result : 0, errno=0[Success] >> Now running test shares on a machine listing... Calling int smbc_opendir(const char *durl=<smb://N6A3B8>) Authentification required for SERVER <N6A3B8> SHARE <IPC$> in WORKGROUP <SAMBANET>. Returning <><> Result : 10002, errno=0[Success] Calling int smbc_readdir(int dh=<10002>) Result : 0x804bb44, errno=0[Success] Found entry type <6>, named <IPC$> Calling int smbc_readdir(int dh=<10002>) Result : (nil), errno=0[Success] >> Test <shares on a machine listing> OK Calling int smbc_closedir(int dh=<10002>) Result : 0, errno=0[Success] Test summary: smbc_init Ok smbc_closedir Ok workgroups listing Ok machines in workgroup listing Ok shares on a machine listing Ok Regards ----- Richard Sharpe, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], http://www.richardsharpe.com