[PATCH] Selftest improvements

Douglas Bagnall douglas.bagnall at catalyst.net.nz
Tue Feb 6 22:37:18 UTC 2018


On 07/02/18 11:27, Douglas Bagnall via samba-technical wrote:
> On 07/02/18 11:01, Jamie McClymont via samba-technical wrote:
>> On 02/02/18 16:24, Andrew Bartlett via samba-technical wrote:
>>> Sadly this doesn't work for the samba-o3 autobuild target, which needs
>>> make quicktest to work.
>>
>> ... valuable lessons have now been learnt about string equality in perl ;)
> 
> The attached patch might have accelerated those lessons.
> 
Actually, I think the modules also need to use warnings (it is lexically
scoped), as attached.

For what it's worth, here are our remaining warning-less perl files:

$ git grep -L 'use warnings' :/*.pl
docs-xml/scripts/indent-smb.conf.pl
examples/LDAP/ol-schema-migrate.pl
examples/logon/genlogon/genlogon.pl
examples/logon/mklogon/mklogon.pl
examples/misc/adssearch.pl
examples/misc/check_multiple_LDAP_entries.pl
examples/misc/cldap.pl
examples/scripts/eventlog/parselog.pl
examples/scripts/printing/cups/smbaddprinter.pl
examples/scripts/printing/cups/smbdelprinter.pl
examples/scripts/users_and_groups/adduserstogroups.pl
examples/scripts/users_and_groups/createdomobj.pl
librpc/tables.pl
pidl/tests/ndr_align.pl
pidl/tests/ndr_alloc.pl
pidl/tests/ndr_array.pl
pidl/tests/ndr_compat.pl
pidl/tests/ndr_fullptr.pl
pidl/tests/ndr_refptr.pl
pidl/tests/ndr_represent.pl
pidl/tests/ndr_simple.pl
pidl/tests/ndr_string.pl
pidl/tests/ndr_tagtype.pl
pidl/tests/parse_idl.pl
pidl/tests/test_util.pl
script/configure_check_unused.pl
script/findstatic.pl
source3/script/count_80_col.pl
source3/script/fix_bool.pl
source3/script/scancvslog.pl
source3/script/strip_trail_ws.pl
source3/script/tests/fake_snap.pl
source3/script/tests/printing/modprinter.pl
source4/build/pasn1/pasn1.pl
source4/heimdal/cf/make-proto.pl
source4/heimdal/lib/hcrypto/libtommath/booker.pl
source4/script/buildtree.pl
source4/script/minimal_includes.pl
source4/selftest/win/vm_get_ip.pl
source4/selftest/win/vm_load_snapshot.pl
third_party/nss_wrapper/nss_wrapper.pl

$ git grep -L 'use warnings' :/*.pm
pidl/lib/Parse/Pidl.pm
pidl/lib/Parse/Pidl/CUtil.pm
pidl/lib/Parse/Pidl/Compat.pm
pidl/lib/Parse/Pidl/Dump.pm
pidl/lib/Parse/Pidl/Expr.pm
pidl/lib/Parse/Pidl/IDL.pm
pidl/lib/Parse/Pidl/NDR.pm
pidl/lib/Parse/Pidl/ODL.pm
pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
pidl/lib/Parse/Pidl/Samba3/Template.pm
pidl/lib/Parse/Pidl/Samba4.pm
pidl/lib/Parse/Pidl/Samba4/COM/Header.pm
pidl/lib/Parse/Pidl/Samba4/COM/Proxy.pm
pidl/lib/Parse/Pidl/Samba4/COM/Stub.pm
pidl/lib/Parse/Pidl/Samba4/Header.pm
pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm
pidl/lib/Parse/Pidl/Samba4/Python.pm
pidl/lib/Parse/Pidl/Samba4/TDR.pm
pidl/lib/Parse/Pidl/Samba4/Template.pm
pidl/lib/Parse/Pidl/Typelist.pm
pidl/lib/Parse/Pidl/Util.pm
pidl/lib/Parse/Pidl/Wireshark/Conformance.pm
pidl/lib/Parse/Pidl/Wireshark/NDR.pm
pidl/lib/Parse/Yapp/Driver.pm
pidl/tests/Util.pm
source4/build/pasn1/util.pm
source4/selftest/win/VMHost.pm

and here are the strict-less ones:

$ git grep -L 'use strict' :/*.p[ml]
docs-xml/scripts/indent-smb.conf.pl
examples/LDAP/ol-schema-migrate.pl
examples/logon/genlogon/genlogon.pl
examples/scripts/eventlog/parselog.pl
examples/scripts/printing/cups/smbaddprinter.pl
examples/scripts/printing/cups/smbdelprinter.pl
source3/script/count_80_col.pl
source3/script/fix_bool.pl
source3/script/scancvslog.pl
source3/script/strip_trail_ws.pl
source4/heimdal/cf/make-proto.pl
source4/heimdal/lib/hcrypto/libtommath/booker.pl
source4/selftest/win/VMHost.pm
source4/selftest/win/vm_get_ip.pl
source4/selftest/win/vm_load_snapshot.pl

Douglas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-selftest-perl-modules-use-warnings.patch
Type: text/x-patch
Size: 1966 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180207/bae237e1/0001-selftest-perl-modules-use-warnings.bin>


More information about the samba-technical mailing list