2018-04-30 20:59:58 +02:00
|
|
|
/*
|
|
|
|
* ntoskrnl.exe testing framework
|
|
|
|
*
|
|
|
|
* Copyright 2015 Sebastian Lackner
|
|
|
|
* Copyright 2015 Michael Müller
|
|
|
|
* Copyright 2015 Christian Costa
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/* All custom IOCTLs need to have a function value >= 0x800. */
|
|
|
|
#define IOCTL_WINETEST_BASIC_IOCTL CTL_CODE(FILE_DEVICE_UNKNOWN, 0x800, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
2018-05-02 01:38:03 +02:00
|
|
|
#define IOCTL_WINETEST_MAIN_TEST CTL_CODE(FILE_DEVICE_UNKNOWN, 0x801, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
2018-08-25 06:08:52 +02:00
|
|
|
#define IOCTL_WINETEST_LOAD_DRIVER CTL_CODE(FILE_DEVICE_UNKNOWN, 0x802, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
2019-05-02 13:21:29 +02:00
|
|
|
#define IOCTL_WINETEST_RESET_CANCEL CTL_CODE(FILE_DEVICE_UNKNOWN, 0x803, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
|
|
|
#define IOCTL_WINETEST_TEST_CANCEL CTL_CODE(FILE_DEVICE_UNKNOWN, 0x804, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
|
|
|
#define IOCTL_WINETEST_GET_CANCEL_COUNT CTL_CODE(FILE_DEVICE_UNKNOWN, 0x805, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
2019-06-06 17:12:51 +02:00
|
|
|
#define IOCTL_WINETEST_DETACH CTL_CODE(FILE_DEVICE_UNKNOWN, 0x806, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
2018-04-30 20:59:58 +02:00
|
|
|
|
|
|
|
static const char teststr[] = "Wine is not an emulator";
|
2018-05-02 01:38:03 +02:00
|
|
|
|
|
|
|
struct test_input
|
|
|
|
{
|
|
|
|
int running_under_wine;
|
|
|
|
int winetest_report_success;
|
|
|
|
int winetest_debug;
|
|
|
|
WCHAR path[1];
|
|
|
|
};
|
2018-09-06 11:01:24 +02:00
|
|
|
|
|
|
|
static inline char *drv_strrchr( const char *str, char ch )
|
|
|
|
{
|
|
|
|
char *ret = NULL;
|
|
|
|
do { if (*str == ch) ret = (char *)(ULONG_PTR)str; } while (*str++);
|
|
|
|
return ret;
|
|
|
|
}
|