dbcheck failures on Fedora (was: Re: Remove (some) bashisms from the test scripts)

Andrew Bartlett abartlet at samba.org
Sun Jan 28 20:12:06 UTC 2018


On Sun, 2018-01-28 at 18:55 +0100, Timur I. Bakeyev wrote:
> 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).

This one Andreas raised just before the release because this overall
test now fails for him on Fedora, but not Ubuntu. 

We either need to do that (use bash explicitly) or need to have a way
to ensure these don't come back. 

One approach would be to put ShellCheck (with an ignore pattern or
expected set of errors) into make test, alongside the python pep8
checks.  

Andrew Bartlett

> 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.
> 
> 
-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba




More information about the samba-technical mailing list