Remove (some) bashisms from the test scripts

Timur I. Bakeyev timur at freebsd.org
Sun Jan 28 17:55:55 UTC 2018


Hi, Uri!

I was wondering myself what is the state of my patches? Do I need to do
anything else to get them pushed into upstream?

Error you mentioned is a good example why we should eliminate bash-isms(or
switch entirely to bash in the tests to avoid such problems).

With best regards,
Timur.


On 28 January 2018 at 18:21, Uri Simchoni <uri at samba.org> wrote:

> On 01/03/2018 11:45 PM, Uri Simchoni via samba-technical wrote:
> <snip>
> >
> > I tried pushing this and it consistently fails on
> > samba4.blackbox.dbcheck.release-4-0-0.
> >
> > I suspect that the following patch is causing a test that previously
> > never ran to run, and fail:
> >
> > --- a/testprogs/blackbox/dbcheck-oldrelease.sh
> > +++ b/testprogs/blackbox/dbcheck-oldrelease.sh
> > @@ -366,19 +366,19 @@ check_expected_after_deleted_objects() {
> >  }
> >
> >  referenceprovision() {
> > -    if [ x$RELEASE == x"release-4-0-0" ]; then
> > +    if [ x$RELEASE = x"release-4-0-0" ]; then
> >          $PYTHON $BINDIR/samba-tool domain provision --server-role="dc"
> > --domain=SAMBA --host-name=ares --realm=${RELEASE}.samba.corp
> > --targetdir=$PREFIX_ABS/${RELEASE}_reference --use-ntvfs
> > --host-ip=127.0.0.1 --host-ip6=::1 --function-l
> >      fi
> >  }
> >
> >  ldapcmp() {
> > -    if [ x$RELEASE == x"release-4-0-0" ]; then
> > +    if [ x$RELEASE = x"release-4-0-0" ]; then
> >           $PYTHON $BINDIR/samba-tool ldapcmp
> > tdb://$PREFIX_ABS/${RELEASE}_reference/private/sam.ldb
> > tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --two --skip-missing-dn
> > --filter=dnsRecord
> >      fi
> >  }
> >
> >  ldapcmp_sd() {
> > -    if [ x$RELEASE == x"release-4-0-0" ]; then
> > +    if [ x$RELEASE = x"release-4-0-0" ]; then
> >          $PYTHON $BINDIR/samba-tool ldapcmp
> > tdb://$PREFIX_ABS/${RELEASE}_reference/private/sam.ldb
> > tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb --two --sd
> --skip-missing-dn
> >      fi
> >  }
> >
> >
> > It also consistently fails without the patch on my bash-based autobuild
> > machine (consistent with bash understanding ==), but I can't yet explain
> > why it started failing, since this is an old test and I've been using
> > bash for autobuild all along.
> >
> > Andrew, can you please have a look?
> >
> > Thanks,
> > Uri.
> >
>
> Ping...
> (summary - it appears like a certain AD-ldb test never actually runs on
> autobuild due to "bashism", and once the bashism is fixed, it does run
> and fails)
>
> Thanks,
> Uri.
>


More information about the samba-technical mailing list