On 11/19/2009 01:23 PM, Austin Lund wrote:
ok (pFileStructA->uFileDate == pFileStructW->uDate2&&
pFileStructA->uFileTime == pFileStructW->uTime2,
"Last write time should match last access time!\n");
Hi Austin,
Is there no other way to get around this? I think it's a bit of a shame having tests removed for that odd system that has a FAT filesystem on a NT4+ box.
2009/11/19 Paul Vriens paul.vriens.wine@gmail.com:
On 11/19/2009 01:23 PM, Austin Lund wrote:
- ok (pFileStructA->uFileDate == pFileStructW->uDate2&&
- pFileStructA->uFileTime == pFileStructW->uTime2,
- "Last write time should match last access time!\n");
Hi Austin,
Is there no other way to get around this? I think it's a bit of a shame having tests removed for that odd system that has a FAT filesystem on a NT4+ box.
The date is always within 1 day (plus or minus). I guess it would be possible to implement a calendar addition and subtraction algorithm. Is there one already available somewhere that could be used with this bit packed structure in a test?
The time could be anything, except perhaps the seconds. On my trials with this, it always seems to have the seconds as zero. I'm not sure if you can set a timezone that has a delta with non-zero seconds.
On thinking about this, the way I'd do this is:
if dates and times are equal then pass else check the rough rules as outlined
But is it ok (or even sensible to do):
if (date1 == date2 && time1 == time2) ok(TRUE, "Blah"); else { /* some other test */ }
or would you leave out the ok()?
On 11/19/2009 10:45 PM, Austin Lund wrote:
2009/11/19 Paul Vrienspaul.vriens.wine@gmail.com:
On 11/19/2009 01:23 PM, Austin Lund wrote:
ok (pFileStructA->uFileDate == pFileStructW->uDate2&&
pFileStructA->uFileTime == pFileStructW->uTime2,
"Last write time should match last access time!\n");
Hi Austin,
Is there no other way to get around this? I think it's a bit of a shame having tests removed for that odd system that has a FAT filesystem on a NT4+ box.
The date is always within 1 day (plus or minus). I guess it would be possible to implement a calendar addition and subtraction algorithm. Is there one already available somewhere that could be used with this bit packed structure in a test?
The time could be anything, except perhaps the seconds. On my trials with this, it always seems to have the seconds as zero. I'm not sure if you can set a timezone that has a delta with non-zero seconds.
On thinking about this, the way I'd do this is:
if dates and times are equal then pass else check the rough rules as outlined
But is it ok (or even sensible to do):
if (date1 == date2&& time1 == time2) ok(TRUE, "Blah"); else { /* some other test */ }
or would you leave out the ok()?
Would this serve it's purpose?
if (abs(date2 - date1) == 1) skip("We dont't check access times on a FAT filesystem\n"); else ok(..., "Last write time should match last access time!\n")
The if() is according to your statement:
"The date is always within 1 day (plus or minus)."
2009/11/21 Paul Vriens paul.vriens.wine@gmail.com:
if (abs(date2 - date1) == 1) skip("We dont't check access times on a FAT filesystem\n");
"The date is always within 1 day (plus or minus)."
It isn't quite that easy as the date field is a bitpacked struct holding the year, month and day. So you have to account for month and year boundaries. In the absence of any other ideas or tips to where I can find a function to do this for me, I implement the calendaring increments and send a patch which follows the above idea.
2009/11/21 Austin Lund austin.lund@gmail.com:
2009/11/21 Paul Vriens paul.vriens.wine@gmail.com:
if (abs(date2 - date1) == 1) skip("We dont't check access times on a FAT filesystem\n");
"The date is always within 1 day (plus or minus)."
It isn't quite that easy as the date field is a bitpacked struct holding the year, month and day. So you have to account for month and year boundaries. In the absence of any other ideas or tips to where I can find a function to do this for me, I implement the calendaring increments and send a patch which follows the above idea.
Here is an attempt at doing this. Is there a better/cleaner way to do this?
On 11/21/2009 12:18 AM, Austin Lund wrote:
2009/11/21 Austin Lundaustin.lund@gmail.com:
2009/11/21 Paul Vrienspaul.vriens.wine@gmail.com:
if (abs(date2 - date1) == 1) skip("We dont't check access times on a FAT filesystem\n");
"The date is always within 1 day (plus or minus)."
It isn't quite that easy as the date field is a bitpacked struct holding the year, month and day. So you have to account for month and year boundaries. In the absence of any other ideas or tips to where I can find a function to do this for me, I implement the calendaring increments and send a patch which follows the above idea.
Here is an attempt at doing this. Is there a better/cleaner way to do this?
A lot of code to get around this issue. I tried playing with DosDateTimeToFileTime() and CompareFileTime() but that doesn't help much either.
I'm curious how important a test on a FAT filesystem is. If it's important we should test it otherwise I'd say your previous suggestion make sense:
if (date1 == date2&& time1 == time2) ok(TRUE, "Blah"); else skip("Not testing access times on this filesystem\n");
What happens when these tests are run on Wine with a FAT filesystem btw?
2009/11/23 Paul Vriens paul.vriens.wine@gmail.com:
I'm curious how important a test on a FAT filesystem is.
I'm not overly concerned, but the way it is at the moment, my test system will always fail with this test.
What happens when these tests are run on Wine with a FAT filesystem btw?
I don't have such a system to test this on currently.