Stop shlfileop tests crashing under win98

James Hawkins truiken at gmail.com
Tue Jun 10 07:50:31 CDT 2008


On Tue, Jun 10, 2008 at 7:13 AM, Dan Kegel <dank at kegel.com> wrote:
> Alistair wrote:
>>-    /* try an invalid list, only one null terminator */
>>-    init_shfo_tests();
>>-    shfo.pFrom = "";
>>-    shfo.wFunc = FO_DELETE;
>>-    ret = SHFileOperation(&shfo);
>>-    ok(ret == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %d\n", ret);
>>-    ok(file_exists("test1.txt"), "Expected test1.txt to exist\n");
>>+    /* This crashes under win98 */
>>+    if(0)
>>+    {
>>+        /* try an invalid list, only one null terminator */
>
> Hey Allistair,
> that paragraph looks like it was buggy - it should have had
> test1.txt followed by a single nul and then twice MAXPATH
> nonnulls and then a double nul, like the similar tests I fixed in
> http://www.winehq.org/pipermail/wine-patches/2008-May/055371.html
> As it is, there's no way FO_DELETE could see test1.txt to maybe
> delete it.
>
> James, do you agree?
>

No, the test is exactly what the comment says: invalid list (empty)
with one NULL terminator.  I'm fine with it being if-def'ed out if it
crashes in win98.

-- 
James Hawkins



More information about the wine-devel mailing list