Remove (some) bashisms from the test scripts
Uri Simchoni
uri at samba.org
Mon Dec 25 04:55:51 UTC 2017
On 12/25/2017 05:07 AM, Christof Schmitt wrote:
> On Sat, Dec 23, 2017 at 09:38:06PM +0200, Uri Simchoni via samba-technical wrote:
>
>> Other than that:
>> Just to make things clear - the Samba test suite policy has always been
>> not to assume that /bin/sh is bash. On the build server, /bin/sh is
>> dash. It appears the "bashisms" you pointed out never execute during
>> selftest (which means we don't have tests for adding/removing/modifying
>> shares via RPC...).
>
> We do have tests for share management through RPC calls, see
> the test in source3/script/tests/test_rpcclientsrvsvc.sh. If there are
> bashisms, then it looks like they are no problem with Debian's dash, but
> mainly with FreeBSD.
>
> Christof
>
Ok, missed that one. Sorry. But dash doesn't support '[['. When I run
that (unfixed) test using dash, the server log shows:
smbd version 4.8.0pre1-DEVELOPERBUILD started.
Copyright Andrew Tridgell and the Samba Team 1992-2017
Test dummy executed!
daemon_ready: STATUS=daemon 'smbd' finished starting up and ready to
serve connections
/home/uri/s2/bin/smbchangeshare: 23: /home/uri/s2/bin/smbchangeshare:
[[: not found
/home/uri/s2/bin/smbchangeshare: 30: /home/uri/s2/bin/smbchangeshare:
[[: not found
/home/uri/s2/bin/smbchangeshare: 37: /home/uri/s2/bin/smbchangeshare:
[[: not found
/home/uri/s2/bin/smbchangeshare: 44: /home/uri/s2/bin/smbchangeshare:
[[: not found
delete_share_security: Failed to delete entry for share srvsvctest:
NT_STATUS_NOT_FOUND
... and the test as a whole passes.
Thanks,
Uri.
More information about the samba-technical
mailing list