Bug in HCT for tape drives

N

Nick

HCT 11.1 and 11.2 on XP SP1. The HCT tapeio test fails on my tape drive due
to the following reasons.

I start "HCT\Testbin\Tapeio.cmd Tape0" that launches dtape.exe. The latters
sends READ BLOCK LIMITS to my tape drive. The drive returns Granularity=1,
MinBlockSize=512, MaxBlockSize=92160. Since the drive supports the variable
block mode, dtape begins to write blocks 1024, 2560, 5632, 11776, 24064,
48640, 97792 in size (see the log below). The last block fails because 97792
is more than the maximum supported size 92160.

dtape seems to be using the following erroneous algorithm:

Delta = 512
for( i= j = 0; minBlock < maxBlock && i < 20;
Delta*=2, minBlock+=Delta, i+=3, j++ )
{
Blocks[ j ].BlockToWrite = minBlock + Delta;
Blocks[ j ].SmallerBlockToRead = minBlock;
Blocks[ j ].LargerBlockToread = minBlock + Delta*2;
}

On the last iteration, (minBlock < maxBlock) is true, but (BlockToWrite =
minBlock + Delta) becomes larger than maxBlock.

Please correct me if I'm wrong, but all the above seems to be a bug in the
HCT suite (dtape.exe). The result is that I'm unable to submit my driver to
WHQL.

Regards,
Nick Repin
n i c k r e p i n AT x t r a . c o . n z


Arg: TEST
Data: 1
Arg: TAPE
Data: \\.\tape0
+====================================================================+
Log header
+====================================================================+

-- Loging ----------------

Log file name : tapeapi.log

-- Testing ----------------

Test Level : 1

-- Tape Device Info ------

Testing tape : \\.\tape0
DriverName : MyDriverName
VenderID : MyCompany
ModelID : MyModel
ProductRevLevel: 1.0

-- Initiator --------------

Initiator : InitiatorName
Initiator Port : 0
Initiator MaximumTransferLength : 128K
Initiator AlignmentMask : 2
Initiator MaximumPhysicalPages : 32
Initiator MaxBlockSizeCapabulitie : 124K
Page Size : 4K

---------------------------


'MyDriverName'
'MyCompany'


====NO PROBLEM DRIVES FOUND=====


CreateFile(
LPCTSTR lpszName = \\.\tape0 ,
PASSED on Try 1
Alighn on SCSI ports returned AlignmentMask


Aligning buffer name: WB
Alighn to : 2
Current address : 1119340
Alighned address : 1119342




Aligning buffer name: RB
Alighn to : 2
Current address : 1219360
Alighned address : 1219362



PrepareTape(
DWORD dwOperation = 0 = TAPE_LOAD
,
BOOL bImmediate = 0 = FALSE
,
PASSED on Try 1

GetTapeStatus(
PASSED on Try 1

GetTapeParameters(
DWORD dwOperation = 1 =
GET_TAPE_DRIVE_INFORMATION ,
PASSED on Try 1

GetTapeParameters(
DWORD dwOperation = 0 =
GET_TAPE_MEDIA_INFORMATION ,
PASSED on Try 1

SetTapeParameters(
DWORD dwOperation = 0 =
SET_TAPE_MEDIA_INFORMATION ,
DWORD BlockSize = 65536 ,
PASSED on Try 1

GetTapeParameters(
DWORD dwOperation = 0 =
GET_TAPE_MEDIA_INFORMATION ,
PASSED on Try 1


===========================================
VARIATION 0 START
Testing variable BLOCK mode .
Variable block mode SUPPORTED
|
|

===========================================
Variation 0:
Starting test 0
Creating a variable block tape with a few blocks


|SetTapeParameters(
| DWORD dwOperation = 0 =
SET_TAPE_MEDIA_INFORMATION ,
| DWORD BlockSize = 0 ,
| PASSED on Try 1
|
|PrepareTape(
| DWORD dwOperation = 0 =
TAPE_LOAD ,
| BOOL bImmediate = 0 =
FALSE ,
| PASSED on Try 1
|
|SetTapePosition(
| DWORD dwPositionMethod = 0 =
TAPE_REWIND ,
| DWORD dwPartition = 0 ,
| DWORD dwOffsetLow = 0 ,
| DWORD dwOffsetHigh = 0 ,
| BOOL bImmediate = 0 ,
| PASSED on Try 1
|WriterBuffer=1119342

|WriteFile(
| DWORD nNumberOfBytesToWrit = 1024 = E
,
| Changed Args:
| LPDWORD nNumberOfBytesWritte = 0X01219350 =
1024
| PASSED on Try 1
|WriterBuffer=1119342

|WriteFile(
| DWORD nNumberOfBytesToWrit = 2560 = E
,
| Changed Args:
| LPDWORD nNumberOfBytesWritte = 0X01219350 =
2560
| PASSED on Try 1
|WriterBuffer=1119342

|WriteFile(
| DWORD nNumberOfBytesToWrit = 5632 = E
,
| Changed Args:
| LPDWORD nNumberOfBytesWritte = 0X01219350 =
5632
| PASSED on Try 1
|WriterBuffer=1119342

|WriteFile(
| DWORD nNumberOfBytesToWrit = 11776 = E
,
| Changed Args:
| LPDWORD nNumberOfBytesWritte = 0X01219350 =
11776
| PASSED on Try 1
|WriterBuffer=1119342

|WriteFile(
| DWORD nNumberOfBytesToWrit = 24064 = E
,
| Changed Args:
| LPDWORD nNumberOfBytesWritte = 0X01219350 =
24064
| PASSED on Try 1
|WriterBuffer=1119342

|WriteFile(
| DWORD nNumberOfBytesToWrit = 48640 = E
,
| Changed Args:
| LPDWORD nNumberOfBytesWritte = 0X01219350 =
48640
| PASSED on Try 1
|WriterBuffer=1119342

|WriteFile(
| DWORD nNumberOfBytesToWrit = 97792 = E
,
| FAILED on Try 1
| BOOL 0 = FALSE
| Extended Error: 1 Incorrect function.

|
| Changed Args:
| LPDWORD nNumberOfBytesWritte = 0X01219350 = 0
|

TEST 0 :FAILE
Elapsed Time: Days 0 Hours 0 Minutes 0 Seconds 10
===========================================
 
G

Guest

Nick

Please send an email giving the full detail that you provided below along wiht a copy of the failing log file to (e-mail address removed).

Thanks

Paul Ree
Windows Hardware Quality Lab
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top