Help writing new SAMBA_INTERNAL DNS test code please.

Jeremy Allison jra at samba.org
Tue Aug 31 20:36:05 UTC 2021


On Tue, Aug 31, 2021 at 05:20:57PM +1200, Matt Grant via samba-technical wrote:
>Hi Andrew!
>
>Have not created Samba bugs for the following yet, as I am trying to get
>the hardest part doen, writing the test code.
>
>   1. Dns server port number specification for smb.conf 'dns forwarder'
>   server list
>   2. Restricting the dynamic DNS update ranges so that the SAMBA_INTERNAL
>   server is not spammed with IPv6 PD addresses from the ISP.
>
>Main issue is being able to dynamically change the smb.conf setup for the
>Python self test hookup, for 1, specifically within
>samba.tests.dns_forwarder.  Being able to do this will also make 2 far
>easier.  After looking at the test code set up, I can't see how to
>dynamically change the smb.conf file in st/samba/smb.conf while the tests
>are running to set up for testing the port numbers or not.

Look at tests like:

source3/script/tests/test_deadtime.sh

they use a feature:

global_inject_conf=$(dirname $SMB_CONF_PATH)/global_inject.conf

that allows a test to include dynamic smb.conf entries for Samba3
tests via the line:

         include = $globalinjectconf

inside selftest/target/Samba3.pm.

I don't think the same feature is in selftest/target/Samba4.pm
but I'd look into adding that. It might do what you need.

Hope this helps !

Jeremy.



More information about the samba-technical mailing list