mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
selftest: Pass uid_wrapper library to selftest and preload it.
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
751b2b2d2a
commit
9feeeb369b
@ -52,6 +52,7 @@ my $ldap = undef;
|
||||
my $opt_resetup_env = undef;
|
||||
my $opt_binary_mapping = "";
|
||||
my $opt_load_list = undef;
|
||||
my $opt_libuid_wrapper_so_path = "";
|
||||
my @testlists = ();
|
||||
|
||||
my $srcdir = ".";
|
||||
@ -201,6 +202,9 @@ Paths:
|
||||
--srcdir=DIR source directory [.]
|
||||
--bindir=DIR binaries directory [./bin]
|
||||
|
||||
Preload cwrap:
|
||||
--uid_wrapper_so_path=FILE the uid_wrapper library to preload
|
||||
|
||||
Target Specific:
|
||||
--socket-wrapper-pcap save traffic to pcap directories
|
||||
--socket-wrapper-keep-pcap keep all pcap files, not just those for tests that
|
||||
@ -239,7 +243,8 @@ my $result = GetOptions (
|
||||
'testlist=s' => \@testlists,
|
||||
'random-order' => \$opt_random_order,
|
||||
'load-list=s' => \$opt_load_list,
|
||||
'binary-mapping=s' => \$opt_binary_mapping
|
||||
'binary-mapping=s' => \$opt_binary_mapping,
|
||||
'uid_wrapper_so_path=s' => \$opt_libuid_wrapper_so_path
|
||||
);
|
||||
|
||||
exit(1) if (not $result);
|
||||
@ -335,6 +340,19 @@ if ($opt_socket_wrapper_pcap) {
|
||||
$opt_socket_wrapper = 1;
|
||||
}
|
||||
|
||||
my $ld_preload = $ENV{LD_PRELOAD};
|
||||
|
||||
if ($opt_libuid_wrapper_so_path) {
|
||||
if ($ld_preload) {
|
||||
$ld_preload = "$ld_preload:$opt_libuid_wrapper_so_path";
|
||||
} else {
|
||||
$ld_preload = "$opt_libuid_wrapper_so_path";
|
||||
}
|
||||
}
|
||||
|
||||
$ENV{LD_PRELOAD} = $ld_preload;
|
||||
print "LD_PRELOAD=$ENV{LD_PRELOAD}\n";
|
||||
|
||||
my $socket_wrapper_dir;
|
||||
if ($opt_socket_wrapper) {
|
||||
$socket_wrapper_dir = SocketWrapper::setup_dir("$prefix_abs/w", $opt_socket_wrapper_pcap);
|
||||
|
@ -200,6 +200,8 @@ def cmd_testonly(opt):
|
||||
else:
|
||||
env.SELFTEST_TARGET="samba3"
|
||||
|
||||
env.OPTIONS += " --uid_wrapper_so_path=" + CONFIG_GET(opt, 'LIBUID_WRAPPER_SO_PATH')
|
||||
|
||||
# We use the full path rather than relative path because it cause problems on some plateforms (ie. solaris 8).
|
||||
env.CORE_COMMAND = '${PERL} ${srcdir}/selftest/selftest.pl --target=${SELFTEST_TARGET} --prefix=${SELFTEST_PREFIX} --srcdir=${srcdir} --exclude=${srcdir}/selftest/skip ${TESTLISTS} ${OPTIONS} ${TESTS}'
|
||||
if Options.options.LIST:
|
||||
|
Loading…
x
Reference in New Issue
Block a user