summaryrefslogtreecommitdiff
path: root/source4/selftest
diff options
context:
space:
mode:
Diffstat (limited to 'source4/selftest')
-rw-r--r--source4/selftest/output/plain.pm25
-rwxr-xr-xsource4/selftest/samba4_tests.sh48
-rwxr-xr-xsource4/selftest/selftest.pl3
-rw-r--r--source4/selftest/target/Samba4.pm1
4 files changed, 61 insertions, 16 deletions
diff --git a/source4/selftest/output/plain.pm b/source4/selftest/output/plain.pm
index 4bec4e0fdc..4e1e290534 100644
--- a/source4/selftest/output/plain.pm
+++ b/source4/selftest/output/plain.pm
@@ -48,10 +48,7 @@ sub start_testsuite($$)
if ($self->{immediate}) {
print "$out\n";
} else {
- require Term::ReadKey;
- my ($wchar, $hchar, $wpixels, $hpixels) = Term::ReadKey::GetTerminalSize();
- foreach (1..$wchar) { $out.= " "; }
- print "\r".substr($out, 0, $wchar);
+ print "$out: ";
}
}
@@ -94,6 +91,13 @@ sub end_testsuite($$$$$)
$out .= $self->{test_output}->{$name};
}
+ if (not $self->{immediate}) {
+ if (not $unexpected) {
+ $out .= " ok\n";
+ } else {
+ $out .= " " . uc($result) . "\n";
+ }
+ }
print $out;
}
@@ -120,6 +124,12 @@ sub end_test($$$$$)
unless ($unexpected) {
$self->{test_output}->{$self->{NAME}} = "";
+ if (not $self->{immediate}) {
+ if ($result eq "failure") { print "f"; }
+ elsif ($result eq "skip") { print "s"; }
+ elsif ($result eq "success") { print "."; }
+ else { print "?($result)"; }
+ }
return;
}
@@ -133,6 +143,13 @@ sub end_test($$$$$)
print $self->{test_output}->{$self->{NAME}};
$self->{test_output}->{$self->{NAME}} = "";
}
+
+ if (not $self->{immediate}) {
+ if ($result eq "error") { print "E"; }
+ elsif ($result eq "failure") { print "F"; }
+ elsif ($result eq "success") { print "S"; }
+ else { print "?"; }
+ }
}
sub summary($)
diff --git a/source4/selftest/samba4_tests.sh b/source4/selftest/samba4_tests.sh
index a72024e9e1..36d52fff5a 100755
--- a/source4/selftest/samba4_tests.sh
+++ b/source4/selftest/samba4_tests.sh
@@ -60,12 +60,8 @@ $incdir/../bin/smbtorture -V
samba4srcdir=$incdir/..
samba4bindir=$samba4srcdir/bin
-SCRIPTDIR=$samba4srcdir/../testprogs/ejs
smb4torture="$samba4bindir/smbtorture $TORTURE_OPTIONS"
-plantest "js.base" dc "$SCRIPTDIR/base.js" $CONFIGURATION
-plantest "js.ldb" none "$SCRIPTDIR/ldb.js" `pwd` $CONFIGURATION -d 10
-
# Simple tests for LDAP and CLDAP
for options in "" "--option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD --option=socket:testnonblock=true" "-U\$USERNAME%\$PASSWORD"; do
@@ -287,10 +283,6 @@ for t in "BASE-RW1"; do
plantest "ntvfs.simple.`normalize_testname $t`" dc $VALGRIND $smb4torture $ADDARGS //\$SERVER/simple -U"\$USERNAME"%"\$PASSWORD" $t
done
-DATADIR=$samba4srcdir/../testdata
-
-plantest "js.samba3sam" none $samba4bindir/smbscript $SCRIPTDIR/samba3sam.js $CONFIGURATION `pwd` $DATADIR/samba3/
-
# Domain Member Tests
plantest "rpc.echo against member server with local creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" RPC-ECHO "$*"
@@ -300,6 +292,46 @@ plantest "rpc.samr.users against member server with local creds" member $VALGRIN
plantest "rpc.samr.passwords against member server with local creds" member $VALGRIND $smb4torture ncacn_np:"\$NETBIOSNAME" -U"\$NETBIOSNAME/\$USERNAME"%"\$PASSWORD" "RPC-SAMR-PASSWORDS" "$*"
plantest "blackbox.smbclient against member server with local creds" member $samba4srcdir/client/tests/test_smbclient.sh "\$NETBIOSNAME" "\$USERNAME" "\$PASSWORD" "\$NETBIOSNAME" "$PREFIX"
+# Tests SMB signing
+
+for mech in \
+ "-k no" \
+ "-k no --option=usespnego=no" \
+ "-k no --option=gensec:spengo=no" \
+ "-k yes" \
+ "-k yes --option=gensec:fake_gssapi_krb5=yes --option=gensec:gssapi_krb5=no"; do
+ for signing in \
+ "--signing=on" \
+ "--signing=required"; do
+
+ signoptions="$mech $signing"
+ name="smb.signing on with $signoptions"
+ plantest "$name" dc $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp $signoptions -U"\$USERNAME"%"\$PASSWORD" BASE-XCOPY "$*"
+ done
+done
+
+for mech in \
+ "-k no" \
+ "-k no --option=usespnego=no" \
+ "-k no --option=gensec:spengo=no" \
+ "-k yes" \
+ "-k yes --option=gensec:fake_gssapi_krb5=yes --option=gensec:gssapi_krb5=no"; do
+ signoptions="$mech --signing=off"
+ name="smb.signing on with $signoptions"
+ plantest "$name domain-creds" member $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp $signoptions -U"\$DC_USERNAME"%"\$DC_PASSWORD" BASE-XCOPY "$*"
+done
+for mech in \
+ "-k no" \
+ "-k no --option=usespnego=no" \
+ "-k no --option=gensec:spengo=no"; do
+ signoptions="$mech --signing=off"
+ name="smb.signing on with $signoptions"
+ plantest "$name local-creds" member $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp $signoptions -U"\$NETBIOSNAME\\\\\$USERNAME"%"\$PASSWORD" BASE-XCOPY "$*"
+done
+plantest "--signing=yes anon" dc $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp -k no --signing=yes -U% BASE-XCOPY "$*"
+plantest "--signing=required anon" dc $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp -k no --signing=required -U% BASE-XCOPY "$*"
+plantest "--signing=no anon" member $VALGRIND $smb4torture //"\$NETBIOSNAME"/tmp -k no --signing=no -U% BASE-XCOPY "$*"
+
NBT_TESTS=`$smb4torture --list | grep "^NBT-" | xargs`
for t in $NBT_TESTS; do
diff --git a/source4/selftest/selftest.pl b/source4/selftest/selftest.pl
index e86ccbe468..51a354c7a4 100755
--- a/source4/selftest/selftest.pl
+++ b/source4/selftest/selftest.pl
@@ -417,8 +417,6 @@ sub prefix_pathvar($$)
}
}
prefix_pathvar("PKG_CONFIG_PATH", "$old_pwd/bin/pkgconfig");
-# Required for smbscript:
-prefix_pathvar("PATH", "$old_pwd/bin");
prefix_pathvar("PYTHONPATH", "$old_pwd/bin/python");
if ($opt_socket_wrapper_keep_pcap) {
@@ -576,7 +574,6 @@ sub write_clientconf($$)
}
print CF "
private dir = $prefix_abs/client/private
- js include = $srcdir_abs/scripting/libjs
name resolve order = bcast
panic action = $srcdir_abs/script/gdb_backtrace \%PID\% \%PROG\%
max xmit = 32K
diff --git a/source4/selftest/target/Samba4.pm b/source4/selftest/target/Samba4.pm
index 8835f69c6c..992e251c35 100644
--- a/source4/selftest/target/Samba4.pm
+++ b/source4/selftest/target/Samba4.pm
@@ -555,7 +555,6 @@ sub provision($$$$$$)
lock dir = $lockdir
setup directory = $self->{setupdir}
modules dir = $self->{bindir}/modules
- js include = $srcdir/scripting/libjs
winbindd socket directory = $winbindd_socket_dir
winbindd privileged socket directory = $winbindd_privileged_socket_dir
ntp signd socket directory = $ntp_signd_socket_dir