Skip to content

Commit 513ea83

Browse files
Do not call ioctl from OS in Linux DLL ULTs
Signed-off-by: Artur Harasimiuk <[email protected]>
1 parent fe8cb19 commit 513ea83

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

opencl/test/unit_test/linux/mock_os_layer.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
int (*c_open)(const char *pathname, int flags, ...) = nullptr;
1919
int (*openFull)(const char *pathname, int flags, ...) = nullptr;
20-
int (*c_ioctl)(int fd, unsigned long int request, ...) = nullptr;
2120

2221
int fakeFd = 1023;
2322
int haveDri = 0; // index of dri to serve, -1 - none
@@ -271,8 +270,6 @@ int drmQueryItem(drm_i915_query *query) {
271270
}
272271

273272
int ioctl(int fd, unsigned long int request, ...) throw() {
274-
if (c_ioctl == nullptr)
275-
c_ioctl = (int (*)(int, unsigned long int, ...))dlsym(RTLD_NEXT, "ioctl");
276273
int res;
277274
va_list vl;
278275
va_start(vl, request);
@@ -318,7 +315,6 @@ int ioctl(int fd, unsigned long int request, ...) throw() {
318315
return res;
319316
}
320317

321-
res = c_ioctl(fd, request, vl);
322318
va_end(vl);
323-
return res;
319+
return -1;
324320
}

opencl/test/unit_test/linux/mock_os_layer.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
extern int (*c_open)(const char *pathname, int flags, ...);
2323
extern int (*openFull)(const char *pathname, int flags, ...);
24-
extern int (*c_ioctl)(int fd, unsigned long int request, ...);
2524

2625
extern int drmOtherRequests(unsigned long int request, ...);
2726

@@ -49,4 +48,4 @@ extern bool failOnOpenDir;
4948
extern uint32_t entryIndex;
5049
extern int accessCalledTimes;
5150
extern int readLinkCalledTimes;
52-
extern int fstatCalledTimes;
51+
extern int fstatCalledTimes;

0 commit comments

Comments
 (0)