s3:selftest: run test_smbclient_tarmode.pl with a fixed subdirectory name
authorStefan Metzmacher <metze@samba.org>
Thu, 17 Dec 2020 05:38:14 +0000 (06:38 +0100)
committerKarolin Seeger <kseeger@samba.org>
Wed, 3 Mar 2021 08:11:09 +0000 (08:11 +0000)
$PREFIX is the the value from --with-selftest-prefix.

The result of the test should not depend on --with-selftest-prefix,
the 'long_path' test in particular.

If the path is to long smbclient (via libarchive) will only
put the full path into a PAX HEADER as 'path' keyword,
that's fine in general, modern tools handle it just fine.
But Perl's Archive::Tar don't handle it and only seems
truncated file names.

I have a fix for Archive::Tar, see:
https://git.samba.org/?p=metze/samba/wip.git;a=shortlog;h=c75037d0a06a96cdaca3f3b20a6d237e768b075b

But finishing that is a task for another day, for now I just want to remove
the dependency to --with-selftest-prefix.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14628

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit e0d9b656452ba6277cdc7f0abb2a06d3d284ef3a)
(cherry picked from commit 3eba14718dd6269fe1657de15a2f47c848b60518)

source3/selftest/tests.py

index bbd249c3ccb0cbaecfea1f41898cb94ac9aa7a2a..47e914b10093031fab2e3d2d673682844b4a517a 100755 (executable)
@@ -487,13 +487,13 @@ for env in ["fileserver"]:
                   [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.pl"),
                    '-n', '$SERVER', '-i', '$SERVER_IP', '-s', 'tarmode2',
                    '-u', '$USERNAME', '-p', '$PASSWORD', '-l', '$LOCAL_PATH/tarmode2',
-                   '-d', '$PREFIX', '-b', smbclient3,
+                   '-d', 'smbclient_tar.NT1', '-b', smbclient3,
                    '--subunit', '--', configuration, '-mNT1'])
     plantestsuite("samba3.blackbox.smbclient_tar.SMB3", env,
                   [os.path.join(samba3srcdir, "script/tests/test_smbclient_tarmode.pl"),
                    '-n', '$SERVER', '-i', '$SERVER_IP', '-s', 'tarmode2',
                    '-u', '$USERNAME', '-p', '$PASSWORD', '-l', '$LOCAL_PATH/tarmode2',
-                   '-d', '$PREFIX', '-b', smbclient3,
+                   '-d', 'smbclient_tar.SMB3', '-b', smbclient3,
                    '--subunit', '--', configuration, '-mSMB3'])
 
 for env in ["fileserver:local"]: