Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2E tests failing on Windows because of -Werror and getenv #15026

Closed
ProGTX opened this issue Aug 9, 2024 · 2 comments
Closed

E2E tests failing on Windows because of -Werror and getenv #15026

ProGTX opened this issue Aug 9, 2024 · 2 comments
Labels
bug Something isn't working confirmed

Comments

@ProGTX
Copy link
Contributor

ProGTX commented Aug 9, 2024

Describe the bug

error: 'getenv' is deprecated in many E2E tests on Windows on the OpenCL CPU device. Relates to #14689 .

FAIL: SYCL :: Regression/device_num.cpp (1734 of 2127)
******************** TEST 'SYCL :: Regression/device_num.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
C:/builds/peter/intel-llvm-mirror/build/bin/clang++ -DWIN32 -D_WINDOWS -Werror  -fsycl -fsycl-targets=spir64  C:\builds\peter\intel-llvm-mirror\sycl\test-e2e\Regression\device_num.cpp -o C:\builds\peter\intel-llvm-mirror\build\tools\sycl\test-e2e\Regression\Output\device_num.cpp.tmp.out
# executed command: C:/builds/peter/intel-llvm-mirror/build/bin/clang++ -DWIN32 -D_WINDOWS -Werror -fsycl -fsycl-targets=spir64 'C:\builds\peter\intel-llvm-mirror\sycl\test-e2e\Regression\device_num.cpp' -o 'C:\builds\peter\intel-llvm-mirror\build\tools\sycl\test-e2e\Regression\Output\device_num.cpp.tmp.out'
# .---command stderr------------
# | C:\builds\peter\intel-llvm-mirror\sycl\test-e2e\Regression\device_num.cpp:136:7: error: 'getenv' is deprecated: This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Werror,-Wdeprecated-declarations]
# |   136 |   if (getenv("PRINT_FULL_DEVICE_INFO")) {
Failed Tests (15):
  SYCL :: Config/allowlist.cpp
  SYCL :: Config/env_vars.cpp
  SYCL :: FilterSelector/select_device_cpu.cpp
  SYCL :: Regression/device_num.cpp
  SYCL :: XPTI/buffer/accessors.cpp
  SYCL :: XPTI/buffer/host_array.cpp
  SYCL :: XPTI/buffer/in_cycle.cpp
  SYCL :: XPTI/buffer/multiple_buffers.cpp
  SYCL :: XPTI/buffer/multiple_queues.cpp
  SYCL :: XPTI/buffer/recursion.cpp
  SYCL :: XPTI/buffer/sub_buffer.cpp
  SYCL :: XPTI/buffer/use_host_ptr.cpp
  SYCL :: XPTI/image/accessors.cpp
  SYCL :: XPTI/kernel/basic.cpp
  SYCL :: XPTI/kernel/content.cpp

To reproduce

$env:LIT_FILTER="<one of the tests>"
$env:ONEAPI_DEVICE_SELECTOR="opencl:cpu"
ninja check-sycl-e2e

Environment

  • OS: Windows
  • Target device and vendor: Intel OpenCL CPU
  • DPC++ version: de0260f

Additional context

No response

@ProGTX ProGTX added the bug Something isn't working label Aug 9, 2024
@uditagarwal97
Copy link
Contributor

@ayylol FYI

sarnex pushed a commit that referenced this issue Aug 30, 2024
)

The usage of `getenv` is deprecated on Windows in favor of `_dupenv_s`,
this change adds helper functions to use the appropriate function
depending on the OS.

Should resolve the non XPTI test failures from #15026
martygrant pushed a commit that referenced this issue Sep 4, 2024
Using `getenv` on Windows is deprecated, creating failures in XPTI e2e
tests #15026. This patch adds GCC diagnostics pragma around the use of
`getenv` to ignore this warning.
@againull
Copy link
Contributor

againull commented Sep 4, 2024

Fixed by @ayylol in #15226 and #15234

@againull againull closed this as completed Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed
Projects
None yet
Development

No branches or pull requests

3 participants