From: Garming Sam Date: Sun, 26 Feb 2017 22:39:51 +0000 (+1300) Subject: samba_dnsupdate: Add additional debugging X-Git-Tag: tdb-1.3.13~329 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=f55399fb39da533c573b2ee82c26bed46aa55593 samba_dnsupdate: Add additional debugging Tests are still flapping, because it claims it needs a cache rebuild. Signed-off-by: Garming Sam Reviewed-by: Andrew Bartlett Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Tue Mar 28 00:04:54 CEST 2017 on sn-devel-144 --- diff --git a/python/samba/tests/blackbox/samba_dnsupdate.py b/python/samba/tests/blackbox/samba_dnsupdate.py index ee8ae2673f4..7ddaab7cff4 100644 --- a/python/samba/tests/blackbox/samba_dnsupdate.py +++ b/python/samba/tests/blackbox/samba_dnsupdate.py @@ -49,11 +49,11 @@ class SambaDnsUpdateTests(samba.tests.BlackboxTestCase): self.assertTrue("No DNS updates needed" in out, out) try: - out = self.check_output("samba_dnsupdate --verbose --use-samba-tool --rpc-server-ip=%s" % self.server_ip) + rpc_out = self.check_output("samba_dnsupdate --verbose --use-samba-tool --rpc-server-ip=%s" % self.server_ip) except samba.tests.BlackboxProcessError as e: self.fail("Error calling samba_dnsupdate: %s" % e) - self.assertTrue(" DNS updates and" in out, out) - self.assertTrue(" DNS deletes needed" in out, out) + self.assertTrue(" DNS updates and" in rpc_out, rpc_out) + self.assertTrue(" DNS deletes needed" in rpc_out, rpc_out) out = self.check_output("samba_dnsupdate --verbose") - self.assertTrue("No DNS updates needed" in out, out) + self.assertTrue("No DNS updates needed" in out, out + rpc_out) diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate index 1633561e173..06877038e1f 100755 --- a/source4/scripting/bin/samba_dnsupdate +++ b/source4/scripting/bin/samba_dnsupdate @@ -749,6 +749,8 @@ for d in dns_list: break if not found: rebuild_cache = True + if opts.verbose: + print "need cache add: %s" % d if opts.all_names: update_list.append(d) if opts.verbose: @@ -768,6 +770,8 @@ for c in cache_list: if found: continue rebuild_cache = True + if opts.verbose: + print "need cache remove: %s" % c if not opts.all_names and not check_dns_name(c): continue delete_list.append(c)