]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
selftest: run libsmbclient unix ext tests against "posix_share"
authorVolker Lendecke <vl@samba.org>
Sun, 1 Mar 2020 15:47:27 +0000 (16:47 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 3 Mar 2020 17:48:38 +0000 (17:48 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/selftest/tests.py

index 5796f828bdd79a5155a8cebcfd204ca83d27ea02..3cd79470a950136fb39ff89030195fc42b9604b9 100755 (executable)
@@ -367,34 +367,43 @@ for t in base + raw + smb2 + netapi:
 
 def planlibsmbclienttest(name, testargs, proto):
     env = "nt4_dc"
+
+    url = "--option=torture:smburl=smb://$USERNAME:$PASSWORD@$SERVER"
+
     cmdarray = selftesthelpers.smbtorture4testsuite_cmdarray(
         name,
         env,
         testargs + [ "--option=torture:clientprotocol=%s" % proto],
         'samba4')
+
+    urloption = url
+    if name != "libsmbclient.list_shares":
+        urloption += "/posix_share"
+
     plantestsuite_loadlist(
-        "samba4.unix_ext.%s.%s" % (t, proto), env, " ".join(cmdarray))
+        "samba4.unix_ext.%s.%s" % (t, proto),
+        env,
+        " ".join(cmdarray + [urloption]))
+
+    urloption = url
+    if name != "libsmbclient.list_shares":
+        urloption += "/tmp"
 
     plantestsuite_loadlist(
         "samba4.non_unix_ext.%s.%s" % (t, proto),
         env,
         "(inject=\"${SERVERCONFFILE%/*}/global_inject.conf\"; " +
         "echo \"unix extensions = no\" > ${inject} ; " +
-        " ".join(cmdarray) +
+        " ".join(cmdarray + [urloption]) +
         "; > ${inject})")
 
 
 libsmbclient = smbtorture4_testsuites("libsmbclient.")
 protocols = [ 'NT1', 'SMB3' ]
 for t in libsmbclient:
-    url = "smb://$USERNAME:$PASSWORD@$SERVER/tmp"
-    if t == "libsmbclient.list_shares":
-        url = "smb://$USERNAME:$PASSWORD@$SERVER"
-
     libsmbclient_testargs = [
         '//$SERVER/tmp',
         '-U$USERNAME%$PASSWORD',
-        "--option=torture:smburl=" + url,
         "--option=torture:replace_smbconf="
         "%s/testdata/samba3/smb_new.conf" % srcdir()
         ]