Bug 7738 - Test case RAW-IOCTL should use a more precise test condition on testing a bad handle
Test case RAW-IOCTL should use a more precise test condition on testing a bad...
Status: ASSIGNED
Product: Samba 4.0
Classification: Unclassified
Component: smbtorture
unspecified
x86 Windows 7
: P3 normal
: ---
Assigned To: Steven Danneman
samba4-qa@samba.org
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-18 18:30 UTC by Long Li
Modified: 2011-02-23 13:23 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Long Li 2010-10-18 18:30:24 UTC
torture/raw/ioctl.c

In static bool test_fsctl(struct smbcli_state *cli, TALLOC_CTX *mem_ctx):

        printf("Trying bad handle\n");
        nt.ntioctl.in.file.fnum = fnum+1;
        status = smb_raw_ioctl(cli->tree, mem_ctx, &nt);
        CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE);

The test case passes both a bad handle (nt.ntioctl.in.file.fnum = fnum+1;) and a possibly unsupported IOCTL function (nt.ntioctl.in.function = FSCTL_REQUEST_BATCH_OPLOCK;, from previous test packet)

As a result, the server may respond NT_STATUS_INVALID_HANDLE or NT_STATUS_UNSUPPORTED to this test condition.

The test case should use a more precise test condition. If the intent is to test server response on bad handles, the test case should put in a well-konwn supported IOCTL function.
Comment 1 Matthias Dieter Wallnöfer 2010-10-19 04:42:04 UTC
Steve, another bug for you.