skypjack / uvw

Header-only, event based, tiny and easy to use libuv wrapper in modern C++ - now available as also shared/static library!
MIT License
1.84k stars 209 forks source link

ctest error : uvw_util faild #248

Closed fubingting closed 3 years ago

fubingting commented 3 years ago

uvw_version:2.9.0 os:centos platform:aarch64 test cmd: ctest -j4 -R uvw test log:Testing/Temporary/LastTest.log When I test, the following error occurs:

26/28 Testing: uvw_util
26/28 Test: uvw_util
Command: "/home/all_spack_env/spack_stage/root/spack-stage-uvw-2.9.0-6seiaaqlrxnt2lwp3h222a4yia2fpyn6/spack-build-6seiaaq/test/util"
Directory: /home/all_spack_env/spack_stage/root/spack-stage-uvw-2.9.0-6seiaaqlrxnt2lwp3h222a4yia2fpyn6/spack-build-6seiaaq/test
"uvw_util" start time: Jul 17 14:37 CST
Output:
----------------------------------------------------------
Running main() from /home/all_spack_env/spack_stage/root/spack-stage-uvw-2.9.0-6seiaaqlrxnt2lwp3h222a4yia2fpyn6/spack-build-6seiaaq/_deps/googletest-src/googletest/src/gtest_main.cc
[==========] Running 3 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 3 tests from Util
[ RUN      ] Util.UnscopedFlags
[       OK ] Util.UnscopedFlags (0 ms)
[ RUN      ] Util.ScopedFlags
[       OK ] Util.ScopedFlags (0 ms)
[ RUN      ] Util.Utilities
/home/all_spack_env/spack_stage/root/spack-stage-uvw-2.9.0-6seiaaqlrxnt2lwp3h222a4yia2fpyn6/spack-src/test/uvw/util.cpp:128: Failure
Expected: (cpuInfo[0].speed) != (decltype(cpuInfo[0].speed){0}), actual: 0 vs 0
[  FAILED  ] Util.Utilities (1 ms)
[----------] 3 tests from Util (1 ms total)

[----------] Global test environment tear-down
[==========] 3 tests from 1 test suite ran. (1 ms total)
[  PASSED  ] 2 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] Util.Utilities

 1 FAILED TEST
<end of output>
Test time =   0.01 sec
----------------------------------------------------------
Test Failed.
"uvw_util" end time: Jul 17 14:37 CST
"uvw_util" time elapsed: 00:00:00
----------------------------------------------------------
skypjack commented 3 years ago

uvw forwards the call to the undelying library (namely libuv) and returns the data as-is. Therefore, unless you've enough detail to create a repro that shows how uvw makes a mistake in this operation, you should turn the issue directly tolibuv and ask them to support your platform/os.

Tests in uvw are meant as functional only and are known to fail on some platforms because of the different behavior of the underlying library. Making them fully portable isn't a goal of this project.

I close the issue since it seems to me unrelated to the project itself. Feel free to reopen it if I'm wrong and you've a repro that helps to investigate this a little further. Thanks.