[PATCH] Add libsmbclient list shares test

Jeremy Allison jra at samba.org
Tue Aug 28 23:42:13 UTC 2018


On Tue, Aug 28, 2018 at 04:40:27PM -0700, Jeremy Allison via samba-technical wrote:
> On Wed, Aug 29, 2018 at 01:34:02AM +0200, Stefan Metzmacher wrote:
> > Am 29.08.2018 um 01:02 schrieb Jeremy Allison via samba-technical:
> > > On Wed, Aug 29, 2018 at 12:58:12AM +0200, Stefan Metzmacher wrote:
> > >> Hi Jeremy,
> > >>
> > >>>> libsmbclient = smbtorture4_testsuites("libsmbclient.")
> > >>>> for t in libsmbclient:
> > >>>>     url = "smb://$USERNAME:$PASSWORD@$SERVER/tmp"
> > >>>>     if "list_shares" in t:
> > >>>>         url = "smb://$USERNAME:$PASSWORD@$SERVER"
> > >>>>
> > >>>> so for the 'list_shares' test it should have
> > >>>> removed the /tmp from the end, and didn't.
> > >>
> > >> The name is "libsmbclient.list_shares", not just "list_shares".
> > > 
> > > Yes I already found and fixed that. It still fails
> > > due to the libsmbclient tests being invoked from
> > > inside source3/selftest/tests.py, whereas Andreas's
> > > change only fixed the smburl in source4/selftest/tests.py
> > > 
> > > Whoever thought (a) writing this stuff in python was a good
> > > idea and (b) naming things identially inside source3 and
> > > source4 is responsible for a *LOT* of wasted engineering
> > > time and effort..
> > 
> > That also applies to a lot of our C code...
> 
> Yes, but I understand and can fix that easily :-).
> 
> Same isn't true of python :-). Having said that I
> figured it out (eventually) and sent a patch to
> make it all work back to Andreas.

And of course who knows if I used idiomatic Paython2
or the completely different language Python3, so will
make Noel's porting to the new language problems harder.

Python really is a *terrible* choice.



More information about the samba-technical mailing list