diff options
author | Steven Danneman <steven.danneman@isilon.com> | 2009-09-29 19:03:20 -0700 |
---|---|---|
committer | Steven Danneman <steven.danneman@isilon.com> | 2009-09-29 19:25:48 -0700 |
commit | 9af9dbeaf3344fc488c474ea7410ac425c2a4b4e (patch) | |
tree | c2c25c246c685622cf15ac475a6d2a3fde25fb08 /source4/torture | |
parent | 8c0d239317167f127324a58c593a2c5357548ec5 (diff) | |
download | samba-9af9dbeaf3344fc488c474ea7410ac425c2a4b4e.tar.gz samba-9af9dbeaf3344fc488c474ea7410ac425c2a4b4e.tar.bz2 samba-9af9dbeaf3344fc488c474ea7410ac425c2a4b4e.zip |
s4/torture: fix RAW-OPLOCK-STREAM1 test after commit a11bb14
We were pulling junk memory for our stream names after the reordering
of the struct definition.
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/raw/oplock.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c index 6070a0a6ee..da9fcf3855 100644 --- a/source4/torture/raw/oplock.c +++ b/source4/torture/raw/oplock.c @@ -2967,25 +2967,25 @@ static bool test_raw_oplock_stream1(struct torture_context *tctx, NTCREATEX_FLAGS_REQUEST_BATCH_OPLOCK | NTCREATEX_FLAGS_EXTENDED; uint32_t exclusive_req = NTCREATEX_FLAGS_REQUEST_OPLOCK | NTCREATEX_FLAGS_EXTENDED; - /* Try some permutations of taking oplocks on streams. */ + #define NSTREAM_OPLOCK_RESULTS 8 struct { - const char *fname; + const char **fname; bool open_base_file; uint32_t oplock_req; uint32_t oplock_granted; } stream_oplock_results[NSTREAM_OPLOCK_RESULTS] = { /* Request oplock on stream without the base file open. */ - {fname_stream, false, batch_req, NO_OPLOCK_RETURN}, - {fname_default_stream, false, batch_req, NO_OPLOCK_RETURN}, - {fname_stream, false, exclusive_req, EXCLUSIVE_OPLOCK_RETURN}, - {fname_default_stream, false, exclusive_req, EXCLUSIVE_OPLOCK_RETURN}, + {&fname_stream, false, batch_req, NO_OPLOCK_RETURN}, + {&fname_default_stream, false, batch_req, NO_OPLOCK_RETURN}, + {&fname_stream, false, exclusive_req, EXCLUSIVE_OPLOCK_RETURN}, + {&fname_default_stream, false, exclusive_req, EXCLUSIVE_OPLOCK_RETURN}, /* Request oplock on stream with the base file open. */ - {fname_stream, true, batch_req, NO_OPLOCK_RETURN}, - {fname_default_stream, true, batch_req, NO_OPLOCK_RETURN}, - {fname_stream, true, exclusive_req, EXCLUSIVE_OPLOCK_RETURN}, - {fname_default_stream, true, exclusive_req, LEVEL_II_OPLOCK_RETURN}, + {&fname_stream, true, batch_req, NO_OPLOCK_RETURN}, + {&fname_default_stream, true, batch_req, NO_OPLOCK_RETURN}, + {&fname_stream, true, exclusive_req, EXCLUSIVE_OPLOCK_RETURN}, + {&fname_default_stream, true, exclusive_req, LEVEL_II_OPLOCK_RETURN}, }; @@ -3032,8 +3032,9 @@ static bool test_raw_oplock_stream1(struct torture_context *tctx, /* Change the disposition to open now that the file has been created. */ io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN; + /* Try some permutations of taking oplocks on streams. */ for (i = 0; i < NSTREAM_OPLOCK_RESULTS; i++) { - const char *fname = stream_oplock_results[i].fname; + const char *fname = *stream_oplock_results[i].fname; bool open_base_file = stream_oplock_results[i].open_base_file; uint32_t oplock_req = stream_oplock_results[i].oplock_req; uint32_t oplock_granted = |