#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
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
#2970
Add ftw.h to newlib
#2971
Add fenv.h to newlib
#2972
Add ndbm.h support
#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
#3308
SPARC memcpy() lowering performance
#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
#3373
add confstr() method
#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
#3657
Add support for poll.h method - poll
#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


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


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 following spreadsheet:

which was created against Issue 3 of the Single Unix Specification and an old version of RTEMS. It needs to be updated to Issue 4/POSIX 2013 and a new version of RTEMS.

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

RTEMS is missing a few POSIX methods which could be supported:

  • pthread_getcpuclockid()
  • Are all methods in signal.h possible provided?

Newlib also has some known issues:

  • math.h missing some methods
    • long double complex methods. These could come from FreeBSD but we need to be careful since there may be architecture specific implementations. https://wiki.freebsd.org/Numerics
  • sys/statvfs.h is missing
    • Implementation would likely be in RTEMS
  • some random number 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 (24)

comment:1 Changed on Apr 2, 2017 at 4:31:45 PM by Joel Sherrill

Description: modified (diff)
Version: 4.114.12

comment:2 Changed on Apr 3, 2017 at 5:44:59 AM 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 Apr 3, 2017 at 12:22:45 PM by Gedare

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

comment:4 Changed on Apr 3, 2017 at 12:38:36 PM 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 Apr 3, 2017 at 5:46:32 PM by Gedare

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 Apr 3, 2017 at 6:06:54 PM 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 Apr 3, 2017 at 11:21:04 PM by Chris Johns

Description: modified (diff)

Add a Trac ticket query to report on open tickets.

comment:8 Changed on Apr 3, 2017 at 11:27:38 PM 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 Apr 3, 2017 at 11:29:55 PM by Chris Johns

Description: modified (diff)

Use page outline and not TOC.

comment:10 Changed on Apr 3, 2017 at 11:30:28 PM by Chris Johns

Description: modified (diff)

Simplify the heading.

comment:11 Changed on Apr 3, 2017 at 11:34:14 PM by Joel Sherrill

Description: modified (diff)

comment:12 Changed on Apr 3, 2017 at 11:37:13 PM 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 Apr 3, 2017 at 11:41:50 PM by Chris Johns

Description: modified (diff)

Reformatting changes.

comment:14 Changed on Apr 3, 2017 at 11:46:36 PM by Chris Johns

Description: modified (diff)

Add a link from pending tasks to Tasks Without Tickets.

comment:15 Changed on Apr 3, 2017 at 11:48:56 PM by Chris Johns

Description: modified (diff)

comment:16 Changed on Apr 3, 2017 at 11:52:34 PM by Joel Sherrill

Description: modified (diff)

comment:17 Changed on Apr 3, 2017 at 11:54:36 PM by Joel Sherrill

Description: modified (diff)

comment:18 Changed on Apr 4, 2017 at 3:27:34 PM by Joel Sherrill

Description: modified (diff)

comment:19 Changed on Apr 4, 2017 at 3:33:15 PM by Joel Sherrill

Description: modified (diff)

comment:20 Changed on Apr 4, 2017 at 3:42:36 PM by Joel Sherrill

Description: modified (diff)

comment:21 Changed on Dec 3, 2018 at 3:44:56 PM by Gedare

Owner: changed from joel to Joel Sherrill

comment:22 Changed on Dec 7, 2018 at 5:39:29 PM 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 Dec 9, 2018 at 2:29:59 PM 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 Dec 10, 2018 at 7:37:46 AM 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

Note: See TracTickets for help on using tickets.