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

Cannot compile tests on macos #18

Open
db7 opened this issue Dec 15, 2024 · 2 comments
Open

Cannot compile tests on macos #18

db7 opened this issue Dec 15, 2024 · 2 comments

Comments

@db7
Copy link
Member

db7 commented Dec 15, 2024

The tests in libvsync depend on several Linux specific features, making them non-portable. I believe that is unnecessary, since the library itself should work on other POSIX systems (and most of it should also work on non-POSIX systems).

The issues I’ve found are:

  • dependency on sys/sysinfo.h
  • use of non-standard sched_setaffinity
  • use of non-standard getrandom
  • inttypes.h (although here I am unsure about the reason)

If we could get rid of these dependencies, the test cases would be more portable and run on other POSIX systems like macOS.

@db7
Copy link
Member Author

db7 commented Dec 16, 2024

I have removed the dependency on sys/sysinfo.h and the call to sched_setaffinity and then only these tests to fail to compile:

The following tests FAILED:                                                                                                                                     
         13 - core-vatomic8_write (Not Run)                                                                                                                     
        176 - test_ut_bitmap (Not Run)                                                                                                                          
        193 - bounded_mpmc_check_full (Not Run)                                                                                                                 
        197 - ut_test_simple (Not Run)                                                                                                                          
        288 - test_case_8_listset_fine (Not Run)                                                                                                                
        308 - test_test_case_popped_once_stack_xbo_backoff (Not Run)                                                                                            
        310 - cnd_test1 (Not Run)                                                                                                                               
        311 - cnd_test2 (Not Run)                                                                                                                               
        312 - mutex_musl (Not Run)                                                                                                                              
        313 - mutex_slim (Not Run)                                                                                                                              
        314 - mutex_tristate (Not Run)                                                                                                                          
        315 - once (Not Run)                      

I'll investigate that in more detail the reason for each of them, but the last 6 must be failing because of futex interface.

@db7
Copy link
Member Author

db7 commented Dec 16, 2024

Ok, I got all tests to compile and run. We just need 4 minor changes. I'll create a MR for it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant