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

Two tests are failing upon turning ON "WITH_CUSTOM_PREFIX" #725

Closed
vijaysattigeri opened this issue Oct 15, 2021 · 11 comments
Closed

Two tests are failing upon turning ON "WITH_CUSTOM_PREFIX" #725

vijaysattigeri opened this issue Oct 15, 2021 · 11 comments
Labels

Comments

@vijaysattigeri
Copy link
Contributor

vijaysattigeri commented Oct 15, 2021

I was trying to test Custom prefix . Upon setting "WITH_CUSTOM_PREFIX" ON in "CMakeLists.txt:44", I'm seeing following failures.
1 - logging_custom_prefix (Child aborted)
3 - logging (Child aborted).

I'm new to this repo. Can anyone explain what's going on?

@vijaysattigeri vijaysattigeri changed the title Turning "WITH_CUSTOM_PREFIX Two tests are failing upon turning ON "WITH_CUSTOM_PREFIX" Oct 15, 2021
@sergiud
Copy link
Collaborator

sergiud commented Oct 15, 2021

  1. Which version? Did you try current master?
  2. What's the output upon failure?

@vijaysattigeri
Copy link
Contributor Author

vijaysattigeri commented Oct 16, 2021

Hi,

I'm using the current master.

Please find the following output.

> cmake -S . -B build -G "Unix Makefiles"
-- The CXX compiler identification is GNU 9.3.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find GTest (missing: GTest_DIR)
CMake Warning at CMakeLists.txt:86 (find_package):
  By not providing "Findgflags.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "gflags", but
  CMake did not find one.

  Could not find a package configuration file provided by "gflags" (requested
  version 2.2.0) with any of the following names:

    gflagsConfig.cmake
    gflags-config.cmake

  Add the installation prefix of "gflags" to CMAKE_PREFIX_PATH or set
  "gflags_DIR" to a directory containing one of the above files.  If "gflags"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Could NOT find Unwind (missing: Unwind_INCLUDE_DIR Unwind_LIBRARY Unwind_PLATFORM_LIBRARY)
-- Looking for C++ include unwind.h
-- Looking for C++ include unwind.h - found
-- Looking for C++ include dlfcn.h
-- Looking for C++ include dlfcn.h - found
-- Looking for C++ include execinfo.h
-- Looking for C++ include execinfo.h - found
-- Looking for C++ include glob.h
-- Looking for C++ include glob.h - found
-- Looking for C++ include inttypes.h
-- Looking for C++ include inttypes.h - found
-- Looking for C++ include memory.h
-- Looking for C++ include memory.h - found
-- Looking for C++ include pwd.h
-- Looking for C++ include pwd.h - found
-- Looking for C++ include stdint.h
-- Looking for C++ include stdint.h - found
-- Looking for C++ include strings.h
-- Looking for C++ include strings.h - found
-- Looking for C++ include sys/stat.h
-- Looking for C++ include sys/stat.h - found
-- Looking for C++ include sys/syscall.h
-- Looking for C++ include sys/syscall.h - found
-- Looking for C++ include sys/time.h
-- Looking for C++ include sys/time.h - found
-- Looking for C++ include sys/types.h
-- Looking for C++ include sys/types.h - found
-- Looking for C++ include sys/utsname.h
-- Looking for C++ include sys/utsname.h - found
-- Looking for C++ include sys/wait.h
-- Looking for C++ include sys/wait.h - found
-- Looking for C++ include syscall.h
-- Looking for C++ include syscall.h - found
-- Looking for C++ include syslog.h
-- Looking for C++ include syslog.h - found
-- Looking for C++ include ucontext.h
-- Looking for C++ include ucontext.h - found
-- Looking for C++ include unistd.h
-- Looking for C++ include unistd.h - found
-- Looking for C++ include ext/hash_map
-- Looking for C++ include ext/hash_map - found
-- Looking for C++ include ext/hash_set
-- Looking for C++ include ext/hash_set - found
-- Looking for C++ include ext/slist
-- Looking for C++ include ext/slist - found
-- Looking for C++ include tr1/unordered_map
-- Looking for C++ include tr1/unordered_map - found
-- Looking for C++ include tr1/unordered_set
-- Looking for C++ include tr1/unordered_set - found
-- Looking for C++ include unordered_map
-- Looking for C++ include unordered_map - found
-- Looking for C++ include unordered_set
-- Looking for C++ include unordered_set - found
-- Looking for C++ include stddef.h
-- Looking for C++ include stddef.h - found
-- Check size of unsigned __int16
-- Check size of unsigned __int16 - failed
-- Check size of u_int16_t
-- Check size of u_int16_t - done
-- Check size of uint16_t
-- Check size of uint16_t - done
-- Looking for dladdr
-- Looking for dladdr - not found
-- Looking for fcntl
-- Looking for fcntl - found
-- Looking for pread
-- Looking for pread - found
-- Looking for pwrite
-- Looking for pwrite - found
-- Looking for sigaction
-- Looking for sigaction - found
-- Looking for sigaltstack
-- Looking for sigaltstack - found
-- Performing Test HAVE_NO_DEPRECATED
-- Performing Test HAVE_NO_DEPRECATED - Success
-- Performing Test HAVE_NO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_NO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
-- Looking for pthread_threadid_np
-- Looking for pthread_threadid_np - not found
-- Looking for snprintf
-- Looking for snprintf - found
-- Looking for UnDecorateSymbolName in dbghelp
-- Looking for UnDecorateSymbolName in dbghelp - not found
-- Performing Test HAVE___ATTRIBUTE__
-- Performing Test HAVE___ATTRIBUTE__ - Success
-- Performing Test HAVE___ATTRIBUTE__VISIBILITY_DEFAULT
-- Performing Test HAVE___ATTRIBUTE__VISIBILITY_DEFAULT - Success
-- Performing Test HAVE___ATTRIBUTE__VISIBILITY_HIDDEN
-- Performing Test HAVE___ATTRIBUTE__VISIBILITY_HIDDEN - Success
-- Performing Test HAVE___BUILTIN_EXPECT
-- Performing Test HAVE___BUILTIN_EXPECT - Success
-- Performing Test HAVE___SYNC_VAL_COMPARE_AND_SWAP
-- Performing Test HAVE___SYNC_VAL_COMPARE_AND_SWAP - Success
-- Performing Test HAVE_RWLOCK
-- Performing Test HAVE_RWLOCK - Success
-- Performing Test HAVE___DECLSPEC
-- Performing Test HAVE___DECLSPEC - Failed
-- Performing Test STL_NO_NAMESPACE
-- Performing Test STL_NO_NAMESPACE - Failed
-- Performing Test STL_STD_NAMESPACE
-- Performing Test STL_STD_NAMESPACE - Success
-- Performing Test HAVE_USING_OPERATOR
-- Performing Test HAVE_USING_OPERATOR - Success
-- Performing Test HAVE_NAMESPACES
-- Performing Test HAVE_NAMESPACES - Success
-- Performing Test HAVE_GCC_TLS
-- Performing Test HAVE_GCC_TLS - Success
-- Performing Test HAVE_MSVC_TLS
-- Performing Test HAVE_MSVC_TLS - Failed
-- Performing Test HAVE_CXX11_TLS
-- Performing Test HAVE_CXX11_TLS - Success
-- Performing Test HAVE_ALIGNED_STORAGE
-- Performing Test HAVE_ALIGNED_STORAGE - Success
-- Performing Test HAVE_CXX11_ATOMIC
-- Performing Test HAVE_CXX11_ATOMIC - Success
-- Performing Test HAVE_CXX11_CONSTEXPR
-- Performing Test HAVE_CXX11_CONSTEXPR - Success
-- Performing Test HAVE_CXX11_CHRONO
-- Performing Test HAVE_CXX11_CHRONO - Success
-- Performing Test HAVE_CXX11_NULLPTR_T
-- Performing Test HAVE_CXX11_NULLPTR_T - Success
-- Performing Test HAVE_LOCALTIME_R
-- Performing Test HAVE_LOCALTIME_R - Success
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/d/Learning/git/Google/glog/build

**> cmake --build build**
Scanning dependencies of target glogbase
[  4%] Building CXX object CMakeFiles/glogbase.dir/src/demangle.cc.o
[  8%] Building CXX object CMakeFiles/glogbase.dir/src/logging.cc.o
[ 12%] Building CXX object CMakeFiles/glogbase.dir/src/raw_logging.cc.o
[ 16%] Building CXX object CMakeFiles/glogbase.dir/src/symbolize.cc.o
[ 20%] Building CXX object CMakeFiles/glogbase.dir/src/utilities.cc.o
[ 24%] Building CXX object CMakeFiles/glogbase.dir/src/vlog_is_on.cc.o
[ 28%] Building CXX object CMakeFiles/glogbase.dir/src/signalhandler.cc.o
[ 28%] Built target glogbase
Scanning dependencies of target glogtest
[ 32%] Linking CXX static library libglogtest.a
[ 32%] Built target glogtest
Scanning dependencies of target signalhandler_unittest
[ 36%] Building CXX object CMakeFiles/signalhandler_unittest.dir/src/signalhandler_unittest.cc.o
[ 40%] Linking CXX executable signalhandler_unittest
[ 40%] Built target signalhandler_unittest
Scanning dependencies of target utilities_unittest
[ 44%] Building CXX object CMakeFiles/utilities_unittest.dir/src/utilities_unittest.cc.o
[ 48%] Linking CXX executable utilities_unittest
[ 48%] Built target utilities_unittest
Scanning dependencies of target demangle_unittest
[ 52%] Building CXX object CMakeFiles/demangle_unittest.dir/src/demangle_unittest.cc.o
[ 56%] Linking CXX executable demangle_unittest
[ 56%] Built target demangle_unittest
Scanning dependencies of target symbolize_unittest
[ 60%] Building CXX object CMakeFiles/symbolize_unittest.dir/src/symbolize_unittest.cc.o
[ 64%] Linking CXX executable symbolize_unittest
[ 64%] Built target symbolize_unittest
Scanning dependencies of target logging_custom_prefix_unittest
[ 68%] Building CXX object CMakeFiles/logging_custom_prefix_unittest.dir/src/logging_custom_prefix_unittest.cc.o
[ 72%] Linking CXX executable logging_custom_prefix_unittest
[ 72%] Built target logging_custom_prefix_unittest
Scanning dependencies of target logging_unittest
[ 76%] Building CXX object CMakeFiles/logging_unittest.dir/src/logging_unittest.cc.o
[ 80%] Linking CXX executable logging_unittest
[ 80%] Built target logging_unittest
Scanning dependencies of target stacktrace_unittest
[ 84%] Building CXX object CMakeFiles/stacktrace_unittest.dir/src/stacktrace_unittest.cc.o
[ 88%] Linking CXX executable stacktrace_unittest
[ 88%] Built target stacktrace_unittest
Scanning dependencies of target stl_logging_unittest
[ 92%] Building CXX object CMakeFiles/stl_logging_unittest.dir/src/stl_logging_unittest.cc.o
[ 96%] Linking CXX executable stl_logging_unittest
[ 96%] Built target stl_logging_unittest
Scanning dependencies of target glog
[100%] Linking CXX shared library libglog.so
[100%] Built target glog

> cmake --build build --target test
Running tests...
Test project /mnt/d/Learning/git/Google/glog/build
      Start  1: logging_custom_prefix
 1/11 Test  #1: logging_custom_prefix ............Child aborted***Exception:   0.45 sec
      Start  2: demangle
 2/11 Test  #2: demangle .........................   Passed    0.03 sec
      Start  3: logging
 3/11 Test  #3: logging ..........................Child aborted***Exception:   0.40 sec
      Start  4: signalhandler
 4/11 Test  #4: signalhandler ....................   Passed    0.03 sec
      Start  5: stacktrace
 5/11 Test  #5: stacktrace .......................   Passed    0.02 sec
      Start  6: stl_logging
 6/11 Test  #6: stl_logging ......................   Passed    0.03 sec
      Start  7: symbolize
 7/11 Test  #7: symbolize ........................   Passed    0.10 sec
      Start  8: cmake_package_config_init
 8/11 Test  #8: cmake_package_config_init ........   Passed    0.06 sec
      Start  9: cmake_package_config_generate
 9/11 Test  #9: cmake_package_config_generate ....   Passed    2.90 sec
      Start 10: cmake_package_config_build
10/11 Test #10: cmake_package_config_build .......   Passed    2.78 sec
      Start 11: cmake_package_config_cleanup
11/11 Test #11: cmake_package_config_cleanup .....   Passed    0.43 sec

82% tests passed, 2 tests failed out of 11

Total Test time (real) =   7.40 sec

The following tests FAILED:
          1 - logging_custom_prefix (Child aborted)
          3 - logging (Child aborted)
Errors while running CTest
make: *** [Makefile:106: test] Error 8

@sergiud
Copy link
Collaborator

sergiud commented Oct 16, 2021

What's the output of both failing tests?

Since we are not seeing these failures in CI builds, the problem may be specific to your environment.

@vijaysattigeri
Copy link
Contributor Author

vijaysattigeri commented Oct 18, 2021

Hi Sergiu,

I could check one of the failing test. Looks like, some permission issue.
If I test with "sudo" all the tests PASS just fine.

In the absence of "sudo" following test are failing.
1 - logging_custom_prefix (Child aborted)
3 - logging (Child aborted)

Please find the output for the: logging_custom_prefix

vijayubuntu@Vijay-HP:/mnt/d/Learning/git/Google/glog/build$ ./logging_custom_prefix_unittest
[==========] Running 8 tests from 8 test suites.
[----------] Global test environment set-up.
[----------] 1 test from DeathNoAllocNewHook
[ RUN      ] DeathNoAllocNewHook.logging
F20211018 12:33:28.676105 26403 logging_custom_prefix_unittest.cc:331] unexpected new
*** Check failure stack trace: ***
[       OK ] DeathNoAllocNewHook.logging (0 ms)
[----------] 1 test from DeathNoAllocNewHook (0 ms total)

[----------] 1 test from DeathRawCHECK
[ RUN      ] DeathRawCHECK.logging
F00000000 00:00:00.000000 26403 logging_custom_prefix_unittest.cc:484] RAW: Check false failed: failure 1
F00000000 00:00:00.000000 26403 logging_custom_prefix_unittest.cc:486] RAW: Check 1 == 2 failed: failure 2
[       OK ] DeathRawCHECK.logging (0 ms)
[----------] 1 test from DeathRawCHECK (0 ms total)

[----------] 1 test from DeathSTREQ
[ RUN      ] DeathSTREQ.logging
F20211018 12:33:28.676230 26403 logging_custom_prefix_unittest.cc:642] CHECK_STREQ failed: __null == "this" ( vs. this)
*** Check failure stack trace: ***
F20211018 12:33:28.676230 26403 logging_custom_prefix_unittest.cc:642] CHECK_STREQ failed: __null == "this" ( vs. this)F20211018 12:33:28.676255 26403 logging_custom_prefix_unittest.cc:643] CHECK_STREQ failed: "this" == "siht" (this vs. siht)
*** Check failure stack trace: ***
F20211018 12:33:28.676230 26403 logging_custom_prefix_unittest.cc:642] CHECK_STREQ failed: __null == "this" ( vs. this)F20211018 12:33:28.676255 26403 logging_custom_prefix_unittest.cc:643] CHECK_STREQ failed: "this" == "siht" (this vs. siht)F20211018 12:33:28.676282 26403 logging_custom_prefix_unittest.cc:644] CHECK_STRCASEEQ failed: __null == "siht" ( vs. siht)
*** Check failure stack trace: ***
F20211018 12:33:28.676230 26403 logging_custom_prefix_unittest.cc:642] CHECK_STREQ failed: __null == "this" ( vs. this)F20211018 12:33:28.676255 26403 logging_custom_prefix_unittest.cc:643] CHECK_STREQ failed: "this" == "siht" (this vs. siht)F20211018 12:33:28.676282 26403 logging_custom_prefix_unittest.cc:644] CHECK_STRCASEEQ failed: __null == "siht" ( vs. siht)F20211018 12:33:28.676309 26403 logging_custom_prefix_unittest.cc:645] CHECK_STRCASEEQ failed: "this" == "siht" (this vs. siht)
*** Check failure stack trace: ***
F20211018 12:33:28.676230 26403 logging_custom_prefix_unittest.cc:642] CHECK_STREQ failed: __null == "this" ( vs. this)F20211018 12:33:28.676255 26403 logging_custom_prefix_unittest.cc:643] CHECK_STREQ failed: "this" == "siht" (this vs. siht)F20211018 12:33:28.676282 26403 logging_custom_prefix_unittest.cc:644] CHECK_STRCASEEQ failed: __null == "siht" ( vs. siht)F20211018 12:33:28.676309 26403 logging_custom_prefix_unittest.cc:645] CHECK_STRCASEEQ failed: "this" == "siht" (this vs. siht)F20211018 12:33:28.676316 26403 logging_custom_prefix_unittest.cc:646] CHECK_STRNE failed: __null != __null ( vs. )
*** Check failure stack trace: ***
F20211018 12:33:28.676230 26403 logging_custom_prefix_unittest.cc:642] CHECK_STREQ failed: __null == "this" ( vs. this)F20211018 12:33:28.676255 26403 logging_custom_prefix_unittest.cc:643] CHECK_STREQ failed: "this" == "siht" (this vs. siht)F20211018 12:33:28.676282 26403 logging_custom_prefix_unittest.cc:644] CHECK_STRCASEEQ failed: __null == "siht" ( vs. siht)F20211018 12:33:28.676309 26403 logging_custom_prefix_unittest.cc:645] CHECK_STRCASEEQ failed: "this" == "siht" (this vs. siht)F20211018 12:33:28.676316 26403 logging_custom_prefix_unittest.cc:646] CHECK_STRNE failed: __null != __null ( vs. )F20211018 12:33:28.676343 26403 logging_custom_prefix_unittest.cc:647] CHECK_STRNE failed: "this" != "this" (this vs. this)
*** Check failure stack trace: ***
F20211018 12:33:28.676230 26403 logging_custom_prefix_unittest.cc:642] CHECK_STREQ failed: __null == "this" ( vs. this)F20211018 12:33:28.676255 26403 logging_custom_prefix_unittest.cc:643] CHECK_STREQ failed: "this" == "siht" (this vs. siht)F20211018 12:33:28.676282 26403 logging_custom_prefix_unittest.cc:644] CHECK_STRCASEEQ failed: __null == "siht" ( vs. siht)F20211018 12:33:28.676309 26403 logging_custom_prefix_unittest.cc:645] CHECK_STRCASEEQ failed: "this" == "siht" (this vs. siht)F20211018 12:33:28.676316 26403 logging_custom_prefix_unittest.cc:646] CHECK_STRNE failed: __null != __null ( vs. )F20211018 12:33:28.676343 26403 logging_custom_prefix_unittest.cc:647] CHECK_STRNE failed: "this" != "this" (this vs. this)F20211018 12:33:28.676374 26403 logging_custom_prefix_unittest.cc:648] CHECK_STREQ failed: (string("a")+"b").c_str() == "abc" (ab vs. abc)
*** Check failure stack trace: ***
[       OK ] DeathSTREQ.logging (0 ms)
[----------] 1 test from DeathSTREQ (0 ms total)

[----------] 1 test from CheckNOTNULL
[ RUN      ] CheckNOTNULL.Simple
[       OK ] CheckNOTNULL.Simple (0 ms)
[----------] 1 test from CheckNOTNULL (0 ms total)

[----------] 1 test from DeathCheckNN
[ RUN      ] DeathCheckNN.Simple
F20211018 12:33:28.676230 26403 logging_custom_prefix_unittest.cc:642] CHECK_STREQ failed: __null == "this" ( vs. this)F20211018 12:33:28.676255 26403 logging_custom_prefix_unittest.cc:643] CHECK_STREQ failed: "this" == "siht" (this vs. siht)F20211018 12:33:28.676282 26403 logging_custom_prefix_unittest.cc:644] CHECK_STRCASEEQ failed: __null == "siht" ( vs. siht)F20211018 12:33:28.676309 26403 logging_custom_prefix_unittest.cc:645] CHECK_STRCASEEQ failed: "this" == "siht" (this vs. siht)F20211018 12:33:28.676316 26403 logging_custom_prefix_unittest.cc:646] CHECK_STRNE failed: __null != __null ( vs. )F20211018 12:33:28.676343 26403 logging_custom_prefix_unittest.cc:647] CHECK_STRNE failed: "this" != "this" (this vs. this)F20211018 12:33:28.676374 26403 logging_custom_prefix_unittest.cc:648] CHECK_STREQ failed: (string("a")+"b").c_str() == "abc" (ab vs. abc)F20211018 12:33:28.676472 26403 logging_custom_prefix_unittest.cc:663] Check failed: 'static_cast<void *>(NULL)' Must be non NULL
*** Check failure stack trace: ***
[       OK ] DeathCheckNN.Simple (0 ms)
[----------] 1 test from DeathCheckNN (0 ms total)

[----------] 1 test from SafeFNMatch
[ RUN      ] SafeFNMatch.logging
[       OK ] SafeFNMatch.logging (0 ms)
[----------] 1 test from SafeFNMatch (0 ms total)

[----------] 1 test from Strerror
[ RUN      ] Strerror.logging
[       OK ] Strerror.logging (0 ms)
[----------] 1 test from Strerror (0 ms total)

[----------] 1 test from UserDefinedClass
[ RUN      ] UserDefinedClass.logging
[       OK ] UserDefinedClass.logging (0 ms)
[----------] 1 test from UserDefinedClass (0 ms total)

[----------] Global test environment tear-down
[==========] 8 tests from 8 test suites ran. (0 ms total)
[  PASSED  ] 8 tests.
I20211018 12:33:28.940918 26403 googletest.h:525] Diff was successful
==== Test setting log file basename
==== Test setting log file basename without timestamp and appending properly
I20211018 12:33:28.941329 26403 logging_custom_prefix_unittest.cc:759] message to new base, appending to preexisting file
==== Test setting log file basename and two processes writing - second should fail
I20211018 12:33:28.941550 26403 logging_custom_prefix_unittest.cc:782] message to new base, parent
Could not create log file: Resource temporarily unavailable
COULD NOT CREATE LOGFILE '20211018-123328.26405'!
I20211018 12:33:28.941884 26405 logging_custom_prefix_unittest.cc:788] message to new base, child - should only appear on STDERR not on the file
==== Test setting log file symlink
F20211018 12:33:28.676230 26403 logging_custom_prefix_unittest.cc:642] CHECK_STREQ failed: __null == "this" ( vs. this)F20211018 12:33:28.676255 26403 logging_custom_prefix_unittest.cc:643] CHECK_STREQ failed: "this" == "siht" (this vs. siht)F20211018 12:33:28.676282 26403 logging_custom_prefix_unittest.cc:644] CHECK_STRCASEEQ failed: __null == "siht" ( vs. siht)F20211018 12:33:28.676309 26403 logging_custom_prefix_unittest.cc:645] CHECK_STRCASEEQ failed: "this" == "siht" (this vs. siht)F20211018 12:33:28.676316 26403 logging_custom_prefix_unittest.cc:646] CHECK_STRNE failed: __null != __null ( vs. )F20211018 12:33:28.676343 26403 logging_custom_prefix_unittest.cc:647] CHECK_STRNE failed: "this" != "this" (this vs. this)F20211018 12:33:28.676374 26403 logging_custom_prefix_unittest.cc:648] CHECK_STREQ failed: (string("a")+"b").c_str() == "abc" (ab vs. abc)F20211018 12:33:28.676472 26403 logging_custom_prefix_unittest.cc:663] Check failed: 'static_cast<void *>(NULL)' Must be non NULL F20211018 12:33:28.942577 26403 logging_custom_prefix_unittest.cc:704] Check failed: unlink(files[i].c_str()) == 0 : Operation not permitted
*** Check failure stack trace: ***
    @     0x55ca576219f8  google::LogMessage::Fail()
    @     0x55ca57621940  google::LogMessage::SendToLog()
    @     0x55ca57621230  google::LogMessage::Flush()
    @     0x55ca57624d8a  google::LogMessageFatal::~LogMessageFatal()
    @     0x55ca5760dae2  DeleteFiles()
    @     0x55ca5760eaf7  TestSymlink()
    @     0x55ca57605ff2  main
    @     0x7f0976bfa0b3  __libc_start_main
    @     0x55ca5760267e  _start
    @              (nil)  (unknown)
Aborted

@sergiud
Copy link
Collaborator

sergiud commented Oct 18, 2021

Thanks. I'm not sure why sudo privileges are required to successfully complete the tests. What operating system are you running?

@vijaysattigeri
Copy link
Contributor Author

"Ubuntu 20.04.3 LTS" Using with WSL on Windws 11.

@sergiud
Copy link
Collaborator

sergiud commented Oct 18, 2021

Could you try compiling glog with googletest and rerun the tests?

@vijaysattigeri
Copy link
Contributor Author

Yes. Even with GoogleTest I could see the issue.

@vijaysattigeri
Copy link
Contributor Author

Debugging the issue. Let's see if I can find something

@vijaysattigeri
Copy link
Contributor Author

Hi,

I had accidentally executed build and test commands with "sudo" once. As a result, it created "/tmp/symlinkbase*" files with "root" as the owner.

When I ran build and test commands without "sudo" it was unable to remove "/tmp/symlinkbase*" files as they're owned by root.
This was the root cause for failure of tests.

I don't think this is a bug unless we always want to create files with user as owner. @sergiud , Can we close this issue?

@sergiud
Copy link
Collaborator

sergiud commented Oct 18, 2021

Thanks for the info.

@sergiud sergiud closed this as completed Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants