From d2aae105c610e263f53eb502822d6de65bb7a733 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 1 Dec 2021 12:18:35 -0800 Subject: [PATCH] s3: torture: Remove the wildcard unlink test code. This is pre WindowXP SMB1 functionality, and we need to remove this from the server in order to move towards SMB2-only, so the test must go. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- selftest/todo_smb2_tests_to_port.list | 2 - source3/selftest/tests.py | 2 +- source3/torture/torture.c | 69 --------------------------- 3 files changed, 1 insertion(+), 72 deletions(-) diff --git a/selftest/todo_smb2_tests_to_port.list b/selftest/todo_smb2_tests_to_port.list index a9d7b8b48c5..dc1df963918 100644 --- a/selftest/todo_smb2_tests_to_port.list +++ b/selftest/todo_smb2_tests_to_port.list @@ -242,7 +242,6 @@ samba3.smbtorture_s3.crypt_client.TRANS2(nt4_dc_smb1) samba3.smbtorture_s3.crypt_client.UID-REGRESSION-TEST(nt4_dc_smb1) samba3.smbtorture_s3.crypt_client.UNLINK(nt4_dc_smb1) samba3.smbtorture_s3.crypt_client.W2K(nt4_dc_smb1) -samba3.smbtorture_s3.crypt_client.WILDDELETE(nt4_dc_smb1) samba3.smbtorture_s3.crypt_client.XCOPY(nt4_dc_smb1) samba3.smbtorture_s3.crypt.POSIX-ACL-OPLOCK(nt4_dc_smb1) samba3.smbtorture_s3.crypt.POSIX-ACL-SHAREROOT(nt4_dc_smb1) @@ -327,7 +326,6 @@ samba3.smbtorture_s3.plain.TRANS2(fileserver_smb1) samba3.smbtorture_s3.plain.UID-REGRESSION-TEST(fileserver_smb1) samba3.smbtorture_s3.plain.UNLINK(fileserver_smb1) samba3.smbtorture_s3.plain.W2K(fileserver_smb1) -samba3.smbtorture_s3.plain.WILDDELETE(fileserver_smb1) samba3.smbtorture_s3.plain.WINDOWS-BAD-SYMLINK(nt4_dc_smb1) samba3.smbtorture_s3.plain.XCOPY(fileserver_smb1) samba3.smbtorture_s3.vfs_aio_fork(fileserver_smb1).RW1(fileserver_smb1) diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py index f4319959353..1b4466cc33b 100755 --- a/source3/selftest/tests.py +++ b/source3/selftest/tests.py @@ -113,7 +113,7 @@ fileserver_tests = [ "UNLINK", "BROWSE", "ATTR", "TRANS2", "TORTURE", "OPLOCK1", "OPLOCK2", "OPLOCK4", "STREAMERROR", "DIR", "DIR1", "DIR-CREATETIME", "TCON", "TCONDEV", "RW1", "RW2", "RW3", "LARGE_READX", "RW-SIGNING", - "OPEN", "XCOPY", "RENAME", "DELETE", "DELETE-LN", "WILDDELETE", "PROPERTIES", "W2K", + "OPEN", "XCOPY", "RENAME", "DELETE", "DELETE-LN", "PROPERTIES", "W2K", "TCON2", "IOCTL", "CHKPATH", "FDSESS", "CHAIN1", "CHAIN2", "OWNER-RIGHTS", "CHAIN3", "PIDHIGH", "CLI_SPLICE", "UID-REGRESSION-TEST", "SHORTNAME-TEST", diff --git a/source3/torture/torture.c b/source3/torture/torture.c index cc367ff0b22..b69125202f2 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -6165,71 +6165,6 @@ static bool run_delete_print_test(int dummy) return correct; } -/* - Test wildcard delete. - */ -static bool run_wild_deletetest(int dummy) -{ - struct cli_state *cli = NULL; - const char *dname = "\\WTEST"; - const char *fname = "\\WTEST\\A"; - const char *wunlink_name = "\\WTEST\\*"; - uint16_t fnum1 = (uint16_t)-1; - bool correct = false; - NTSTATUS status; - - printf("starting wildcard delete test\n"); - - if (!torture_open_connection(&cli, 0)) { - return false; - } - - smbXcli_conn_set_sockopt(cli->conn, sockops); - - cli_unlink(cli, fname, 0); - cli_rmdir(cli, dname); - status = cli_mkdir(cli, dname); - if (!NT_STATUS_IS_OK(status)) { - printf("mkdir of %s failed %s!\n", dname, nt_errstr(status)); - goto fail; - } - status = cli_openx(cli, fname, O_CREAT|O_RDONLY, DENY_NONE, &fnum1); - if (!NT_STATUS_IS_OK(status)) { - printf("open of %s failed %s!\n", fname, nt_errstr(status)); - goto fail; - } - status = cli_close(cli, fnum1); - fnum1 = -1; - - /* - * Note the unlink attribute-type of zero. This should - * map into FILE_ATTRIBUTE_NORMAL at the server even - * on a wildcard delete. - */ - - status = cli_unlink(cli, wunlink_name, 0); - if (!NT_STATUS_IS_OK(status)) { - printf("unlink of %s failed %s!\n", - wunlink_name, nt_errstr(status)); - goto fail; - } - - printf("finished wildcard delete test\n"); - - correct = true; - - fail: - - if (fnum1 != (uint16_t)-1) cli_close(cli, fnum1); - cli_unlink(cli, fname, 0); - cli_rmdir(cli, dname); - - if (cli && !torture_close_connection(cli)) { - correct = false; - } - return correct; -} - static bool run_deletetest_ln(int dummy) { struct cli_state *cli; @@ -15192,10 +15127,6 @@ static struct { .name = "DELETE-PRINT", .fn = run_delete_print_test, }, - { - .name = "WILDDELETE", - .fn = run_wild_deletetest, - }, { .name = "DELETE-LN", .fn = run_deletetest_ln,