diff options
Diffstat (limited to 'source4/torture/basic')
-rw-r--r-- | source4/torture/basic/base.c | 3 | ||||
-rw-r--r-- | source4/torture/basic/delaywrite.c | 24 | ||||
-rw-r--r-- | source4/torture/basic/delete.c | 3 | ||||
-rw-r--r-- | source4/torture/basic/disconnect.c | 12 |
4 files changed, 20 insertions, 22 deletions
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c index 10dc892333..cd0f61b681 100644 --- a/source4/torture/basic/base.c +++ b/source4/torture/basic/base.c @@ -719,7 +719,6 @@ static bool run_vuidtest(struct torture_context *tctx, size_t size; time_t c_time, a_time, m_time; - uint16_t orig_vuid; NTSTATUS result; smbcli_unlink(cli->tree, fname); @@ -727,8 +726,6 @@ static bool run_vuidtest(struct torture_context *tctx, fnum = smbcli_open(cli->tree, fname, O_RDWR | O_CREAT | O_TRUNC, DENY_NONE); - orig_vuid = cli->session->vuid; - cli->session->vuid += 1234; torture_comment(tctx, "Testing qfileinfo with wrong vuid\n"); diff --git a/source4/torture/basic/delaywrite.c b/source4/torture/basic/delaywrite.c index 8a1dc1ba9d..939827ec3c 100644 --- a/source4/torture/basic/delaywrite.c +++ b/source4/torture/basic/delaywrite.c @@ -1496,8 +1496,8 @@ static bool test_delayed_write_update3(struct torture_context *tctx, struct smbcli_state *cli, struct smbcli_state *cli2) { - union smb_fileinfo finfo0, finfo1, finfo2, finfo3, finfo4; - union smb_fileinfo pinfo0, pinfo1, pinfo2, pinfo3, pinfo4, pinfo5; + union smb_fileinfo finfo0, finfo1, finfo2, finfo3; + union smb_fileinfo pinfo0, pinfo1, pinfo2, pinfo3, pinfo4; const char *fname = BASEDIR "\\torture_file3.txt"; int fnum1 = -1; bool ret = true; @@ -1528,14 +1528,12 @@ static bool test_delayed_write_update3(struct torture_context *tctx, finfo1 = finfo0; finfo2 = finfo0; finfo3 = finfo0; - finfo4 = finfo0; pinfo0.basic_info.level = RAW_FILEINFO_BASIC_INFO; pinfo0.basic_info.in.file.path = fname; pinfo1 = pinfo0; pinfo2 = pinfo0; pinfo3 = pinfo0; pinfo4 = pinfo0; - pinfo5 = pinfo0; /* get the initial times */ GET_INFO_BOTH(finfo0,pinfo0); @@ -1651,8 +1649,8 @@ static bool test_delayed_write_update3a(struct torture_context *tctx, struct smbcli_state *cli, struct smbcli_state *cli2) { - union smb_fileinfo finfo0, finfo1, finfo2, finfo3, finfo4; - union smb_fileinfo pinfo0, pinfo1, pinfo2, pinfo3, pinfo4, pinfo5; + union smb_fileinfo finfo0, finfo1, finfo2, finfo3; + union smb_fileinfo pinfo0, pinfo1, pinfo2, pinfo3, pinfo4; const char *fname = BASEDIR "\\torture_file3a.txt"; int fnum1 = -1; bool ret = true; @@ -1684,14 +1682,12 @@ static bool test_delayed_write_update3a(struct torture_context *tctx, finfo1 = finfo0; finfo2 = finfo0; finfo3 = finfo0; - finfo4 = finfo0; pinfo0.basic_info.level = RAW_FILEINFO_BASIC_INFO; pinfo0.basic_info.in.file.path = fname; pinfo1 = pinfo0; pinfo2 = pinfo0; pinfo3 = pinfo0; pinfo4 = pinfo0; - pinfo5 = pinfo0; /* get the initial times */ GET_INFO_BOTH(finfo0,pinfo0); @@ -1867,8 +1863,8 @@ static bool test_delayed_write_update3b(struct torture_context *tctx, struct smbcli_state *cli, struct smbcli_state *cli2) { - union smb_fileinfo finfo0, finfo1, finfo2, finfo3, finfo4; - union smb_fileinfo pinfo0, pinfo1, pinfo2, pinfo3, pinfo4, pinfo5; + union smb_fileinfo finfo0, finfo1, finfo2, finfo3; + union smb_fileinfo pinfo0, pinfo1, pinfo2, pinfo3, pinfo4; const char *fname = BASEDIR "\\torture_file3b.txt"; int fnum1 = -1; bool ret = true; @@ -1899,14 +1895,12 @@ static bool test_delayed_write_update3b(struct torture_context *tctx, finfo1 = finfo0; finfo2 = finfo0; finfo3 = finfo0; - finfo4 = finfo0; pinfo0.basic_info.level = RAW_FILEINFO_BASIC_INFO; pinfo0.basic_info.in.file.path = fname; pinfo1 = pinfo0; pinfo2 = pinfo0; pinfo3 = pinfo0; pinfo4 = pinfo0; - pinfo5 = pinfo0; /* get the initial times */ GET_INFO_BOTH(finfo0,pinfo0); @@ -2245,8 +2239,8 @@ static bool test_delayed_write_update4(struct torture_context *tctx, struct smbcli_state *cli, struct smbcli_state *cli2) { - union smb_fileinfo finfo0, finfo1, finfo2, finfo3, finfo4; - union smb_fileinfo pinfo0, pinfo1, pinfo2, pinfo3, pinfo4, pinfo5; + union smb_fileinfo finfo0, finfo1, finfo2, finfo3; + union smb_fileinfo pinfo0, pinfo1, pinfo2, pinfo3, pinfo4; const char *fname = BASEDIR "\\torture_file4.txt"; int fnum1 = -1; bool ret = true; @@ -2277,14 +2271,12 @@ static bool test_delayed_write_update4(struct torture_context *tctx, finfo1 = finfo0; finfo2 = finfo0; finfo3 = finfo0; - finfo4 = finfo0; pinfo0.basic_info.level = RAW_FILEINFO_BASIC_INFO; pinfo0.basic_info.in.file.path = fname; pinfo1 = pinfo0; pinfo2 = pinfo0; pinfo3 = pinfo0; pinfo4 = pinfo0; - pinfo5 = pinfo0; /* get the initial times */ GET_INFO_BOTH(finfo0,pinfo0); diff --git a/source4/torture/basic/delete.c b/source4/torture/basic/delete.c index deeeec8057..be538d0e9d 100644 --- a/source4/torture/basic/delete.c +++ b/source4/torture/basic/delete.c @@ -1530,7 +1530,6 @@ static bool deltest23(struct torture_context *tctx, int dnum1 = -1; int dnum2 = -1; bool correct = true; - NTSTATUS status; del_clean_area(cli1, cli2); @@ -1556,7 +1555,7 @@ static bool deltest23(struct torture_context *tctx, __location__); /* Set delete on close */ - status = smbcli_nt_delete_on_close(cli1->tree, dnum1, true); + (void)smbcli_nt_delete_on_close(cli1->tree, dnum1, true); /* Attempt opening the directory again. It should fail. */ dnum2 = smbcli_nt_create_full(cli1->tree, dname, 0, diff --git a/source4/torture/basic/disconnect.c b/source4/torture/basic/disconnect.c index 71471c7f0a..17fbc61d2f 100644 --- a/source4/torture/basic/disconnect.c +++ b/source4/torture/basic/disconnect.c @@ -43,8 +43,8 @@ static bool test_disconnect_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) { union smb_open io; - NTSTATUS status; struct smbcli_request *req1, *req2; + NTSTATUS status; printf("trying open/disconnect\n"); @@ -66,6 +66,11 @@ static bool test_disconnect_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) io.ntcreatex.in.share_access = 0; req1 = smb_raw_open_send(cli->tree, &io); req2 = smb_raw_open_send(cli->tree, &io); + if (!req1 || !req2) { + printf("test_disconnect_open: smb_raw_open_send() " + "returned NULL\n"); + return false; + } status = smbcli_chkpath(cli->tree, "\\"); CHECK_STATUS(status, NT_STATUS_OK); @@ -113,6 +118,11 @@ static bool test_disconnect_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) lock[0].pid = 2; io.lockx.in.timeout = 3000; req = smb_raw_lock_send(cli->tree, &io); + if (!req) { + printf("test_disconnect_lock: smb_raw_lock_send() " + "returned NULL\n"); + return false; + } status = smbcli_chkpath(cli->tree, "\\"); CHECK_STATUS(status, NT_STATUS_OK); |