1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

110 Commits

Author SHA1 Message Date
Andrew Kroeger
5afa115f2a selftest: Account for 0-based months in date parsing and printing.
All:

Please find attached 2 patches to correct date/time parsing and output
in the Subunit processing.  The first patch corrects the logic to
account for months being 0-based.  The second corrects the time
formatting, as it is dealing with local, not "Z"ulu (UTC) time.

Sincerely,
Andrew Kroeger

>From 3cf81eea1309084a973359c7f6a2375d5d20a3f0 Mon Sep 17 00:00:00 2001
From: Andrew Kroeger <andrew@id10ts.net>
Date: Fri, 4 Sep 2009 01:24:00 -0500
Subject: [PATCH] selftest: Account for 0-based months in date parsing and printing.
2009-09-05 10:06:29 +10:00
Andrew Bartlett
5255ba3c4f s4:selftest Confirm that there isn't a listener on the ldapi:// socket
This should help debug problems with 'make test' of the LDAP backend,
if a stray listener is still around.

Andrew Bartlett
2009-08-17 09:51:00 +10:00
Andrew Bartlett
f87811f6b3 s4:provision Rework provision-backend into provision
This removes a *lot* of duplicated code and the cause of much
administrator frustration.  We now handle starting and stopping the
slapd (at least for the provision), and ensure that there is only one
'right' way to configure the OpenLDAP and Fedora DS backend

We now run OpenLDAP in 'cn=config' mode for online configuration.

To test what was the provision-backend code, a new --ldap-dryrun-mode
option has been added to provision.  It quits the provision just
before it would start the LDAP binaries

Andrew Bartlett
2009-08-17 09:50:58 +10:00
Andrew Tridgell
2d7b457e26 fixed TESTS= in make test to allow multiple tests
Now you can do: make test TESTS="test1 test2" and it will run those
two tests, each matching tests using a case insensitive substring
match
2009-08-14 13:05:06 +10:00
Andrew Tridgell
ad542a630e Allow selection of the samba4 process model for 'make test'
To choose the process model, set the environment variable
SAMBA_PROCESS_MODEL to the desired model. This will allow us to enable
the standard process model for some machines in the build farm without
enabling it for all of them. I don't want to just enable it
universally as I am concerned with total memory using during some of
the tests.
2009-08-12 14:41:44 +10:00
Andrew Tridgell
0ae3912f32 print server log on stderr as well as to log file
I think we are missing some important messages from the server during
'make test' because we don't show the log file contents during
runs. This patch uses tee to put the log messages to stderr so we can
see any server messages associated with the test that caused them.
2009-08-12 14:38:55 +10:00
Andrew Bartlett
69fa901bca s4:selftest Don't start the slapd for the provision, only for the run
The provision-backend script now starts slapd for us

Andrew Bartlett
2009-08-12 10:01:49 +10:00
Andrew Bartlett
4921a5853b s4:selftest Make OpenLDAP guess it's own modules from now on
In the releases of OpenLDAP we require (2.4.17) it can guess this much
itself, so no need for us to do it.

Andrew Bartlett
2009-08-12 10:01:48 +10:00
Oliver Liebel
28bcdf5266 s4:provision Rework and further automate setup of OpenLDAP backend
heres the summary of all changes/extensions:

- Andrew Bartlett's patch to generate indext
- Howard Chu's idea to use nosync on the DB included, but made optional

- slaptest-path is not needed any more (slapd -Ttest is used instead)
and is therefore removed. slapd-path is now recommended when
openldap-backend is chosen.
its also used for olc-conversion

- slapd-detection is now always done by ldapsearch (ldb module),
looking anonymous for objectClass: OpenLDAProotDSE via our ldapi_uri.

- if ldapsearch was not successfull, (no slapd listening on our socket)
slapd is
started via special generated slapdcommand_prov  (ldapi_uri only)

- slapd-"provision-process" startup is done via pythons subprocess.

- the slapd-provision-pid is stored under paths.ldapdir/slapd_provision_pid.

- after provision-backend is finished:
--- slapd.pid is compared with our stored slapd_provision_pid.
if the are unique, slapd.pid will be read out, and the
slapd "provison"-process will be shut down.
--- proper slapd-shutdown is verified again with ldb-search -> ldapi_uri
-> rootDSE.
--- if the pids are different or one of the pid-files is missing, slapd
will not be shut down,
instead an error message is displayed to locate slapd manually
--- extended help-messages (relevant to slapd) are always displayed,
e.g. the commandline with which slapd has to be started when everythings
finished
(slapd-commandline is stored under paths.ldapdir/slapd_command_file.txt))

- upgraded the content of the mini-howto (howto-ol-backend-s4.txt)
2009-08-12 10:01:48 +10:00
Stefan Metzmacher
303c3b363b selftest: configure "ncalrpc dir" for the client
Some torture tests will need this soon.

metze
2009-08-11 14:58:00 +02:00
Stefan Metzmacher
76d893b76e selftest: fix typo lock => lockdir
metze
2009-08-11 14:58:00 +02:00
Andrew Tridgell
fd43e0ee09 added a uid_wrapper library
This library intercepts seteuid and related calls, and simulates them
in a manner similar to the nss_wrapper and socket_wrapper
libraries. This allows us to enable the vfs_unixuid NTVFS module in
the build farm, which means we are more likely to catch errors in the
token manipulation.

The simulation is not complete, but it is enough for Samba4 for
now. The major areas of incompleteness are:

 - no emulation of setreuid, setresuid or saved uids. These would be
   needed for use in Samba3

 - no emulation of ruid changing. That would also be needed for Samba3

 - no attempt to emulate file ownership changing, so code that (for
   example) tests whether st.st_uid matches geteuid() needs special
   handling
2009-08-05 10:51:00 +10:00
Andrew Bartlett
8ff1f50b0c s4:kerberos Add support for user principal names in certificates
This extends the PKINIT code in Heimdal to ask the HDB layer if the
User Principal Name name in the certificate is an alias (perhaps just
by case change) of the name given in the AS-REQ.  (This was a TODO in
the Heimdal KDC)

The testsuite is extended to test this behaviour, and the other PKINIT
certficate (using the standard method to specify a principal name in a
certificate) is updated to use a Administrator (not administrator).
(This fixes the kinit test).

Andrew Bartlett
2009-07-28 14:10:47 +10:00
Andrew Bartlett
cdd7a5208f s4:kerberos Add test to show that we actually export the keytab
While it is hard to prove it is correct, at least the new
'nettestuser' principal and the Administrator principal are correct.

We had to fix the case of 'Administrator' in the selftest code to
match the DB, as the keytab lookup is case sensitive.

Andrew Bartlett
2009-07-27 22:41:43 +10:00
Jelmer Vernooij
57cd98de72 selftest: report time after testsuite, gives nicer output on the
buildfarm.
2009-06-17 21:37:49 +02:00
Jelmer Vernooij
89aed2771c subunit: non-zero exit code if one or more testsuites failed. 2009-06-12 17:54:47 +02:00
Jelmer Vernooij
93384da226 selftest: Document the fact that test runner and formatter are now
separate tools.
2009-06-12 17:54:47 +02:00
Jelmer Vernooij
7c3f31a262 subunit: Pass canonical names of test results to formatters and filters. 2009-06-12 15:08:14 +02:00
Jelmer Vernooij
718f9be8a2 selftest: Add option to strip output of succeeded tests, and use it on
the buildfarm.

The matches the behaviour we had earlier in the previous output format.
2009-06-12 14:34:24 +02:00
Jelmer Vernooij
13e1654c4a selftest: Remove existing buildfarm output format. 2009-06-12 14:21:15 +02:00
Jelmer Vernooij
994a4d35fc format-subunit: Remove subunit output module.
We can still use "cat" to obtain a subunit stream from a subunit stream. :-)
2009-06-12 14:14:27 +02:00
Jelmer Vernooij
b8f36d3eb8 selftest/buildfarm: Don't assume that a reason being specified is an indication of failure. 2009-06-12 00:22:39 +02:00
Jelmer Vernooij
8fc3602582 subunit-filter: Print names of skipped testsuites. 2009-06-12 00:22:39 +02:00
Jelmer Vernooij
cc216340a6 selftest: Fix exit code for format-subunit.pl. 2009-06-11 20:00:00 +02:00
Jelmer Vernooij
3344df8d2f selftest: Fix uninitialized variables in selftest output. 2009-06-11 20:00:00 +02:00
Jelmer Vernooij
2ffffcb220 subunit: Sort diff output. 2009-06-11 20:00:00 +02:00
Jelmer Vernooij
9faaffa87b selftest: Make it easier to do subunit diffs from other apps. 2009-06-11 19:59:59 +02:00
Jelmer Vernooij
84f2d3001d selftest/subunit: Add diff command that can diff two subunit streams. 2009-06-11 19:59:59 +02:00
Jelmer Vernooij
d8a77a798b selftest: Properly recognize xfail testsuites. 2009-06-11 19:59:59 +02:00
Jelmer Vernooij
2e311fdac5 selftest/subunit: Remove open_tests argument from parse_results. 2009-06-11 19:59:59 +02:00
Jelmer Vernooij
ed61cc5419 selftest: Fix subunit formatting, fix years when filtering subunit
streams.
2009-06-11 19:59:59 +02:00
Jelmer Vernooij
68578d6374 selftest: Fix handling of testsuite, reintroduce progress indication. 2009-06-11 19:59:59 +02:00
Jelmer Vernooij
e979560c13 selftest: Remove unnecessary uses. 2009-06-11 19:59:59 +02:00
Jelmer Vernooij
8a76e4ab29 selftest/subunit: Remove prefix command. 2009-06-11 19:59:58 +02:00
Jelmer Vernooij
4308e69084 selftest: Fix subunit stream to include the right prefixes rather than
extending the subunit protocol.
2009-06-11 19:59:58 +02:00
Jelmer Vernooij
c278ee50ee More work supporting prefixes. 2009-06-11 19:59:58 +02:00
Jelmer Vernooij
16a69f358a selftest: Use external processes for filtering known failures and pretty
formatting.
2009-06-11 19:59:58 +02:00
Jelmer Vernooij
9bdf76c9c2 selftest: Avoid decreasing total testsuites if the original total is not
known.
2009-06-11 19:59:58 +02:00
Jelmer Vernooij
24f01e70aa selftest: Use filter-xfail for known failures 2009-06-11 19:59:58 +02:00
Jelmer Vernooij
4e276fb60a selftest: Add script to filter out known failures from a subunit stream. 2009-06-11 19:59:58 +02:00
Jelmer Vernooij
0e2f97092c Subunit: Support "fail" as alias for "failure" in Subunit streams. 2009-06-11 19:59:58 +02:00
Jelmer Vernooij
9e108009d0 subunit: Move more Subunit printing logic to Subunit.pm. 2009-06-11 19:59:57 +02:00
Jelmer Vernooij
0a1dbf353d subunit: Support the time: command. 2009-06-11 19:59:57 +02:00
Günther Deschner
9ac7e78041 s3-selftest: forward NSS_WRAPPER_WINBIND_SO_PATH env to tests.
Guenther
2009-06-08 11:03:07 +02:00
Jelmer Vernooij
b0654b3323 selftest: Add script that can take a subunit stream and format it. 2009-06-03 17:16:56 +02:00
Jelmer Vernooij
2e7022eda0 selftest/plain: Allow caller to not specify the number of expected
testsuites to run.
2009-06-03 17:16:25 +02:00
Jelmer Vernooij
4828f75fed selftest: Fix target/Samba4 tests. 2009-06-03 16:26:30 +02:00
Jelmer Vernooij
4bbef3bcd8 Remove empty unit test. 2009-06-03 16:26:30 +02:00
Jelmer Vernooij
e72be91eba selftest/README: Fix formatting. 2009-06-03 16:26:30 +02:00
Jelmer Vernooij
1dac17f941 selftest: Factor generic functionality for buildfarm output into a
separate perl module.
2009-06-03 16:26:30 +02:00