s3: Remove the smbtorture3 OPLOCK3 test
authorVolker Lendecke <vl@samba.org>
Sun, 22 May 2011 12:16:46 +0000 (14:16 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 22 May 2011 19:07:40 +0000 (21:07 +0200)
This is the last user of cli_receive_smb. Oplocks are nowadays tested
in smbtorture4, this mainly has historic value

source3/selftest/tests.py
source3/torture/torture.c
testsuite/build_farm/runlist
testsuite/build_farm/torture-OPLOCK3.test [deleted file]

index 08e62ebbecbb1be9a08a68c4fef129673a5a11d6..962ea7f99f9121eda69ff417346d0c526c6f916d 100755 (executable)
@@ -53,7 +53,7 @@ plantestsuite("samba3.local_s3", "s3dc:local", [os.path.join(samba3srcdir, "scri
 
 tests=[ "FDPASS", "LOCK1", "LOCK2", "LOCK3", "LOCK4", "LOCK5", "LOCK6", "LOCK7", "LOCK9",
         "UNLINK", "BROWSE", "ATTR", "TRANS2", "TORTURE",
 
 tests=[ "FDPASS", "LOCK1", "LOCK2", "LOCK3", "LOCK4", "LOCK5", "LOCK6", "LOCK7", "LOCK9",
         "UNLINK", "BROWSE", "ATTR", "TRANS2", "TORTURE",
-        "OPLOCK1", "OPLOCK2", "OPLOCK3", "OPLOCK4", "STREAMERROR",
+        "OPLOCK1", "OPLOCK2", "OPLOCK4", "STREAMERROR",
         "DIR", "DIR1", "DIR-CREATETIME", "TCON", "TCONDEV", "RW1", "RW2", "RW3", "RW-SIGNING",
         "OPEN", "XCOPY", "RENAME", "DELETE", "DELETE-LN", "PROPERTIES", "W2K",
         "TCON2", "IOCTL", "CHKPATH", "FDSESS", "LOCAL-SUBSTITUTE", "CHAIN1",
         "DIR", "DIR1", "DIR-CREATETIME", "TCON", "TCONDEV", "RW1", "RW2", "RW3", "RW-SIGNING",
         "OPEN", "XCOPY", "RENAME", "DELETE", "DELETE-LN", "PROPERTIES", "W2K",
         "TCON2", "IOCTL", "CHKPATH", "FDSESS", "LOCAL-SUBSTITUTE", "CHAIN1",
index f2fad4988c1b98acf0acdf3b72bafa88115a949c..64ba5431d6a8b81d51e4c91e5dbf372968732378 100644 (file)
@@ -3520,63 +3520,6 @@ static bool run_oplock2(int dummy)
        return correct;
 }
 
        return correct;
 }
 
-/* handler for oplock 3 tests */
-static NTSTATUS oplock3_handler(struct cli_state *cli, uint16_t fnum, unsigned char level)
-{
-       printf("got oplock break fnum=%d level=%d\n",
-              fnum, level);
-       return cli_oplock_ack(cli, fnum, level);
-}
-
-static bool run_oplock3(int dummy)
-{
-       struct cli_state *cli;
-       const char *fname = "\\oplockt3.dat";
-       uint16_t fnum;
-       char buf[4] = "abcd";
-       bool correct = True;
-       volatile bool *shared_correct;
-
-       shared_correct = (volatile bool *)shm_setup(sizeof(bool));
-       *shared_correct = True;
-
-       printf("starting oplock test 3\n");
-
-       if (fork() == 0) {
-               /* Child code */
-               use_oplocks = True;
-               use_level_II_oplocks = True;
-               if (!torture_open_connection(&cli, 0)) {
-                       *shared_correct = False;
-                       exit(0);
-               } 
-               sleep(2);
-               /* try to trigger a oplock break in parent */
-               cli_open(cli, fname, O_RDWR, DENY_NONE, &fnum);
-               cli_writeall(cli, fnum, 0, (uint8_t *)buf, 0, 4, NULL);
-               exit(0);
-       }
-
-       /* parent code */
-       use_oplocks = True;
-       use_level_II_oplocks = True;
-       if (!torture_open_connection(&cli, 1)) { /* other is forked */
-               return False;
-       }
-       cli_oplock_handler(cli, oplock3_handler);
-       cli_open(cli, fname, O_RDWR|O_CREAT, DENY_NONE, &fnum);
-       cli_writeall(cli, fnum, 0, (uint8_t *)buf, 0, 4, NULL);
-       cli_close(cli, fnum);
-       cli_open(cli, fname, O_RDWR, DENY_NONE, &fnum);
-       cli->timeout = 20000;
-       cli_receive_smb(cli);
-       printf("finished oplock test 3\n");
-
-       return (correct && *shared_correct);
-
-/* What are we looking for here?  What's sucess and what's FAILURE? */
-}
-
 struct oplock4_state {
        struct tevent_context *ev;
        struct cli_state *cli;
 struct oplock4_state {
        struct tevent_context *ev;
        struct cli_state *cli;
@@ -8686,7 +8629,6 @@ static struct {
        {"NBENCH2", run_nbench2, 0},
        {"OPLOCK1",  run_oplock1, 0},
        {"OPLOCK2",  run_oplock2, 0},
        {"NBENCH2", run_nbench2, 0},
        {"OPLOCK1",  run_oplock1, 0},
        {"OPLOCK2",  run_oplock2, 0},
-       {"OPLOCK3",  run_oplock3, 0},
        {"OPLOCK4",  run_oplock4, 0},
        {"DIR",  run_dirtest, 0},
        {"DIR1",  run_dirtest1, 0},
        {"OPLOCK4",  run_oplock4, 0},
        {"DIR",  run_dirtest, 0},
        {"DIR1",  run_dirtest1, 0},
index 594c172b6ff713e396a88815046a908ba2f373b7..f9456b74ec4fbdd08bd39f01da2a16c2c47ab1f0 100644 (file)
@@ -9,7 +9,7 @@ torture-LOCK3 torture-LOCK4 torture-LOCK5 \
 torture-LOCK6 torture-LOCK7 \
 torture-UNLINK torture-BROWSE torture-ATTR \
 torture-TRANS2 torture-TORTURE torture-OPLOCK1 \
 torture-LOCK6 torture-LOCK7 \
 torture-UNLINK torture-BROWSE torture-ATTR \
 torture-TRANS2 torture-TORTURE torture-OPLOCK1 \
-torture-OPLOCK3 torture-DIR torture-DIR1 torture-DENY1 \
+torture-DIR torture-DIR1 torture-DENY1 \
 torture-DENY2 torture-TCON torture-TCON2 torture-TCONDEV \
 torture-RW1 torture-RW2 torture-OPEN torture-XCOPY \
 torture-RENAME torture-DELETE torture-PROPERTIES \
 torture-DENY2 torture-TCON torture-TCON2 torture-TCONDEV \
 torture-RW1 torture-RW2 torture-OPEN torture-XCOPY \
 torture-RENAME torture-DELETE torture-PROPERTIES \
diff --git a/testsuite/build_farm/torture-OPLOCK3.test b/testsuite/build_farm/torture-OPLOCK3.test
deleted file mode 100644 (file)
index f8dfb3f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-. torture_setup.fns
-test_torture "OPLOCK3"