summaryrefslogtreecommitdiff
path: root/source3/script/tests
AgeCommit message (Collapse)AuthorFilesLines
2026-04-22s3:tests: Improve debugging for test_wbinfo_lookuprids_cache.shAndreas Schneider1-2/+22
Note that if this test fails, it is like something else creating keys. The last time it was a crashing smbd which left a key in the database and this test failed as a result. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Wed Apr 22 16:35:58 UTC 2026 on atb-devel-224
2026-04-14s3:tests: add regression test for usershare EACCES crashJeremy Allison1-0/+190
Add a test that verifies smbd does not crash when a usershare definition file becomes inaccessible while a client is connected. The test creates a usershare, connects to it, makes the usershare definition file inaccessible (chmod 000), then issues a volume query which triggers the volume_label() -> lp_servicename() code path. It verifies smbd is still alive afterward by connecting to a different share. Add knownfail. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14978 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Mulder <dmulder@samba.org>
2026-02-27s3:selftest: update aio_ratelimit tests for burst supportAvan Thakkar1-11/+128
- Replace delay_max configuration with burst_mult parameters. - Add three test cases: basic rate limiting, burst behavior, and recovery BUG: https://bugzilla.samba.org/show_bug.cgi?id=16000 Signed-off-by: Avan Thakkar <athakkar@redhat.com> Reviewed-by: Shweta Sodani <ssodani@redhat.com> Reviewed-by: Shachar Sharon <ssharon@redhat.com> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Fri Feb 27 11:52:46 UTC 2026 on atb-devel-224
2026-02-17selftest: Update tests to use --use-kereros=desired|required no credsNoel Power1-0/+12
Add tests to call smbclient without passing credentials to demonstrate failure with --use-kereros=desired Also add knownfail Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
2026-01-18s3:selftest: test vfs_aio_ratelimit moduleShachar Sharon1-0/+91
Test VFS aio_ratelimit module: ensure that a (read) delay is indeed injected. Signed-off-by: Shachar Sharon <ssharon@redhat.com> Reviewed-by: Avan Thakkar <athakkar@redhat.com> Reviewed-by: Anoop C S <anoopcs@samba.org> Reviewed-by: Gunther Deschner <gd@samba.org>
2026-01-15s3:tests: Use awk for parsing hexkeysAndreas Schneider1-6/+14
This just uses valid hex values and doesn't rely on special positions. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Anoop C S <anoopcs@samba.org> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Thu Jan 15 08:01:36 UTC 2026 on atb-devel-224
2026-01-15s3:tests: Add debug output to test_net_tdb.shAndreas Schneider1-0/+8
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-15source3:tests: Fix all shellcheck errors found in test_net_tdb.shAndreas Schneider1-25/+26
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-05s3-selftest: Activate "net ads kerberos kinit" tests with --use-krb5-ccacheGünther Deschner1-12/+18
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15840 Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2026-01-05s3-selftest: verify KRB5CCNAME presence after kinit using klistGünther Deschner1-0/+12
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15840 Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2026-01-05s3-selftest: mention in-memory ccache usage when nothing is providedGünther Deschner1-0/+2
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15840 Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2026-01-05tests: Make recycle:touch test less flakeyVolker Lendecke1-0/+1
I get the same atime pretty frequently. Wait a second to be sure it changes. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Jan 5 11:20:04 UTC 2026 on atb-devel-224
2025-12-23s3:tests: Add testparm tests for "sync machine password to keytab" optionSamuel Cabrero1-0/+63
Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
2025-12-08s3-selftest: add tests for winbindd_cache.tdb sanityGünther Deschner1-0/+112
Guenther BUG: https://bugzilla.samba.org/show_bug.cgi?id=15963 Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2025-11-14s3:mdssvc: Remove support for tracker sparql supportAndreas Schneider1-20/+0
This only support v2 of tracker sparql which is only avilable on the Ubuntu 20.04 runner. All newer distributions provide only tracker sparql v3. Also the tevent glib stopped working on Fedora 43. Time to remove it. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2025-11-04selftest: Add a test for recycle:touch,touch_mtime,keeptreePavel Filipenský1-0/+37
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15940 Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2025-10-21test: Fix shadow copy streams xattr testVolker Lendecke1-1/+1
streams_xattr always appends a '\0'. We'll start to add meaning to that byte and check it soon, so make the hand-crafted stream follow that convention Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2025-10-16tests: Run `dd` without any preloaded librariesAndreas Schneider5-9/+12
If AddressSanitizer is loaded it will detect alignment issues. The tool is not ours, so ignore it. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org> Autobuild-User(master): Anoop C S <anoopcs@samba.org> Autobuild-Date(master): Thu Oct 16 09:34:58 UTC 2025 on atb-devel-224
2025-08-05s3:tests: Use bash and disable history expansion for ↵Andreas Schneider1-2/+6
test_wbinfo_lookuprids_cache.sh Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Aug 5 12:50:07 UTC 2025 on atb-devel-224
2025-08-05s3:tests: Fix shellcheck warning of test_wbinfo_lookuprids_cache.shAndreas Schneider1-1/+1
In source3/script/tests/test_wbinfo_lookuprids_cache.sh line 27: key=$("$TDBDUMP" "$cache" | grep ^key.*NDR.*/"$opnum"/ | cut -d\" -f2) ^-------------------^ SC2062 (warning): Quote the grep pattern so the shell won't interpret it. Lets better use awk for matching the pattern. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-08-02s3-selftest: fix test_wbinfo_lookuprids_cache.shGünther Deschner1-1/+2
This script is using tdbtool for deleting keys of a particular winbind NDR operation for regression testing. There are two issues here: The opnum for this winbind NDR operation has changed (as new calls have been added to the interface), it is no longer 16 but now 17. Better try to lookup the current opnum from the IDL. As tdbtool always returns with success error code regardless of the success of its command - in this case a delete key operation - the test is simply not able to fail at all (patch following to fix tdbtool itself). Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2025-07-24s3-selftest: add tests for "net ads kerberos" commandsGünther Deschner1-0/+158
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15840 Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2025-07-10tests: Replace PREFIX_ABS with PREFIXPavel Filipenský9-32/+29
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2025-04-11selftest: Add test for smb_prometheus_endpoint utilityShachar Sharon1-0/+189
Basic test for smb_prometheus_endpoint utility. Requires valid metrics output using 'curl'. Start/stop the endpoint utility from within the test script itself. Signed-off-by: Shachar Sharon <ssharon@redhat.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2025-04-11smbprofile: add authentication metricsRalph Boehme1-1/+1
"authentication" is the total number of requests and "authentication_failed" is obviously the number of failed authentications. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2025-03-27smbd: remove get_change_timespec()Ralph Boehme2-7/+1
Return ctime from the filesystem instead of mtime. Adjust existing tests by removing ctime check. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13594 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2025-02-15s3:libads: Remove specifier for 'host' principal from 'sync machine password ↵Pavel Filipenský1-48/+0
to keytab' Use specifier 'spn_prefixes=host' instead of 'host' BUG: https://bugzilla.samba.org/show_bug.cgi?id=15759 Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2025-02-13s3: Add new keytab specifiersPavel Filipenský1-120/+329
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15759 Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2025-01-13s3:tests: let test_update_keytab.sh use rpc changetrustpw --serverStefan Metzmacher1-1/+1
If we pass the server name via -I/--ipaddress means we internally loose the server name and fail to use kerberos with just the ip address. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
2025-01-10s3-sharesec: Add Test to verify command option "--view-all"Guenther Deschner1-0/+8
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15780 Signed-off-by: Guenther Deschner <gd@samba.org> Signed-off-by: Vinit Agnihotri <vagnihot@redhat.com> Reviewed-by: John Mulligan <jmulligan@samba.org>
2024-12-17selftest: Add test for vfs crossrename modulePavel Filipenský1-1/+79
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15724 Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2024-12-05s3:tests: Adapt winbind_call_depth_trace to depth=3Pavel Filipenský1-5/+5
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org> Autobuild-Date(master): Thu Dec 5 15:54:57 UTC 2024 on atb-devel-224
2024-12-05s3:tests: Make winbind_call_depth_trace to use global_inject.confPavel Filipenský1-27/+6
To get the expected traces we need: debug syslog format = no log level = 10 Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2024-11-22smbd: Return NT_STATUS_STOPPED_ON_SYMLINKVolker Lendecke1-2/+8
Do this for "follow symlinks = now" and smb2 unix extensions Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2024-11-19test: Fix a typoVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Tue Nov 19 19:24:16 UTC 2024 on atb-devel-224
2024-11-19tests: Fix a commentVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2024-09-27s3:tests: Write stderr to file to be able to print it on failureAndreas Schneider1-1/+8
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
2024-09-27s3:tests: Track the status of smbcquotas and not trAndreas Schneider1-2/+2
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
2024-09-20s3:test_update_keytab_clustered: add net ads testjoin checks in more placesStefan Metzmacher1-2/+14
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15714 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
2024-09-19s3:tests: let test_durable_handle_reconnect.sh run ↵Stefan Metzmacher1-0/+18
smb2.durable-v2-regressions.durable_v2_reconnect_bug15624 This demonstrates the dead lock after a durable reconnect failed because the stat info changed, the file can't be accessed anymore as we leak the incomplete share mode entry in a still running process. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15624 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
2024-08-29s3:tests: make use of TMPDIR in test_symlink_traversal_*.shStefan Metzmacher3-18/+18
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2024-08-22s3:tests: Fix spelling errorMartin Schwenke1-1/+1
Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Anoop C S <anoopcs@samba.org> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Thu Aug 22 10:38:09 UTC 2024 on atb-devel-224
2024-07-26selftest: Add tests for keytab update in clustered sambaPavel Filipenský1-0/+165
BUG: https://bugzilla.samba.org/show_bug.cgi?id=6750 Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-07-26selftest: Add tests for keytab updatePavel Filipenský1-0/+450
BUG: https://bugzilla.samba.org/show_bug.cgi?id=6750 Signed-off-by: Pavel Filipenský <pfilipen@redhat.com> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-07-26CI: add a test for per-user (and per-group) veto filesRalph Boehme1-0/+24
Not adding a specific test for per-user hide files as that uses the exact same mechanism as the per-user veto files. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-07-26CI: fix test file cleanupRalph Boehme1-1/+1
Test files are stored beneath "$SHAREPATH/dir1", not "$SHAREPATH/dir_1". Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-07-23s3:tests: let modprinter.pl use $TMPDIRStefan Metzmacher1-1/+5
We should avoid using /tmp in selftest Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Jul 23 13:53:13 UTC 2024 on atb-devel-224
2024-07-17s3:selftest: add samba3.blackbox.smb1_lanman_plaintext testsStefan Metzmacher1-0/+63
This demonstrates that we currently have problems with plaintext and lanman authentication. In both domain member and standalone setups. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9705 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2024-06-19test_recycle.sh: make sure we don't see panics on the log filesStefan Metzmacher1-0/+5
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15659 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Noel Power <noel.power@suse.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2024-06-11s3/torture: Add test for widelink case insensitivity on a MSDFS share.Jeremy Allison1-0/+72
Add knownfail. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15662 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>