Closed nyue closed 4 years ago
I guess it's related to your environment, because tests are running fine on travis. Can you send me the output of :
ifconfig
can you define the preprocessor macro _DEBUG and send me the output of the test?
also try to execute each failing test one by one and see the output.
OS : Ubuntu 18.04 LTS GCC : 7.5.0
Build warnings
[ 47%] Building CXX object src/library/os/CMakeFiles/os.dir/linux/network.cpp.o
cd /home/nyue/projects/Open-License-Manager/OLM/build/src/library/os && /usr/bin/c++ -I/home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/projects/CleanSlate/include/licensecc/CleanSlate -I/home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/include -D_DEBUG -O3 -DNDEBUG -std=gnu++11 -o CMakeFiles/os.dir/linux/network.cpp.o -c /home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/src/library/os/linux/network.cpp
In file included from /usr/include/string.h:494:0,
from /home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/src/library/os/linux/network.cpp:28:
In function ‘char* strncpy(char*, const char*, size_t)’,
inlined from ‘FUNCTION_RETURN license::os::getAdapterInfos(std::vector<license::os::OsAdapterInfo>&)’ at /home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/src/library/os/linux/network.cpp:71:11:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:71: warning: ‘char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)’: specified bound 1025 exceeds the size 1024 of the destination [-Wstringop-overflow=]
return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
^
ifconfig
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.10 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::a8e3:6b9a:629d:c8ba prefixlen 64 scopeid 0x20<link>
ether 2c:41:38:aa:07:be txqueuelen 1000 (Ethernet)
RX packets 206852 bytes 217979403 (217.9 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 97725 bytes 14333798 (14.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 20 memory 0xfb000000-fb020000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 6765 bytes 645494 (645.4 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6765 bytes 645494 (645.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Individual failing tests
test/functional/test_crack
Running 1 test case...
executing :/home/nyue/projects/Open-License-Manager/OLM/build/extern/license-generator/src/license_generator/lccgen license issue --primary-key /home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/projects/CleanSlate/private_key.rsa --output-file-name /home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/standard_license.lic --project-folder /home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate
base64not recognized value error
License written
/home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/test/functional/generate-license.cpp(56): error: in "test_bad_magic_number": check sectionSize > 0 has failed [-1 <= 0]
license to sign [CLEANSLATE]
EventReg[step:3,events:{[ev:1,sev:1ref:/home/nyue/projects/Open-License-Manager/OLM/build/test/functional/test_crack.lic][ev:100,sev:0ref:ExternalDefinition][ev:100,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/standard_license.lic][ev:101,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/standard_license.lic][ev:102,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/standard_license.lic][ev:103,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/standard_license.lic][ev:8,sev:2ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/standard_license.lic]]
test/functional/test_date
Running 2 test cases...
executing :/home/nyue/projects/Open-License-Manager/OLM/build/extern/license-generator/src/license_generator/lccgen license issue --primary-key /home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/projects/CleanSlate/private_key.rsa --output-file-name /home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/not_expired.lic --project-folder /home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate -e 2050-10-10
base64not recognized value error
License written
/home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/test/functional/generate-license.cpp(56): error: in "license_not_expired": check sectionSize > 0 has failed [-1 <= 0]
license to sign [CLEANSLATEvalid-to2050-10-10]
EventReg[step:3,events:{[ev:1,sev:1ref:/home/nyue/projects/Open-License-Manager/OLM/build/test/functional/test_date.lic][ev:100,sev:0ref:ExternalDefinition][ev:100,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/not_expired.lic][ev:101,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/not_expired.lic][ev:102,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/not_expired.lic][ev:103,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/not_expired.lic]]
executing :/home/nyue/projects/Open-License-Manager/OLM/build/extern/license-generator/src/license_generator/lccgen license issue --primary-key /home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/projects/CleanSlate/private_key.rsa --output-file-name /home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/expired.lic --project-folder /home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate -e 2013-10-10
base64not recognized value error
License written
/home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/test/functional/generate-license.cpp(56): error: in "license_expired": check sectionSize > 0 has failed [-1 <= 0]
license to sign [CLEANSLATEvalid-to2013-10-10]
EventReg[step:3,events:{[ev:1,sev:1ref:/home/nyue/projects/Open-License-Manager/OLM/build/test/functional/test_date.lic][ev:100,sev:0ref:ExternalDefinition][ev:100,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/expired.lic][ev:101,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/expired.lic][ev:102,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/expired.lic][ev:103,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/expired.lic][ev:7,sev:2ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/expired.lic]]
*** 2 failures are detected in the test module "test_date"
test/functional/test_it_hw_identifier
Running 4 test cases...
Identifier:AFKr-lQl8-a2M=
executing :/home/nyue/projects/Open-License-Manager/OLM/build/extern/license-generator/src/license_generator/lccgen license issue --primary-key /home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/projects/CleanSlate/private_key.rsa --output-file-name /home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/volid_lic_file.lic --project-folder /home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate -s AFKr-lQl8-a2M=
base64not recognized value error
License written
/home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/test/functional/generate-license.cpp(56): error: in "volid_lic_file": check sectionSize > 0 has failed [-1 <= 0]
license to sign [CLEANSLATEclient-signatureAFKr-lQl8-a2M=]
EventReg[step:4,events:{[ev:1,sev:1ref:/home/nyue/projects/Open-License-Manager/OLM/build/test/functional/test_it_hw_identifier.lic][ev:100,sev:0ref:ExternalDefinition][ev:100,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/volid_lic_file.lic][ev:101,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/volid_lic_file.lic][ev:102,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/volid_lic_file.lic][ev:103,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/volid_lic_file.lic][ev:0,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/volid_lic_file.lic]]
Identifier:AHJv-b3QA-AAA=
executing :/home/nyue/projects/Open-License-Manager/OLM/build/extern/license-generator/src/license_generator/lccgen license issue --primary-key /home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/projects/CleanSlate/private_key.rsa --output-file-name /home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/volume_name_lic_file.lic --project-folder /home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate -s AHJv-b3QA-AAA=
base64not recognized value error
License written
/home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/test/functional/generate-license.cpp(56): error: in "volume_name_lic_file": check sectionSize > 0 has failed [-1 <= 0]
license to sign [CLEANSLATEclient-signatureAHJv-b3QA-AAA=]
EventReg[step:4,events:{[ev:1,sev:1ref:/home/nyue/projects/Open-License-Manager/OLM/build/test/functional/test_it_hw_identifier.lic][ev:100,sev:0ref:ExternalDefinition][ev:100,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/volume_name_lic_file.lic][ev:101,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/volume_name_lic_file.lic][ev:102,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/volume_name_lic_file.lic][ev:103,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/volume_name_lic_file.lic][ev:0,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/volume_name_lic_file.lic]]
*** buffer overflow detected ***: ./test/functional/test_it_hw_identifier terminated
unknown location(0): fatal error: in "strategy_mac_address": signal: SIGABRT (application abort requested)
/home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/test/functional/hw_identifier_it_test.cpp(72): last checkpoint: "strategy_mac_address" test entry
*** buffer overflow detected ***: ./test/functional/test_it_hw_identifier terminated
unknown location(0): fatal error: in "strategy_ip_address": signal: SIGABRT (application abort requested)
/home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/test/functional/hw_identifier_it_test.cpp(83): last checkpoint: "strategy_ip_address" test entry
*** 4 failures are detected in the test module "integration_test_hw_identifier"
test/functional/test_standard_license
Running 2 test cases...
executing :/home/nyue/projects/Open-License-Manager/OLM/build/extern/license-generator/src/license_generator/lccgen license issue --primary-key /home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/projects/CleanSlate/private_key.rsa --output-file-name /home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/standard_license.lic --project-folder /home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate
base64not recognized value error
License written
/home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/test/functional/generate-license.cpp(56): error: in "test_generic_license_read_file": check sectionSize > 0 has failed [-1 <= 0]
license to sign [CLEANSLATE]
EventReg[step:3,events:{[ev:1,sev:1ref:/home/nyue/projects/Open-License-Manager/OLM/build/test/functional/test_standard_license.lic][ev:100,sev:0ref:ExternalDefinition][ev:100,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/standard_license.lic][ev:101,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/standard_license.lic][ev:102,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/standard_license.lic][ev:103,sev:0ref:/home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/standard_license.lic]]
executing :/home/nyue/projects/Open-License-Manager/OLM/build/extern/license-generator/src/license_generator/lccgen license issue --primary-key /home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/projects/CleanSlate/private_key.rsa --output-file-name /home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate/licenses/standard_license1.lic --project-folder /home/nyue/projects/Open-License-Manager/OLM/build/Testing/Temporary/CleanSlate
base64not recognized value error
License written
/home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/test/functional/generate-license.cpp(56): error: in "test_read_license_data": check sectionSize > 0 has failed [-1 <= 0]
license to sign [CLEANSLATE]
EventReg[step:3,events:{[ev:1,sev:1ref:/home/nyue/projects/Open-License-Manager/OLM/build/test/functional/test_standard_license.lic][ev:100,sev:0ref:ExternalDefinition][ev:102,sev:0ref:ExternalDefinition][ev:103,sev:0ref:ExternalDefinition]]
*** 2 failures are detected in the test module "test_standard_license"
Found it. Thanks so much for reporting. The problem appears if you specify a project name at the project configuration step... if you leave the default tests are OK. Maybe is just some test configuration. I'll fix it anyway.
Ubuntu 18.04
I noticed the following compilation warning
[ 47%] Building CXX object src/library/os/CMakeFiles/os.dir/linux/network.cpp.o In file included from /usr/include/string.h:494:0, from /home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/src/library/os/linux/network.cpp:28: In function ‘char* strncpy(char*, const char*, size_t)’, inlined from ‘FUNCTION_RETURN license::os::getAdapterInfos(std::vector<license::os::OsAdapterInfo>&)’ at /home/nyue/projects/Open-License-Manager/OLM/Open-License-Manager_git/src/library/os/linux/network.cpp:71:11: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:71: warning: ‘char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)’: specified bound 1025 exceeds the size 1024 of the destination [-Wstringop-overflow=] return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); ^ [ 48%] Building CXX object src/library/os/CMakeFiles/os.dir/linux/os_linux.cpp.o
*** buffer overflow detected ***: /home/nyue/projects/Open-License-Manager/OLM/build/test/library/os/test_network terminated *** buffer overflow detected ***: /home/nyue/projects/Open-License-Manager/OLM/build/test/functional/test_it_hw_identifier terminated *** buffer overflow detected ***: /home/nyue/projects/Open-License-Manager/OLM/build/test/functional/test_it_hw_identifier terminated