[PATCH] rtems: Add rtems_scheduler_get_maximum_priority()
Update #3636. --- cpukit/Makefile.am | 1 + cpukit/include/rtems/rtems/tasks.h | 15 ++ cpukit/rtems/src/schedulergetmaxprio.c | 53 + testsuites/sptests/spscheduler01/init.c | 26 +++- 4 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 cpukit/rtems/src/schedulergetmaxprio.c diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am index 87b9236638..c65048634b 100644 --- a/cpukit/Makefile.am +++ b/cpukit/Makefile.am @@ -758,6 +758,7 @@ librtemscpu_a_SOURCES += rtems/src/rtemsobjectidgetnode.c librtemscpu_a_SOURCES += rtems/src/rtemsobjectsetname.c librtemscpu_a_SOURCES += rtems/src/rtemstimer.c librtemscpu_a_SOURCES += rtems/src/scheduleraddprocessor.c +librtemscpu_a_SOURCES += rtems/src/schedulergetmaxprio.c librtemscpu_a_SOURCES += rtems/src/schedulergetprocessorset.c librtemscpu_a_SOURCES += rtems/src/scheduleridentbyprocessor.c librtemscpu_a_SOURCES += rtems/src/scheduleridentbyprocessorset.c diff --git a/cpukit/include/rtems/rtems/tasks.h b/cpukit/include/rtems/rtems/tasks.h index 55863a9dd9..2dde93c73b 100644 --- a/cpukit/include/rtems/rtems/tasks.h +++ b/cpukit/include/rtems/rtems/tasks.h @@ -654,6 +654,21 @@ rtems_status_code rtems_scheduler_remove_processor( uint32_t cpu_index ); +/** + * @brief Gets the maximum task priority of the specified scheduler instance. + * + * @param[in] scheduler_id Identifier of the scheduler instance. + * @param[out] priority Pointer to a task priority value. + * + * @retval RTEMS_SUCCESSFUL Successful operation. + * @retval RTEMS_INVALID_ADDRESS The @a priority parameter is @c NULL. + * @retval RTEMS_INVALID_ID Invalid scheduler instance identifier. + */ +rtems_status_code rtems_scheduler_get_maximum_priority( + rtems_id scheduler_id, + rtems_task_priority *priority +); + /**@}*/ #ifdef __cplusplus diff --git a/cpukit/rtems/src/schedulergetmaxprio.c b/cpukit/rtems/src/schedulergetmaxprio.c new file mode 100644 index 00..a1eef31761 --- /dev/null +++ b/cpukit/rtems/src/schedulergetmaxprio.c @@ -0,0 +1,53 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (C) 2018 embedded brains GmbH + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +rtems_status_code rtems_scheduler_get_maximum_priority( + rtems_id scheduler_id, + rtems_task_priority *priority +) +{ + uint32_t index; + + if ( priority == NULL ) { +return RTEMS_INVALID_ADDRESS; + } + + index = _Scheduler_Get_index_by_id( scheduler_id ); + if ( index >= _Scheduler_Count ) { +return RTEMS_INVALID_ID; + } + + *priority = _Scheduler_Table[ index ].maximum_priority; + return RTEMS_SUCCESSFUL; +} diff --git a/testsuites/sptests/spscheduler01/init.c b/testsuites/sptests/spscheduler01/init.c index fc03d0348d..04d65fcdd0 100644 --- a/testsuites/sptests/spscheduler01/init.c +++ b/testsuites/sptests/spscheduler01/init.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2017 embedded brains GmbH. All rights reserved. + * Copyright (c) 2014, 2018 embedded brains GmbH. All rights reserved. * * embedded brains GmbH * Dornierstr. 4 @@ -474,6 +474,29 @@ static void test_scheduler_ident(void) rtems_test_assert(scheduler_id == expected_id); } +static void test_scheduler_get_max_prio(void) +{ + rtems_status_code sc; + rtems_task_priority priority; + rtems_id scheduler_id; + + priority = 0; + sc = rtems_scheduler_get_maximum_priority(invalid_id, &priority); + rtems_test_assert(sc == RTEMS_INVALID_ID); + rtems_test_assert(priority == 0); + + sc = rtems_task_get_scheduler(RTEMS_SELF, &scheduler_id); + rtems_test_as
Re: The T Test Framework
Hello, I updated the documentation draft: https://devel.rtems.org/raw-attachment/ticket/3199/contributor.pdf It includes now also a section for time services and code runtime measurements. It would be nice to get some feedback if the general API is all right, e.g. header file and T_* namespace. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Fwd: [ftp gnu-ftp-upload] gcc
FYI -- Forwarded message - From: Date: Thu, Dec 6, 2018 at 10:21 AM Subject: [ftp gnu-ftp-upload] gcc To: , , < jos...@codesourcery.com>, , , , , , , , , , < schmorpfo...@schmorp.de>, , upload of gcc-7.4.0.tar.gz and gcc-7.4.0.tar.gz.sig complete ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
psxhdrs: Add POSIX API Signature Compliance Tests for string.h File (GCI 2018)
Hi guys, Here is the patch for string.h Thanks Himanshu From b489022dd909b5c098f3f80e05b6f776f10ad57f Mon Sep 17 00:00:00 2001 From: Himanshu40 Date: Thu, 6 Dec 2018 22:16:57 +0530 Subject: [PATCH] psxhdrs: Add POSIX API Signature Compliance Tests for string.h File (GCI 2018) --- testsuites/psxtests/Makefile.am | 37 - testsuites/psxtests/psxhdrs/string/memccpy.c | 41 +++ testsuites/psxtests/psxhdrs/string/memchr.c | 40 ++ testsuites/psxtests/psxhdrs/string/memcmp.c | 40 ++ testsuites/psxtests/psxhdrs/string/memcpy.c | 40 ++ testsuites/psxtests/psxhdrs/string/memmove.c | 40 ++ testsuites/psxtests/psxhdrs/string/memset.c | 40 ++ testsuites/psxtests/psxhdrs/string/stpcpy.c | 38 + testsuites/psxtests/psxhdrs/string/stpncpy.c | 40 ++ testsuites/psxtests/psxhdrs/string/strcat.c | 39 ++ testsuites/psxtests/psxhdrs/string/strchr.c | 38 + testsuites/psxtests/psxhdrs/string/strcmp.c | 39 ++ testsuites/psxtests/psxhdrs/string/strcoll.c | 39 ++ .../psxtests/psxhdrs/string/strcoll_l.c | 41 +++ testsuites/psxtests/psxhdrs/string/strcpy.c | 39 ++ testsuites/psxtests/psxhdrs/string/strcspn.c | 39 ++ testsuites/psxtests/psxhdrs/string/strdup.c | 38 + testsuites/psxtests/psxhdrs/string/strerror.c | 38 + .../psxtests/psxhdrs/string/strerror_l.c | 40 ++ .../psxtests/psxhdrs/string/strerror_r.c | 39 ++ testsuites/psxtests/psxhdrs/string/strlen.c | 38 + testsuites/psxtests/psxhdrs/string/strncat.c | 40 ++ testsuites/psxtests/psxhdrs/string/strncmp.c | 39 ++ testsuites/psxtests/psxhdrs/string/strncpy.c | 39 ++ testsuites/psxtests/psxhdrs/string/strndup.c | 38 + testsuites/psxtests/psxhdrs/string/strnlen.c | 38 + testsuites/psxtests/psxhdrs/string/strpbrk.c | 39 ++ testsuites/psxtests/psxhdrs/string/strrchr.c | 38 + .../psxtests/psxhdrs/string/strsignal.c | 37 + testsuites/psxtests/psxhdrs/string/strspn.c | 39 ++ testsuites/psxtests/psxhdrs/string/strstr.c | 39 ++ testsuites/psxtests/psxhdrs/string/strtok.c | 39 ++ testsuites/psxtests/psxhdrs/string/strtok_r.c | 40 ++ testsuites/psxtests/psxhdrs/string/strxfrm.c | 39 ++ .../psxtests/psxhdrs/string/strxfrm_l.c | 41 +++ 35 files changed, 1366 insertions(+), 2 deletions(-) create mode 100644 testsuites/psxtests/psxhdrs/string/memccpy.c create mode 100644 testsuites/psxtests/psxhdrs/string/memchr.c create mode 100644 testsuites/psxtests/psxhdrs/string/memcmp.c create mode 100644 testsuites/psxtests/psxhdrs/string/memcpy.c create mode 100644 testsuites/psxtests/psxhdrs/string/memmove.c create mode 100644 testsuites/psxtests/psxhdrs/string/memset.c create mode 100644 testsuites/psxtests/psxhdrs/string/stpcpy.c create mode 100644 testsuites/psxtests/psxhdrs/string/stpncpy.c create mode 100644 testsuites/psxtests/psxhdrs/string/strcat.c create mode 100644 testsuites/psxtests/psxhdrs/string/strchr.c create mode 100644 testsuites/psxtests/psxhdrs/string/strcmp.c create mode 100644 testsuites/psxtests/psxhdrs/string/strcoll.c create mode 100644 testsuites/psxtests/psxhdrs/string/strcoll_l.c create mode 100644 testsuites/psxtests/psxhdrs/string/strcpy.c create mode 100644 testsuites/psxtests/psxhdrs/string/strcspn.c create mode 100644 testsuites/psxtests/psxhdrs/string/strdup.c create mode 100644 testsuites/psxtests/psxhdrs/string/strerror.c create mode 100644 testsuites/psxtests/psxhdrs/string/strerror_l.c create mode 100644 testsuites/psxtests/psxhdrs/string/strerror_r.c create mode 100644 testsuites/psxtests/psxhdrs/string/strlen.c create mode 100644 testsuites/psxtests/psxhdrs/string/strncat.c create mode 100644 testsuites/psxtests/psxhdrs/string/strncmp.c create mode 100644 testsuites/psxtests/psxhdrs/string/strncpy.c create mode 100644 testsuites/psxtests/psxhdrs/string/strndup.c create mode 100644 testsuites/psxtests/psxhdrs/string/strnlen.c create mode 100644 testsuites/psxtests/psxhdrs/string/strpbrk.c create mode 100644 testsuites/psxtests/psxhdrs/string/strrchr.c create mode 100644 testsuites/psxtests/psxhdrs/string/strsignal.c create mode 100644 testsuites/psxtests/psxhdrs/string/strspn.c create mode 100644 testsuites/psxtests/psxhdrs/string/strstr.c create mode 100644 testsuites/psxtests/psxhdrs/string/strtok.c create mode 100644 testsuites/psxtests/psxhdrs/string/strtok_r.c create mode 100644 testsuites/psxtests/psxhdrs/string/strxfrm.c create mode 100644 testsuites/psxtest
[PATCH] psxtmtests: Identified a Timing Test missing
pthread_setschedprio (http://pubs.opengroup.org/onlinepubs/9699919799/) was missing in rtems/testsuites/psxtmtests/psxtmtests.csv. This work was part of GCI 2018. --- testsuites/psxtmtests/psxtmtests_plan.csv | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testsuites/psxtmtests/psxtmtests_plan.csv b/testsuites/psxtmtests/psxtmtests_plan.csv index 06c6bbaa8e..7e3bf732f1 100644 --- a/testsuites/psxtmtests/psxtmtests_plan.csv +++ b/testsuites/psxtmtests/psxtmtests_plan.csv @@ -67,6 +67,8 @@ "pthread_setschedparam: no thread switch","psxtmthread04","psxtmtest_single w/multiple timings","Yes" "pthread_setschedparam: lower own priority: preempt","psxtmthread05","psxtmtest_single","Yes" "pthread_setschedparam: raise other priority: preempt","psxtmthread06","psxtmtest_single","Yes" +"pthread_setschedprio: only case","psxtmthread07", "psxtmtest_single", "No" + "pthread_once: first time","psxtmonce01","psxtmtest_single","Yes" "pthread_once: second time","psxtmonce02","psxtmtest_single","No" -- 2.19.2 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH] psxtmtests/psxtmtests_plan.csv: Fix typos
Two quotation marks were missing so the CSV looked bad when using an editor with syntax highlighting and could also have produced some errors if the file was processed. Also two "Yes" ys were lowercase and I uppercased them so they are like the rest. --- testsuites/psxtmtests/psxtmtests_plan.csv | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testsuites/psxtmtests/psxtmtests_plan.csv b/testsuites/psxtmtests/psxtmtests_plan.csv index 7e3bf732f1..6e5fc9c9b5 100644 --- a/testsuites/psxtmtests/psxtmtests_plan.csv +++ b/testsuites/psxtmtests/psxtmtests_plan.csv @@ -34,7 +34,7 @@ "pthread_cond_broadcast: threads waiting: preempt","psxtmcond07","psxtmtest_unblocking_preempt","Yes" "pthread_cond_wait: blocks","psxtmcond08","psxtmtest_blocking","Yes" -"pthread_cond_timedwait: blocks,"psxtmcond09","psxtmtest_blocking","yes" +"pthread_cond_timedwait: blocks","psxtmcond09","psxtmtest_blocking","Yes" "pthread_cond_timedwait: time in past error","psxtmcond10","psxtmtest_blocking","Yes" "pthread_create: no preempt","psxtmthread01","psxtmtest_single","Yes" @@ -49,7 +49,7 @@ "pthread_attr_getschedpolicy: only case", "psxtmthreadattr01", "psxtmtest_single","Yes" "pthread_attr_getscope: only case", "psxtmthreadattr01", "psxtmtest_single","Yes" "pthread_attr_getstack: only case", "psxtmthreadattr01", "psxtmtest_single","Yes" -"pthread_attr_getstacksize: only case", "psxtmthreadattr01", "psxtmtest_single","yes" +"pthread_attr_getstacksize: only case", "psxtmthreadattr01", "psxtmtest_single","Yes" "pthread_attr_setdetachstate: only case", "psxtmthreadattr01", "psxtmtest_single","Yes" "pthread_attr_setguardsize: only case", "psxtmthreadattr01", "psxtmtest_single","Yes" "pthread_attr_setinheritsched: only case", "psxtmthreadattr01", "psxtmtest_single","Yes" @@ -130,7 +130,7 @@ "mq_unlink: only case","psxtmmq01","psxtmtest_init_destroy","Yes" "mq_receive: available",,"psxtmtest_single","Yes" "mq_receive: not available: block",,"psxtmtest_blocking","Yes" -"mq_timedreceive: not available: blocks","psxtmmqrcvblock02,"psxtmtest_blocking","Yes" +"mq_timedreceive: not available: blocks","psxtmmqrcvblock02","psxtmtest_blocking","Yes" "mq_timedreceive: not available: blocks",,"psxtmtest_single","No" "mq_send: no threads waiting",,"psxtmtest_single","Yes" "mq_send: thread waiting: no preempt",,"psxtmtest_unblocking_nopreempt","No" -- 2.19.2 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH] psxtmtests: Identified a Timing Test missing
Thanks. I merged both of these. --joel On Thu, Dec 6, 2018 at 10:49 AM Marçal Comajoan Cara < mcomajoanc...@gmail.com> wrote: > pthread_setschedprio (http://pubs.opengroup.org/onlinepubs/9699919799/) > was missing in > rtems/testsuites/psxtmtests/psxtmtests.csv. > > This work was part of GCI 2018. > --- > testsuites/psxtmtests/psxtmtests_plan.csv | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/testsuites/psxtmtests/psxtmtests_plan.csv > b/testsuites/psxtmtests/psxtmtests_plan.csv > index 06c6bbaa8e..7e3bf732f1 100644 > --- a/testsuites/psxtmtests/psxtmtests_plan.csv > +++ b/testsuites/psxtmtests/psxtmtests_plan.csv > @@ -67,6 +67,8 @@ > "pthread_setschedparam: no thread > switch","psxtmthread04","psxtmtest_single w/multiple timings","Yes" > "pthread_setschedparam: lower own priority: > preempt","psxtmthread05","psxtmtest_single","Yes" > "pthread_setschedparam: raise other priority: > preempt","psxtmthread06","psxtmtest_single","Yes" > +"pthread_setschedprio: only case","psxtmthread07", "psxtmtest_single", > "No" > + > > "pthread_once: first time","psxtmonce01","psxtmtest_single","Yes" > "pthread_once: second time","psxtmonce02","psxtmtest_single","No" > -- > 2.19.2 > > ___ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel > ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
psxhdrs: Add POSIX Conformance Test fot fmtmsg.h (GCI 2018)
Hello, The only test for the header file has been added with this patch , but has been disabled due to the absence of fmtmsg.h header file. Updates #3639 Thank you Regards From 4e4341f5c70f3b1c292ab8a6c8b39f07e3caef95 Mon Sep 17 00:00:00 2001 From: Shashvat Jain Date: Thu, 6 Dec 2018 13:24:13 -0500 Subject: [PATCH] psxhdrs:Add POSIX Conformance Test for fmtmsg.h (GCI 2018) Includes test fmtmsg which has been disabled due to the absence of header file fmtmsg.h . Updates #3639 --- testsuites/psxtests/Makefile.am | 4 ++- testsuites/psxtests/psxhdrs/fmtmsg/fmtmsg.c | 39 + 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 testsuites/psxtests/psxhdrs/fmtmsg/fmtmsg.c diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am index 1523dde..1044f2f 100644 --- a/testsuites/psxtests/Makefile.am +++ b/testsuites/psxtests/Makefile.am @@ -1539,7 +1539,8 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \ psxhdrs/wctype/wctrans.c \ psxhdrs/wctype/wctrans_l.c \ psxhdrs/wctype/wctype.c \ - psxhdrs/wctype/wctype_l.c + psxhdrs/wctype/wctype_l.c \ +psxhdrs/fmtmsg/fmtmsg.c ## Not supported by RTEMS, but POSIX API Compliance tests exist. ## lib_a_SOURCES += psxhdrs/ulimit/ulimit.c @@ -1566,6 +1567,7 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \ ## lib_a_SOURCES += psxhdrs/ftw/nftw.c See ticket #2970 ## lib_a_SOURCES += psxhdrs/stdio/getdelim.c See ticket #3633 ## lib_a_SOURCES += psxhdrs/stdio/getline.cSee ticket #3633 +## lib_a_SOURCES += psxhdrs/fmtmsg/fmtmsg.cSee ticket #3639 endif rtems_tests_PROGRAMS = $(psx_tests) diff --git a/testsuites/psxtests/psxhdrs/fmtmsg/fmtmsg.c b/testsuites/psxtests/psxhdrs/fmtmsg/fmtmsg.c new file mode 100644 index 000..30bce57 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/fmtmsg/fmtmsg.c @@ -0,0 +1,39 @@ +/** + * @file + * @brief fmtmsg() API Conformance Test + */ + + /* + * COPYRIGHT (c) 2018. + * Shashvat Jain + * + * Permission to use, copy, modify, and/or distribute this software + * for any purpose with or without fee is hereby granted. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR + * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES + * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +int test( void ); + +int test( void ) +{ + int result; + + result = fmtmsg(MM_PRINT, "warning:implicit variable", MM_ERROR,"Function not defined","Check the user manual","warning:implicit variable:001"); + + return (result) + +} -- 1.8.3.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: psxhdrs: Add POSIX Conformance Test fot fmtmsg.h (GCI 2018)
this is an updated patch. please ignore the above one . thank you On Thu, Dec 6, 2018 at 1:34 PM Shashvat Jain wrote: > Hello, > The only test for the header file has been added with this patch , > but has been disabled due to the absence of fmtmsg.h header file. > > Updates #3639 > > Thank you > Regards > From 3d4eea0af4ee97083f7f67521e52202ede97cf9c Mon Sep 17 00:00:00 2001 From: Shashvat Jain Date: Thu, 6 Dec 2018 13:53:09 -0500 Subject: [PATCH] psxhdrs:Add POSIX Conformance Test for fmtmsg.h (GCI 2018) Includes test fmtmsg which has been disabled due to the absence of header file fmtmsg.h . Updates #3639 --- testsuites/psxtests/Makefile.am | 1 + testsuites/psxtests/psxhdrs/fmtmsg/fmtmsg.c | 39 + 2 files changed, 40 insertions(+) create mode 100644 testsuites/psxtests/psxhdrs/fmtmsg/fmtmsg.c diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am index 1523dde..34ac1c8 100644 --- a/testsuites/psxtests/Makefile.am +++ b/testsuites/psxtests/Makefile.am @@ -1566,6 +1566,7 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \ ## lib_a_SOURCES += psxhdrs/ftw/nftw.c See ticket #2970 ## lib_a_SOURCES += psxhdrs/stdio/getdelim.c See ticket #3633 ## lib_a_SOURCES += psxhdrs/stdio/getline.cSee ticket #3633 +## lib_a_SOURCES += psxhdrs/fmtmsg/fmtmsg.cSee ticket #3639 endif rtems_tests_PROGRAMS = $(psx_tests) diff --git a/testsuites/psxtests/psxhdrs/fmtmsg/fmtmsg.c b/testsuites/psxtests/psxhdrs/fmtmsg/fmtmsg.c new file mode 100644 index 000..30bce57 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/fmtmsg/fmtmsg.c @@ -0,0 +1,39 @@ +/** + * @file + * @brief fmtmsg() API Conformance Test + */ + + /* + * COPYRIGHT (c) 2018. + * Shashvat Jain + * + * Permission to use, copy, modify, and/or distribute this software + * for any purpose with or without fee is hereby granted. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR + * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES + * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +int test( void ); + +int test( void ) +{ + int result; + + result = fmtmsg(MM_PRINT, "warning:implicit variable", MM_ERROR,"Function not defined","Check the user manual","warning:implicit variable:001"); + + return (result) + +} -- 1.8.3.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: psxhdrs: Add POSIX Conformance Test fot fmtmsg.h (GCI 2018)
Noted. you did what i wanted to :) its ok On Fri, Dec 7, 2018 at 12:44 AM Joel Sherrill wrote: > I think I merged the first one with corrections. If what's in git isn't > right, submit a followup. > > Please make sure your copyright block isn't one space off the margin. > > Thanks. > > --joel > > On Thu, Dec 6, 2018 at 12:56 PM Shashvat Jain > wrote: > >> this is an updated patch. please ignore the above one . >> >> thank you >> >> On Thu, Dec 6, 2018 at 1:34 PM Shashvat Jain >> wrote: >> >>> Hello, >>> The only test for the header file has been added with this patch , >>> but has been disabled due to the absence of fmtmsg.h header file. >>> >>> Updates #3639 >>> >>> Thank you >>> Regards >>> >> ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Old TBR pages need to be cleaned
Hello , In this mail I have offered resolution to clean up the TBR section of the wiki , by removing unnecessary pages or by making them into a ticket (+) https://devel.rtems.org/wiki/GCI/Coding/AddPerSectionSupportToBSPs I think the process using build_bsp script is old and should be deleted , the only thing that could be brought into use in BSPS Guide is the introduction paragraph "Explaining how linking helps." (+)https://devel.rtems.org/wiki/TBR/Delete/NewlibMemoryAllocation: same situation as that of Toolstatus , it is outdated and should be deleted , I discussed about whether we should keep the toolsstatus in our wiki with chris , here is the link to the Decision https://devel.rtems.org/ticket/3615 (+) https://devel.rtems.org/wiki/TBR/Review/OASL: still see no updates in present time. maybe merged somewhere else. (+) https://devel.rtems.org/wiki/TBR/Review/Real-Time_Resources Ticket : this can be very useful to those trying to use their creative minds to build powerful real-time applications , i think the core developers should be asked to add any thing they feel may help the application developers and put a page titled "DO YOU WANT TO DEVELOP Real-Time APPS ,THIS MAY HELP YOU!!" on Main page. maybe engineering booklet can have a similar section? references on this page are quite less , i can recommend to delete it . (+) https://devel.rtems.org/wiki/TBR/Review/DateTimeHardwareIssues This page is concerned with only on hardware RTCs , do not know where we can place it.RTEMS wiki would not be the right place for this info. Should be deleted. I do not have definitive decisions on many , it is just a recommendation . That is all for now Thank you Regards --Shashvat ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH] Implement POSIX API Signature Compliance Tests for inttypes.h
This work was part of GCI 2018 --- testsuites/psxtests/Makefile.am | 9 - .../psxtests/psxhdrs/inttypes/imaxabs.c | 38 ++ .../psxtests/psxhdrs/inttypes/imaxdiv.c | 39 ++ .../psxtests/psxhdrs/inttypes/strtoimax.c | 39 ++ .../psxtests/psxhdrs/inttypes/strtoumax.c | 39 ++ .../psxtests/psxhdrs/inttypes/wcstoimax.c | 40 +++ .../psxtests/psxhdrs/inttypes/wcstoumax.c | 40 +++ 7 files changed, 243 insertions(+), 1 deletion(-) create mode 100644 testsuites/psxtests/psxhdrs/inttypes/imaxabs.c create mode 100644 testsuites/psxtests/psxhdrs/inttypes/imaxdiv.c create mode 100644 testsuites/psxtests/psxhdrs/inttypes/strtoimax.c create mode 100644 testsuites/psxtests/psxhdrs/inttypes/strtoumax.c create mode 100644 testsuites/psxtests/psxhdrs/inttypes/wcstoimax.c create mode 100644 testsuites/psxtests/psxhdrs/inttypes/wcstoumax.c diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am index 4feaa8d68a..f5359d8b19 100644 --- a/testsuites/psxtests/Makefile.am +++ b/testsuites/psxtests/Makefile.am @@ -1573,7 +1573,14 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \ psxhdrs/wctype/wctrans.c \ psxhdrs/wctype/wctrans_l.c \ psxhdrs/wctype/wctype.c \ - psxhdrs/wctype/wctype_l.c + psxhdrs/wctype/wctype_l.c \ + psxhdrs/inttypes/imaxabs.c \ + psxhdrs/inttypes/imaxdiv.c \ + psxhdrs/inttypes/strtoimax.c \ + psxhdrs/inttypes/strtoumax.c \ + psxhdrs/inttypes/wcstoimax.c \ + psxhdrs/inttypes/wcstoumax.c + ## Not supported by RTEMS, but POSIX API Compliance tests exist. ## lib_a_SOURCES += psxhdrs/ulimit/ulimit.c diff --git a/testsuites/psxtests/psxhdrs/inttypes/imaxabs.c b/testsuites/psxtests/psxhdrs/inttypes/imaxabs.c new file mode 100644 index 00..df5c244034 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/inttypes/imaxabs.c @@ -0,0 +1,38 @@ +/** + * @file + * @brief imaxabs() API Conformance Test + */ + +/* + * COPYRIGHT (c) 2018. + * Marçal Comajoan Cara + * + * Permission to use, copy, modify, and/or distribute this software + * for any purpose with or without fee is hereby granted. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR + * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES + * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + intmax_t n = -42; + intmax_t result; + + result = imaxabs( n ); + + return ( result == 42 ); +} diff --git a/testsuites/psxtests/psxhdrs/inttypes/imaxdiv.c b/testsuites/psxtests/psxhdrs/inttypes/imaxdiv.c new file mode 100644 index 00..3538fef12b --- /dev/null +++ b/testsuites/psxtests/psxhdrs/inttypes/imaxdiv.c @@ -0,0 +1,39 @@ +/** + * @file + * @brief imaxdiv() API Conformance Test + */ + +/* + * COPYRIGHT (c) 2018. + * Marçal Comajoan Cara + * + * Permission to use, copy, modify, and/or distribute this software + * for any purpose with or without fee is hereby granted. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR + * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES + * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + intmax_t n = 42; + intmax_t denom = 5; + imaxdiv_t result; + + result = imaxdiv( n, denom ); + + return ( result.quot == 8 && result.rem == 2 ); +} diff --git a/testsuites/psxtests/psxhdrs/inttypes/strtoimax.c b/testsuites/psxtests/psxhdrs/inttypes/strtoimax.c new file mode 100644 index 00..1544bdcb29 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/inttypes/strtoimax.c @@ -0,0 +1,39 @@ +/** + * @file + * @brief strtoimax() API Conformance Test + */ + +/* + * COPYRIGHT (c) 2018. + * Marçal Comajoan Cara + * + * Permission to use, copy, modify, and/or distribute this software + * for any purpose with or without fee is hereby granted. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
Re: [PATCH] Implement POSIX API Signature Compliance Tests for inttypes.h
Just pushed this. Thanks. On Thu, Dec 6, 2018 at 3:27 PM Marçal Comajoan Cara wrote: > This work was part of GCI 2018 > --- > testsuites/psxtests/Makefile.am | 9 - > .../psxtests/psxhdrs/inttypes/imaxabs.c | 38 ++ > .../psxtests/psxhdrs/inttypes/imaxdiv.c | 39 ++ > .../psxtests/psxhdrs/inttypes/strtoimax.c | 39 ++ > .../psxtests/psxhdrs/inttypes/strtoumax.c | 39 ++ > .../psxtests/psxhdrs/inttypes/wcstoimax.c | 40 +++ > .../psxtests/psxhdrs/inttypes/wcstoumax.c | 40 +++ > 7 files changed, 243 insertions(+), 1 deletion(-) > create mode 100644 testsuites/psxtests/psxhdrs/inttypes/imaxabs.c > create mode 100644 testsuites/psxtests/psxhdrs/inttypes/imaxdiv.c > create mode 100644 testsuites/psxtests/psxhdrs/inttypes/strtoimax.c > create mode 100644 testsuites/psxtests/psxhdrs/inttypes/strtoumax.c > create mode 100644 testsuites/psxtests/psxhdrs/inttypes/wcstoimax.c > create mode 100644 testsuites/psxtests/psxhdrs/inttypes/wcstoumax.c > > diff --git a/testsuites/psxtests/Makefile.am > b/testsuites/psxtests/Makefile.am > index 4feaa8d68a..f5359d8b19 100644 > --- a/testsuites/psxtests/Makefile.am > +++ b/testsuites/psxtests/Makefile.am > @@ -1573,7 +1573,14 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \ > psxhdrs/wctype/wctrans.c \ > psxhdrs/wctype/wctrans_l.c \ > psxhdrs/wctype/wctype.c \ > - psxhdrs/wctype/wctype_l.c > + psxhdrs/wctype/wctype_l.c \ > + psxhdrs/inttypes/imaxabs.c \ > + psxhdrs/inttypes/imaxdiv.c \ > + psxhdrs/inttypes/strtoimax.c \ > + psxhdrs/inttypes/strtoumax.c \ > + psxhdrs/inttypes/wcstoimax.c \ > + psxhdrs/inttypes/wcstoumax.c > + > > ## Not supported by RTEMS, but POSIX API Compliance tests exist. > ## lib_a_SOURCES += psxhdrs/ulimit/ulimit.c > diff --git a/testsuites/psxtests/psxhdrs/inttypes/imaxabs.c > b/testsuites/psxtests/psxhdrs/inttypes/imaxabs.c > new file mode 100644 > index 00..df5c244034 > --- /dev/null > +++ b/testsuites/psxtests/psxhdrs/inttypes/imaxabs.c > @@ -0,0 +1,38 @@ > +/** > + * @file > + * @brief imaxabs() API Conformance Test > + */ > + > +/* > + * COPYRIGHT (c) 2018. > + * Marçal Comajoan Cara > + * > + * Permission to use, copy, modify, and/or distribute this software > + * for any purpose with or without fee is hereby granted. > + * > + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL > + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED > + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE > AUTHOR > + * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES > + * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, > + * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, > + * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS > SOFTWARE. > + */ > + > +#ifdef HAVE_CONFIG_H > +#include "config.h" > +#endif > + > +#include > + > +int test( void ); > + > +int test( void ) > +{ > + intmax_t n = -42; > + intmax_t result; > + > + result = imaxabs( n ); > + > + return ( result == 42 ); > +} > diff --git a/testsuites/psxtests/psxhdrs/inttypes/imaxdiv.c > b/testsuites/psxtests/psxhdrs/inttypes/imaxdiv.c > new file mode 100644 > index 00..3538fef12b > --- /dev/null > +++ b/testsuites/psxtests/psxhdrs/inttypes/imaxdiv.c > @@ -0,0 +1,39 @@ > +/** > + * @file > + * @brief imaxdiv() API Conformance Test > + */ > + > +/* > + * COPYRIGHT (c) 2018. > + * Marçal Comajoan Cara > + * > + * Permission to use, copy, modify, and/or distribute this software > + * for any purpose with or without fee is hereby granted. > + * > + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL > + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED > + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE > AUTHOR > + * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES > + * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, > + * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, > + * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS > SOFTWARE. > + */ > + > +#ifdef HAVE_CONFIG_H > +#include "config.h" > +#endif > + > +#include > + > +int test( void ); > + > +int test( void ) > +{ > + intmax_t n = 42; > + intmax_t denom = 5; > + imaxdiv_t result; > + > + result = imaxdiv( n, denom ); > + > + return ( result.quot == 8 && result.rem == 2 ); > +} > diff --git a/testsuites/psxtests/psxhdrs/inttypes/strtoimax.c > b/testsuites/psxtests/psxhdrs/inttypes/strtoimax.c > new file mode 100644 > index 00..1544bdcb29 > --- /dev/null > +++ b/testsuites/psxtests/psxhdrs/inttypes/strtoimax.c > @@ -0,0 +1,39 @@ > +/** > + * @file > + * @brief strtoimax() API Conformance Test > + */ > + > +/* > +