Alexandre Julliard (@julliard) commented about dlls/ntdll/tests/file.c:
GetTempPathW( MAX_PATH, tmp_path );
- /* check if class is implemented */
- res = GetTempFileNameW( tmp_path, fooW, 0, oldpath );
- ok( res != 0, "failed to create temp file\n" );
- handle = CreateFileW( oldpath, GENERIC_WRITE | DELETE, 0, NULL, CREATE_ALWAYS, 0, 0 );
- ok( handle != INVALID_HANDLE_VALUE, "CreateFileW failed\n" );
- memset( &fri, 0x11, sizeof(fri) );
- res = pNtQueryInformationFile( handle, &io, &fri, sizeof(fri), class );
Using the pointer itself as storage doesn't make much sense. Also it's not clear what querying it is supposed to do.
I'd suggest to simply check for invalid class failure on the first real test instead of adding some strange pre-check.