erikzenker / inotify-cpp

A C++ interface for linux inotify
MIT License
136 stars 37 forks source link

Test fails on Ubuntu 18.04 #63

Closed elvisdukaj closed 4 years ago

elvisdukaj commented 4 years ago

I am trying to build the master (a98fe8b814ed4ad9007524c62763c5e56dd2c368) and run test on Ubuntu 18.04 but test are failing:

$ mkdir inotify-cpp && cd inotify-cpp
$ git clone https://github.com/erikzenker/inotify-cpp.git
$ mkdir build_release && cd build_release
$ cmake -G Ninja ../inotify-cpp
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- 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
-- Found Boost: /usr/include (found suitable version "1.65.1", minimum required is "1.54.0") found components: system filesystem 
-- Found Boost: /usr/include (found suitable version "1.65.1", minimum required is "1.54.0") found components: unit_test_framework system filesystem 
-- Looking for pthread.h
-- Looking for 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  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/elvis/projects/elvis/inotify-cpp/build_release

$ cmake --build .
[12/12] Linking CXX executable test/unit/inotify_unit_test

$ ctest
Test project /home/elvis/projects/elvis/inotify-cpp/build_release
    Start 1: inotify_unit_test
1/1 Test #1: inotify_unit_test ................***Failed    4.20 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   4.21 sec

The following tests FAILED:
      1 - inotify_unit_test (Failed)
Errors while running CTes
elvisdukaj commented 4 years ago
./inotify_unit_test 
Running 17 test cases...
/home/elvis/projects/elvis/inotify-cpp/inotify-cpp/test/unit/NotifierBuilderTests.cpp(150): error: in "shouldNotifyOnCombinedEvent": check futureCombinedEvent.wait_for(timeout_) == std::future_status::ready has failed

*** 1 failure is detected in the test module "Inotify-cpp unit tests"
erikzenker commented 4 years ago

@elvisdukaj thank you for the bug report. Sadly, the test does not fail on my arch linux system. I will setup a ubuntu vm and try to reproduce the issue.

erikzenker commented 4 years ago

Okay, I was able to reproduce it on ubuntu 18.04. I will start to work on a fix.

erikzenker commented 4 years ago

I merged #64 to master. Can you check if it works on your system?

elvisdukaj commented 4 years ago

I updated it and now it's working properly! Thank you!