#2966 assigned project

POSIX Compliance

Reported by: aditya Owned by: Joel Sherrill
Priority: normal Milestone: Indefinite
Component: unspecified Version: 5
Severity: normal Keywords: SoC, API, small
Cc: Blocked By:
Blocking:

Description (last modified by Joel Sherrill)

POSIX Compliance

Contents

  1. POSIX Compliance
    1. Mentors
    2. Students
    3. Status
    4. Introduction
    5. Goal
    6. Project Tasks
      1. Pending Tasks
      2. Active Tasks
      3. Closed Tasks
    7. Requirements
    8. Tasks Without Tickets
    9. Testing
    10. References

Mentors

Joel Sherrill

Students

Past, Present, and Potential Students

Status

See Project Tasks.

Introduction

Increase the POSIX functions supported by RTEMS and Newlib.

Goal

Improve POSIX compliance of RTEMS and Newlib.

Project Tasks

Pending Tasks

Active Tasks

The following are the open tickets that are sub-tasks of this project. If you work on a part of this project please make a ticket and add the tag POSIX-Compliance.

#1977
mq_open lacks support of "mode" argument
#1978
sem_open lacks support of "mode" argument
#2078
sys/features.h ill-defines _POSIX_MEMLOCK and _POSIX_MEMLOCK_RANGE
#2158
dup2 is broken
#2169
rename(2) does not allow destination file to exist, contravenes POSIX and RTEMS documentation
#2973
Enable getdate() in newlib
#2974
Enable search.h functionality in newlib
#2975
Enhance support for POSIX mutex types
#2978
Support for sigaction() sa_flags Values
#3197
POSIX timer_create() should support CLOCK_MONOTONIC
#3356
Add support for CLOCK_THREAD_CPUTIME_ID
#3371
Add dirfd() and fdopendir() methods in dirent.h
#3372
add tests for inttypes.h methods to RTEMS
#3404
CLOCK_MONOTONIC option on all POSIX services not exercised
#3631
unknown type name 'off_t' in regex.h
#3633
add getdelim() and getline() to stdio.h
#3635
Remove #if defined(__CYGWIN__) from complex.h header file
#3638
Investigate standards origin of y0l, y1l, and ynl for psxhdrs tests
#3639
Add fmtmsg.h to newlib
#3640
Add support for ucontext.h methods
#3642
Add iswalnum(), iswalpha() ... (and 18 others) to <wchar.h> header
#3643
Add support for uchar.h header
#3644
Add support for stdlib.h method - getsubopt
#3645
Add support for stdlib.h method - grantpt
#3646
Add support for stdlib.h method - posix_openpt
#3647
Add support for stdlib.h method - ptsname
#3648
Add support for stdlib.h method - unlockpt
#3650
Add sys/ipc.h to newlib (System V IPC support)
#3652
Add support for sys/resource.h method - getpriority
#3653
Add support for sys/resource.h method - getrlimit
#3654
Add support for sys/resource.h method - setpriority
#3655
Add support for sys/resource.h method - setrlimit
#3656
Function prototypes for posix_fadvise() and posix_fallocate() missing in <fcntl.h> header file
#3658
Add support for sys/msg.h methods
#3660
Add sys/statvfs.h Header Files and Methods
#3661
Add Support for POSIX utmpx.h
#3662
Add Support for POSIX sys/shm.h (System V Shared Memory)
#3676
Move aio.h from RTEMS to newlib
#3778
POSIX Timers Do Not Support SIGEV_THREAD
#3889
Test needed for timer_create with CLOCK_MONOTONIC
#3890
Test needed for clock_nanosleep with CLOCK_MONOTONIC
#3891
Implement pthread_getcpuclockid()
#3928
Implement clock_getcpuclockid()
#4004
Add support for sigaction SA_RESETHAND
#4824
Move mqueue.h to newlib
#4926
open() non-blocking mode. not posix compliant


Closed Tasks

#2608
POSIX Condition Variables Clock Attribute Support
#2734
pthread_setschedprio() is missing
#2836
Add posix_devctl()
#2859
Implement POSIX Shared Memory Objects
#2968
newlib inttypes.h is missing some methods
#2970
Add ftw.h to newlib
#2971
Add fenv.h to newlib
#2972
Add ndbm.h support
#3373
add confstr() method
#3657
Add support for poll.h method - poll
#3798
Add sockatmark to libbsd
#4563
Add long double math methods to newlib


Requirements

RTEMS POSIX Compliance is achieved via a combination of methods and .h files in RTEMS and the newlib C Library. Newlib also provides the math library.

Disclaimer: The order in which methods/issues are presented here should not be taken as the priority with which they should be addressed. It is also quite likely this list is incomplete. A more complete view of the situation is in the RTEMS POSIX Compliance Guide available at https://docs.rtems.org. That document was created from a spreadsheet which is a .csv file available in the rtems-docs repository. RTEMS compliance is tracked against multiple versions of POSIX, C Language versions, and embedded standards which profile the POSIX standard.

Before planning to implement anything on this list, please review rtems, newlib, rtems-libbsd, and the .h files newlib installs. These four are the sources for RTEMS POSIX support. Each is a moving target. Request updates to the spreadsheet when you find places that need updating.

Tasks Without Tickets

RTEMS itself is missing a few methods and may have issues with others. These methods may have outstanding POSIX compliance issues:

  • Improved support at the API level for CLOCK_MONOTONIC (may have ticket)
    • This impacts timer_create() and at least pthread_condvar_timedwait
  • List IO
  • Are all methods in signal.h possible provided?

Newlib also has some known issues:

  • sys/statvfs.h is missing
    • Implementation would likely be in RTEMS
  • some random number related calls are missing
  • fstatvfs is missing at least a prototype in the right place

Others will be impossible to implement without multiple processes, and so we'll have to determine which methods make sense to support and in what manner.

Testing

  • Functional unit testing as needed
  • Additions to psxhdrs test to ensure methods can be invoked per Open Group specification
  • FACE Consortium Conformance Test Suite. The FACE Consortium has defined four POSIX profiles. RTEMS can support most of the methods in the largest profile (General Purpose).

References

Change History (31)

comment:1 Changed on 04/02/17 at 16:31:45 by Joel Sherrill

Description: modified (diff)
Version: 4.114.12

comment:2 Changed on 04/03/17 at 05:44:59 by Sebastian Huber

This ticket is too complex. If someone starts to work on one of its topics, then a new ticket should be opened.

comment:3 Changed on 04/03/17 at 12:22:45 by Gedare Bloom

Keywords: SoC API added
Owner: set to joel
Status: newassigned

comment:4 Changed on 04/03/17 at 12:38:36 by Joel Sherrill

Should this ticket be modified or closed with a hint that each subtask needs a ticket. That was the intent a yeah.

We can't have a ticket and wiki page duplicating each other.

comment:5 Changed on 04/03/17 at 17:46:32 by Gedare Bloom

The wiki pages are supposed to be converted to tickets. This is the right thing to do. If this ticket is too complex, then the wiki page was too complex. We want to document each Open Project as a ticket now. It makes some aspects of "Project Lifecycle" easier to manage.

comment:6 Changed on 04/03/17 at 18:06:54 by Joel Sherrill

The umbrella of POSIX compliance is very large. It is a series of tickets. Trac just doesn't provide a great mechanism for dealing with that.

I agree it is a series of tickets but how do you capture the general goal which might have 50 subtasks each of which is a legitimate small-medium project?

comment:7 Changed on 04/03/17 at 23:21:04 by Chris Johns

Description: modified (diff)

Add a Trac ticket query to report on open tickets.

comment:8 Changed on 04/03/17 at 23:27:38 by Chris Johns

Description: modified (diff)

Reformat the project into headings.
Add Project Tasks and add pending, active and closed reports.

comment:9 Changed on 04/03/17 at 23:29:55 by Chris Johns

Description: modified (diff)

Use page outline and not TOC.

comment:10 Changed on 04/03/17 at 23:30:28 by Chris Johns

Description: modified (diff)

Simplify the heading.

comment:11 Changed on 04/03/17 at 23:34:14 by Joel Sherrill

Description: modified (diff)

comment:12 Changed on 04/03/17 at 23:37:13 by Joel Sherrill

Chris and I converted this ticket to an umbrella ticket to track tickets with the tag "POSIX-Compliance". Tasks with tickets are automatically inserted and those without tickets are just listed for now. Tickets need to be written.

The Wiki page was deleted.

comment:13 Changed on 04/03/17 at 23:41:50 by Chris Johns

Description: modified (diff)

Reformatting changes.

comment:14 Changed on 04/03/17 at 23:46:36 by Chris Johns

Description: modified (diff)

Add a link from pending tasks to Tasks Without Tickets.

comment:15 Changed on 04/03/17 at 23:48:56 by Chris Johns

Description: modified (diff)

comment:16 Changed on 04/03/17 at 23:52:34 by Joel Sherrill

Description: modified (diff)

comment:17 Changed on 04/03/17 at 23:54:36 by Joel Sherrill

Description: modified (diff)

comment:18 Changed on 04/04/17 at 15:27:34 by Joel Sherrill

Description: modified (diff)

comment:19 Changed on 04/04/17 at 15:33:15 by Joel Sherrill

Description: modified (diff)

comment:20 Changed on 04/04/17 at 15:42:36 by Joel Sherrill

Description: modified (diff)

comment:21 Changed on 12/03/18 at 15:44:56 by Gedare Bloom

Owner: changed from joel to Joel Sherrill

comment:22 Changed on 12/07/18 at 17:39:29 by taneka zenon hans

Hi! I have added a ticket #3642 (Add iswalnum(), iswalpha() ... (and 10 others) to <wchar.h> header). Hopefully I could get someone to help add it into the description as I don't have the edit permission. Thank you!

comment:23 Changed on 12/09/18 at 14:29:59 by taneka zenon hans

Hi, because I do not have admin rights to modify the description, could someone help me add the following to the description? Thank you!

The previous task of adding POSIX compliance tests (#2262) have been divided into subtasks each focusing on different header files. These subtasks were used in the GCI 2018 as tasks and majority have been completed. Therefore, the task has been changed to fixing the bugs identified and adding any incomplete tests.

comment:24 Changed on 12/10/18 at 07:37:46 by taneka zenon hans

Hi, because I do not have admin rights to modify the description, could someone help me add the following ticket to the Active tasks list?

#3656 Function prototypes for posix_fadvise() and posix_fallocate() missing in <fcntl.h> header file

comment:25 Changed on 01/14/20 at 21:12:57 by Joel Sherrill

Keywords: kernel added

comment:26 Changed on 02/28/20 at 16:35:24 by Joel Sherrill

Description: modified (diff)

comment:27 Changed on 02/28/20 at 16:37:49 by Joel Sherrill

Description: modified (diff)

comment:28 Changed on 12/03/21 at 20:13:39 by Joel Sherrill

Description: modified (diff)

comment:29 Changed on 02/03/22 at 20:10:38 by Gedare Bloom

Keywords: small large added

comment:30 Changed on 02/17/24 at 02:22:10 by Gedare Bloom

Keywords: large removed

comment:31 Changed on 02/17/24 at 05:12:08 by Gedare Bloom

Keywords: kernel removed
Note: See TracTickets for help on using tickets.