Wednesday, June 27, 2012 6:55 AM
I work on StorageAdapter for winBio framework and I am using WBF test suite for testing the functionality.
I am having difficulties with error: "WbioStorageNextRecord should keep the last result when returning WINBIO_E_DATABASE_NO_MORE_RECORDS".
I simply don't understand what does it want from me. WbioStorageNextRecord should only advance result set. When it is at boundary I simply don't move it any further and result set is unchanged. The old result from "StorageAdapterGetCurrentRecord" is unchanged too and addresses should be still valid.
Thanks in advance
- Edited by Jurysko Wednesday, June 27, 2012 11:23 AM
Thursday, June 28, 2012 11:36 AMNo one is even working with Windows Biometric framework ?
Thursday, June 28, 2012 4:46 PM
This particular test works as follows:
- It queries the database to get a non-empty result set
- It iterates through the result set until it hits the last record (hr == WINBIO_E_DATABASE_NO_MORE_RECORDS)
- It calls StorageAdapterGetCurrentRecord and captures the last record in a WINBIO_STORAGE_ITEM. Call this "record_1".
- Without modifying the result set, it repeatedly calls StorageAdapterNextRecord and StorageAdapterGetCurrentRecord, each time capturing the record contents in a different WINBIO_STORE_ITEM. Call this "record_2".
- After the iteration cycle, it compares the contents of record_1 and record_2. If they are not equal, the test fails with the error message you're seeing.
"Equality" in this case means:
- Same identity (SID or GUID)
- Same subfactor value
- Same index element count
- If index element count is non-zero, then the index element arrays must be the same.
- The template blob sizes must be identical, and the byte-by-byte contents of the blobs must be identical.
- The payload blob sizes must match, and if the blob size is non-zero, the pay blobs must be identical on a byte-by-byte basis.
If any of these conditions don't match, the test fails and generates the error you're seeing.
Does that help?
Senior Software Engineer - Windows Security
- Marked As Answer by Doron Holan [MSFT]Microsoft Community Contributor, Owner Thursday, June 28, 2012 5:28 PM
Thursday, June 28, 2012 5:09 PM
Thanks for the reply! I thought no one deals with WBF.
In debug mode i watched the whole structure which I am returning (beside debug printfs) and it seems all right. NextRecord returns specified error and getRecord returns the last record as it should at every call.
The Identity structure,IndexVector,TemplateBlob and PayloadBlob are still the same - they are allocated via "new" operator. So I put still the same pointers to these structures and fill static data (SubFactor, sizes, etc.) to "PWINBIO_STORAGE_RECORD RecordContents".
So one possibility for me is to store these let's say 6 records of repeated calls to "StorageAdapterNextRecord" and "StorageAdapterGetCurrentRecord" to a file and compare the content whether it matches in mentioned points.
I'll try that as soon as I can.
Monday, July 02, 2012 8:49 AMIt seems that I overlooked stupid error. I forgot to set SubFactor of the record. That's why it never matched the template.
Monday, July 02, 2012 1:16 PM
I'd like to ask something else. .dll adapters are installed with device drivers. How to use my own implementation of dll adapter (storage). What do I need for it? OpenSession shouts that integrity check failed after I replace storage adapter with my own.
Thanks in advance
- Edited by Jurysko Monday, July 09, 2012 9:46 AM
Monday, July 09, 2012 11:30 AM
If I can ask something else what exactly is test 5 (create database) doing? From debug output everything seems to be all right but it says "Database file can't be found". Is the testing suite looking for the file in file system? Or something else. Btw almost all the test are functioning properly except 7 that shouts mentioned statement.
Thanks in advance.