llvm icon indicating copy to clipboard operation
llvm copied to clipboard

E2E tests failing on Windows because of `-Werror` and `getenv`

Open ProGTX opened this issue 1 year ago • 1 comments

Describe the bug

error: 'getenv' is deprecated in many E2E tests on Windows on the OpenCL CPU device. Relates to https://github.com/intel/llvm/pull/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: de0260f93249f9e99c6e7fb76d93e891ef37dbcc

Additional context

No response

ProGTX avatar Aug 09 '24 13:08 ProGTX

@ayylol FYI

uditagarwal97 avatar Aug 25 '24 02:08 uditagarwal97

Fixed by @ayylol in https://github.com/intel/llvm/pull/15226 and https://github.com/intel/llvm/pull/15234

againull avatar Sep 04 '24 20:09 againull