POSIX compliance

Hi,
This is a normal question I have out of curiousity. I was looking at the presentation by Niels at T-DOSE and it said that Haiku has partial POSIX compliance. Why is that so? Do we have to remove some parts of POSIX in order to keep the OS modern or is it just that it hasn’t been implemented completely yet?

No one? :frowning:

It just hasn’t been completely implemented yet. I added some more pthread code a while back, but we are still lacking some stuff there, and Vasilis Kaoutsis has been providing a lot of patches lately to improve the POSIX signal support.

It might be nice if someone took the time to figure out what we have implemented and what we lack and documented it somewhere. Adding POSIX support, while somewhat low-level, can be done as fairly easy, small tasks that new or occasional developers could work on.

If you want to get involved in the project this might be a nice area to work on. Even if you aren’t a developer, you are probably technical enough to read header files and POSIX documentation to see what we still need to implement for full POSIX support. Having that list would be great.

Thank you for the reply :slight_smile:
I’m not a coder - just a tech enthusiast, a 2nd yr computing sciences’ student who just finished learning C++ this semester. At the moment my hands are tied as final exams are going to start tomorrow. But I’ll definitely try help with that after my exams end - that’s two weeks or so…

This is an old thread, but as of hrev54712 - Haiku x86 nearly passed all of a OPENPOSIX conformance test.

Open POSIX Test Suite - Haiku x86 hrev54712
***************************
CONFORMANCE TEST RESULTS
***************************
* TOTAL: 1469
* PASSED: 1330
* FAILED: 41
* UNRESOLVED: 17
* UNSUPPORTED: 22
* UNTESTED: 45
* INTERRUPTED: 0
* HUNG: 4
* SEGV: 0
* OTHERS: 10
***************************

            *******************************************
            *         EXECUTION TIME STATISTICS       *
            *******************************************
            * START    : Mon Nov 16 22:54:46 PST 2020 *
            * END      : Mon Nov 16 23:21:30 PST 2020 *
            * DURATION :                              *
            *            0 hours                      *
            *            26 minutes                    *
            *            44 seconds                    *
            *******************************************

Finished

NOTE: UPDATED - I did a full compile refresh. There are a few MMAP and pthread tests that still fail - and the number of failed mandatory tests is actually 13 (i.e. per UNIX 03 compliance, hrev54712 -> hrev54722 x86).

Haiku has improved alot in POSIX compliance…

7 Likes

Did it have same situation with 64bit too?

Well done all!

Yes. There are some nuances between the x86 and x86_64 platforms but POSIX 1.2003 compliance testing and review only shows 13 actual tests remaining that fail on Haiku - all other failed tests are not mandatory for recent compliance testing so were discarded.

…good news… so it its technically will be easier for porting from other os like linux and bsd?

POSIX compliance has always been pretty reasonable. It’s conceivable that some software port, in recent years, was hung up on a POSIX issue that would be fixed now, but I’d be interested to know what it was.

1 Like

Yes, this makes porting software between POSIX-compatible OSes much easier.

1 Like

Open POSIX Test Suite - Haiku R1B4 x64 hrev56862 (nightly)
Date: 3/26/2023


CONFORMANCE TEST RESULTS


  • TOTAL: 1511
  • PASSED: 1372
  • FAILED: 43 (Actual: 8 - other tests failed from non-implemented features)
  • UNRESOLVED: 22
  • UNSUPPORTED: 14
  • UNTESTED: 53
  • INTERRUPTED: 0
  • HUNG: 2
  • SEGV: 0
  • OTHERS: 5

NOTE: Haiku’s UNIX 03 conformance improvement dealt with HUNG syscalls which now pass the same tests. Only remaining test issues of significance deal with pthreads.

Remaining non-kernel pthreads implementation test issues in:

  • pthread_cancel
  • pthread_cond_init
  • pthread_cond_timedwait
  • pthread_detach
  • pthread_rwlock_rdlock
  • pthread_rwlock_timedrdlock
  • pthread_rwlock_timedwrlock
  • pthread_rwlock_wrlock
10 Likes

this looks like a job for waddlesplash, not much left here to fix

1 Like

Tested on Haiku R1B4 (hrev56578+93):

            ***************************
             CONFORMANCE TEST RESULTS
            ***************************
            * TOTAL:   436 
            * PASSED:  311 
            * FAILED:  17 
            * UNRESOLVED:  10 
            * UNSUPPORTED:  22 
            * UNTESTED:  43 
            * INTERRUPTED:  0 
            * HUNG:  0 
            * SEGV:  0 
            * OTHERS:  33 
            ***************************

            *******************************************
            *         EXECUTION TIME STATISTICS       *
            *******************************************
            * START    : Tue Nov 14 09:51:03 GMT 2023 *
            * END      : Tue Nov 14 09:58:17 GMT 2023 *
            * DURATION :                              *
            *            0 hours                      *
            *            7 minutes                    *
            *            14 seconds                    *
            *******************************************

NOTE: Some compliance issues remain with: mmap, strftime.

  • So, 10 issues remain with mmap (8) and strftime (2).
5 Likes