Re: [PATCH] psx13: Reworked and relicensed
On Fri, Apr 23, 2021 at 3:09 PM Joel Sherrill wrote: > > > On Fri, Apr 23, 2021 at 3:08 PM Joel Sherrill wrote: > >> >> >> On Thu, Apr 22, 2021 at 11:06 AM Ryan Long wrote: >> >>> >> +#ifdef __sparc__ >>> >What's this for? >>> Joel said this was a special case, and that it needed to be put in, so >>> I'm not sure. >>> >> >> https://git.rtems.org/rtems/tree/cpukit/posix/src/sysconf.c#n57 >> >> This was to support code in GCC which had hard-coded calls to this >> sysconf() >> in the SPARC backend but I grep'ed for them and didn't find them on >> master. >> Admittedly, I checked all the way back to egcs 1.1 and didn't find it >> there either >> so I am probably not looking right. >> >> If we are sure this isn't in GCC anymore, then it can be removed in a >> follow up >> patch. >> > OK. Archeology update. The code in GCC requiring this was removed (drumroll please..) 21 years ago I have filed a ticket for this. https://devel.rtems.org/ticket/4391#ticket Ryan.. once this is merged, follow up with a simple patch to delete this code. #4391 is yours. :) Thanks for triggering the investigation Gedare. Twenty years is a long time to carry this around and not need it. > >> >>> For the printf's in test_main(), I should take out all of the print >>> statements saying >>> >>> "Testing .Success"? >>> >>> >>> >>> -Original Message- >>> From: Gedare Bloom >>> Sent: Thursday, April 22, 2021 8:45 AM >>> To: Ryan Long >>> Cc: devel@rtems.org >>> Subject: Re: [PATCH] psx13: Reworked and relicensed >>> >>> See below for comments. This test suite might be a good candidate for >>> conversion to T_TEST_CASE framework. At any rate, this refactor is a marked >>> improvement. >>> >>> On Wed, Apr 21, 2021 at 2:57 PM Ryan Long wrote: >>> > >>> > Changed the way the tests were structured, added >>> > rtems_test_assert()'s, updated psx13.scn and the license. >>> >>> relicense changes should generally Update #3899. >>> >> > You can have two lines for ticket updates in the git commit (I think). > > close > updates > > > >> >>> > --- >>> > testsuites/psxtests/psx13/psx13.scn | 24 +- >>> > testsuites/psxtests/psx13/test.c| 879 >>> +--- >>> > 2 files changed, 335 insertions(+), 568 deletions(-) >>> > >>> > diff --git a/testsuites/psxtests/psx13/psx13.scn >>> > b/testsuites/psxtests/psx13/psx13.scn >>> > index 428a931..ee99867 100644 >>> > --- a/testsuites/psxtests/psx13/psx13.scn >>> > +++ b/testsuites/psxtests/psx13/psx13.scn >>> > @@ -1,16 +1,16 @@ >>> > *** POSIX TEST 13 *** >>> > >>> > Files initialized successfully. >>> > -Testing device_lseek()... Failed!!! >>> > -Testing dup() Failed!!! >>> > -Testing dup2()... Success. >>> > -Testing fdatasync().. Success. >>> > -Testing umask().. Success. >>> > -Testing utime().. Success. >>> > -Testing utimes().. Success. >>> > -Testing fsync().. Success. >>> > -Testing pathconf()... Success. >>> > -Testing fpathconf().. Success. >>> > -Testing sync().. >>> > +Testing lseek() on device... Success. >>> > +Testing dup()... Success. >>> > +Testing dup2().. Success. >>> > +Testing fdatasync(). Success. >>> > +Testing umask(). Success. >>> > +Testing utime(). Success. >>> > +Testing utimes() Success. >>> > +Testing fsync(). Success. >>> > +Testing pathconf().. Success. >>> > +Testing fpathconf(). Success. >>> > +Testing sync().. Success. >>> > >>> > -*** END OF TEST PSX13 *** >>> > +*** END OF TEST PSX 13 *** >>> > diff --git a/testsuites/psxtests/psx13/test.c >>> > b/testsuites/psxtests/psx13/test.c >>> > index 79b24c2..2d25b02 100644 >>> > --- a/testsuites/psxtests/psx13/test.c >>> > +++ b/testsuites/psxtests/psx13/test.c >>> > @@ -1,26 +1,49 @@ >>> > -/* >>> > - * Psx13 >>> > - * Chris Bond (working under Jennifer's
Re: [PATCH] psx13: Reworked and relicensed
On Fri, Apr 23, 2021 at 3:08 PM Joel Sherrill wrote: > > > On Thu, Apr 22, 2021 at 11:06 AM Ryan Long wrote: > >> >> +#ifdef __sparc__ >> >What's this for? >> Joel said this was a special case, and that it needed to be put in, so >> I'm not sure. >> > > https://git.rtems.org/rtems/tree/cpukit/posix/src/sysconf.c#n57 > > This was to support code in GCC which had hard-coded calls to this > sysconf() > in the SPARC backend but I grep'ed for them and didn't find them on master. > Admittedly, I checked all the way back to egcs 1.1 and didn't find it > there either > so I am probably not looking right. > > If we are sure this isn't in GCC anymore, then it can be removed in a > follow up > patch. > > >> For the printf's in test_main(), I should take out all of the print >> statements saying >> >> "Testing .Success"? >> >> >> >> -----Original Message----- >> From: Gedare Bloom >> Sent: Thursday, April 22, 2021 8:45 AM >> To: Ryan Long >> Cc: devel@rtems.org >> Subject: Re: [PATCH] psx13: Reworked and relicensed >> >> See below for comments. This test suite might be a good candidate for >> conversion to T_TEST_CASE framework. At any rate, this refactor is a marked >> improvement. >> >> On Wed, Apr 21, 2021 at 2:57 PM Ryan Long wrote: >> > >> > Changed the way the tests were structured, added >> > rtems_test_assert()'s, updated psx13.scn and the license. >> >> relicense changes should generally Update #3899. >> > You can have two lines for ticket updates in the git commit (I think). close updates > >> > --- >> > testsuites/psxtests/psx13/psx13.scn | 24 +- >> > testsuites/psxtests/psx13/test.c| 879 >> +--- >> > 2 files changed, 335 insertions(+), 568 deletions(-) >> > >> > diff --git a/testsuites/psxtests/psx13/psx13.scn >> > b/testsuites/psxtests/psx13/psx13.scn >> > index 428a931..ee99867 100644 >> > --- a/testsuites/psxtests/psx13/psx13.scn >> > +++ b/testsuites/psxtests/psx13/psx13.scn >> > @@ -1,16 +1,16 @@ >> > *** POSIX TEST 13 *** >> > >> > Files initialized successfully. >> > -Testing device_lseek()... Failed!!! >> > -Testing dup() Failed!!! >> > -Testing dup2()... Success. >> > -Testing fdatasync().. Success. >> > -Testing umask().. Success. >> > -Testing utime().. Success. >> > -Testing utimes().. Success. >> > -Testing fsync().. Success. >> > -Testing pathconf()... Success. >> > -Testing fpathconf().. Success. >> > -Testing sync().. >> > +Testing lseek() on device... Success. >> > +Testing dup()... Success. >> > +Testing dup2().. Success. >> > +Testing fdatasync(). Success. >> > +Testing umask(). Success. >> > +Testing utime(). Success. >> > +Testing utimes() Success. >> > +Testing fsync(). Success. >> > +Testing pathconf().. Success. >> > +Testing fpathconf(). Success. >> > +Testing sync().. Success. >> > >> > -*** END OF TEST PSX13 *** >> > +*** END OF TEST PSX 13 *** >> > diff --git a/testsuites/psxtests/psx13/test.c >> > b/testsuites/psxtests/psx13/test.c >> > index 79b24c2..2d25b02 100644 >> > --- a/testsuites/psxtests/psx13/test.c >> > +++ b/testsuites/psxtests/psx13/test.c >> > @@ -1,26 +1,49 @@ >> > -/* >> > - * Psx13 >> > - * Chris Bond (working under Jennifer's account) >> > +/** >> > + * @file >> > + * >> > + * @brief This tests various file system functions. >> > * >> > * This test exercises the following routines: >> > * >> > - * device_lseek - test implemented >> > - * dup - test implemented >> > - * dup2 - test implemented >> > - * fdatasync- test implemented >> > - * fsync- test implemented >> > - * pathconf - test implemented >> > - * fpathconf- test implemented >> > - * umask- test implemented >> > - * utime- test implemented >> > - * utimes - test implemented >> > + * - lseek() >> > + * - dup() >> > + * - dup2() >> > + * - fdatasync() >> >
Re: [PATCH] psx13: Reworked and relicensed
On Thu, Apr 22, 2021 at 11:06 AM Ryan Long wrote: > >> +#ifdef __sparc__ > >What's this for? > Joel said this was a special case, and that it needed to be put in, so I'm > not sure. > https://git.rtems.org/rtems/tree/cpukit/posix/src/sysconf.c#n57 This was to support code in GCC which had hard-coded calls to this sysconf() in the SPARC backend but I grep'ed for them and didn't find them on master. Admittedly, I checked all the way back to egcs 1.1 and didn't find it there either so I am probably not looking right. If we are sure this isn't in GCC anymore, then it can be removed in a follow up patch. > For the printf's in test_main(), I should take out all of the print > statements saying > > "Testing .Success"? > > > > -Original Message- > From: Gedare Bloom > Sent: Thursday, April 22, 2021 8:45 AM > To: Ryan Long > Cc: devel@rtems.org > Subject: Re: [PATCH] psx13: Reworked and relicensed > > See below for comments. This test suite might be a good candidate for > conversion to T_TEST_CASE framework. At any rate, this refactor is a marked > improvement. > > On Wed, Apr 21, 2021 at 2:57 PM Ryan Long wrote: > > > > Changed the way the tests were structured, added > > rtems_test_assert()'s, updated psx13.scn and the license. > > relicense changes should generally Update #3899. > > > --- > > testsuites/psxtests/psx13/psx13.scn | 24 +- > > testsuites/psxtests/psx13/test.c| 879 > +--- > > 2 files changed, 335 insertions(+), 568 deletions(-) > > > > diff --git a/testsuites/psxtests/psx13/psx13.scn > > b/testsuites/psxtests/psx13/psx13.scn > > index 428a931..ee99867 100644 > > --- a/testsuites/psxtests/psx13/psx13.scn > > +++ b/testsuites/psxtests/psx13/psx13.scn > > @@ -1,16 +1,16 @@ > > *** POSIX TEST 13 *** > > > > Files initialized successfully. > > -Testing device_lseek()... Failed!!! > > -Testing dup() Failed!!! > > -Testing dup2()... Success. > > -Testing fdatasync().. Success. > > -Testing umask().. Success. > > -Testing utime().. Success. > > -Testing utimes().. Success. > > -Testing fsync().. Success. > > -Testing pathconf()... Success. > > -Testing fpathconf().. Success. > > -Testing sync().. > > +Testing lseek() on device... Success. > > +Testing dup()... Success. > > +Testing dup2().. Success. > > +Testing fdatasync(). Success. > > +Testing umask(). Success. > > +Testing utime(). Success. > > +Testing utimes() Success. > > +Testing fsync(). Success. > > +Testing pathconf().. Success. > > +Testing fpathconf(). Success. > > +Testing sync().. Success. > > > > -*** END OF TEST PSX13 *** > > +*** END OF TEST PSX 13 *** > > diff --git a/testsuites/psxtests/psx13/test.c > > b/testsuites/psxtests/psx13/test.c > > index 79b24c2..2d25b02 100644 > > --- a/testsuites/psxtests/psx13/test.c > > +++ b/testsuites/psxtests/psx13/test.c > > @@ -1,26 +1,49 @@ > > -/* > > - * Psx13 > > - * Chris Bond (working under Jennifer's account) > > +/** > > + * @file > > + * > > + * @brief This tests various file system functions. > > * > > * This test exercises the following routines: > > * > > - * device_lseek - test implemented > > - * dup - test implemented > > - * dup2 - test implemented > > - * fdatasync- test implemented > > - * fsync- test implemented > > - * pathconf - test implemented > > - * fpathconf- test implemented > > - * umask- test implemented > > - * utime- test implemented > > - * utimes - test implemented > > + * - lseek() > > + * - dup() > > + * - dup2() > > + * - fdatasync() > > + * - fsync() > > + * - pathconf() > > + * - fpathconf() > > + * - umask() > > + * - utime() > > + * - utimes() > > + * - sync() > > + */ > > + > > While you're at it, please conform to > > https://docs.rtems.org/branches/master/eng/coding-file-hdr.html#c-c-header-file-template > > > +/* > > + * SPDX-License-Identifier: BSD-2-Clause > > * > > - * COPYRIGHT (c) 1989-2009. > > + * COPYRIGHT (c) 1989-2009, 2021. > > * On-Line Applications Research Corporation (OAR). > > * > > - * The licen
Re: [PATCH] psx13: Reworked and relicensed
On Thu, Apr 22, 2021 at 10:06 AM Ryan Long wrote: > > >> +#ifdef __sparc__ > >What's this for? > Joel said this was a special case, and that it needed to be put in, so I'm > not sure. > Joel: Please address. > For the printf's in test_main(), I should take out all of the print > statements saying > > "Testing .Success"? > Remove all the explicit printf statements. Ideally, there should only be TEST_BEGIN() banner and TEST_END() banner for a successful test, and if there is an error then it is easy to find between the banners since only rtems_test_assert() will print anything there. > > > -Original Message- > From: Gedare Bloom > Sent: Thursday, April 22, 2021 8:45 AM > To: Ryan Long > Cc: devel@rtems.org > Subject: Re: [PATCH] psx13: Reworked and relicensed > > See below for comments. This test suite might be a good candidate for > conversion to T_TEST_CASE framework. At any rate, this refactor is a marked > improvement. > > On Wed, Apr 21, 2021 at 2:57 PM Ryan Long wrote: > > > > Changed the way the tests were structured, added > > rtems_test_assert()'s, updated psx13.scn and the license. > > relicense changes should generally Update #3899. > > > --- > > testsuites/psxtests/psx13/psx13.scn | 24 +- > > testsuites/psxtests/psx13/test.c| 879 > > +--- > > 2 files changed, 335 insertions(+), 568 deletions(-) > > > > diff --git a/testsuites/psxtests/psx13/psx13.scn > > b/testsuites/psxtests/psx13/psx13.scn > > index 428a931..ee99867 100644 > > --- a/testsuites/psxtests/psx13/psx13.scn > > +++ b/testsuites/psxtests/psx13/psx13.scn > > @@ -1,16 +1,16 @@ > > *** POSIX TEST 13 *** > > > > Files initialized successfully. > > -Testing device_lseek()... Failed!!! > > -Testing dup() Failed!!! > > -Testing dup2()... Success. > > -Testing fdatasync().. Success. > > -Testing umask().. Success. > > -Testing utime().. Success. > > -Testing utimes().. Success. > > -Testing fsync().. Success. > > -Testing pathconf()... Success. > > -Testing fpathconf().. Success. > > -Testing sync().. > > +Testing lseek() on device... Success. > > +Testing dup()... Success. > > +Testing dup2().. Success. > > +Testing fdatasync(). Success. > > +Testing umask(). Success. > > +Testing utime(). Success. > > +Testing utimes() Success. > > +Testing fsync(). Success. > > +Testing pathconf().. Success. > > +Testing fpathconf(). Success. > > +Testing sync().. Success. > > > > -*** END OF TEST PSX13 *** > > +*** END OF TEST PSX 13 *** > > diff --git a/testsuites/psxtests/psx13/test.c > > b/testsuites/psxtests/psx13/test.c > > index 79b24c2..2d25b02 100644 > > --- a/testsuites/psxtests/psx13/test.c > > +++ b/testsuites/psxtests/psx13/test.c > > @@ -1,26 +1,49 @@ > > -/* > > - * Psx13 > > - * Chris Bond (working under Jennifer's account) > > +/** > > + * @file > > + * > > + * @brief This tests various file system functions. > > * > > * This test exercises the following routines: > > * > > - * device_lseek - test implemented > > - * dup - test implemented > > - * dup2 - test implemented > > - * fdatasync- test implemented > > - * fsync- test implemented > > - * pathconf - test implemented > > - * fpathconf- test implemented > > - * umask- test implemented > > - * utime- test implemented > > - * utimes - test implemented > > + * - lseek() > > + * - dup() > > + * - dup2() > > + * - fdatasync() > > + * - fsync() > > + * - pathconf() > > + * - fpathconf() > > + * - umask() > > + * - utime() > > + * - utimes() > > + * - sync() > > + */ > > + > > While you're at it, please conform to > https://docs.rtems.org/branches/master/eng/coding-file-hdr.html#c-c-header-file-template > > > +/* > > + * SPDX-License-Identifier: BSD-2-Clause > > * > > - * COPYRIGHT (c) 1989-2009. > > + * COPYRIGHT (c) 1989-2009, 2021. > > * On-Line Applications Research Corporation (OAR). > > * > > - * The license and distribution terms for this file may be > > - * found in the file LICENSE in this distribution or at > > - * http
RE: [PATCH] psx13: Reworked and relicensed
>> +#ifdef __sparc__ >What's this for? Joel said this was a special case, and that it needed to be put in, so I'm not sure. For the printf's in test_main(), I should take out all of the print statements saying "Testing .Success"? -Original Message- From: Gedare Bloom Sent: Thursday, April 22, 2021 8:45 AM To: Ryan Long Cc: devel@rtems.org Subject: Re: [PATCH] psx13: Reworked and relicensed See below for comments. This test suite might be a good candidate for conversion to T_TEST_CASE framework. At any rate, this refactor is a marked improvement. On Wed, Apr 21, 2021 at 2:57 PM Ryan Long wrote: > > Changed the way the tests were structured, added > rtems_test_assert()'s, updated psx13.scn and the license. relicense changes should generally Update #3899. > --- > testsuites/psxtests/psx13/psx13.scn | 24 +- > testsuites/psxtests/psx13/test.c| 879 > +--- > 2 files changed, 335 insertions(+), 568 deletions(-) > > diff --git a/testsuites/psxtests/psx13/psx13.scn > b/testsuites/psxtests/psx13/psx13.scn > index 428a931..ee99867 100644 > --- a/testsuites/psxtests/psx13/psx13.scn > +++ b/testsuites/psxtests/psx13/psx13.scn > @@ -1,16 +1,16 @@ > *** POSIX TEST 13 *** > > Files initialized successfully. > -Testing device_lseek()... Failed!!! > -Testing dup() Failed!!! > -Testing dup2()... Success. > -Testing fdatasync().. Success. > -Testing umask().. Success. > -Testing utime().. Success. > -Testing utimes().. Success. > -Testing fsync().. Success. > -Testing pathconf()... Success. > -Testing fpathconf().. Success. > -Testing sync().. > +Testing lseek() on device... Success. > +Testing dup()... Success. > +Testing dup2().. Success. > +Testing fdatasync(). Success. > +Testing umask(). Success. > +Testing utime(). Success. > +Testing utimes() Success. > +Testing fsync(). Success. > +Testing pathconf().. Success. > +Testing fpathconf(). Success. > +Testing sync().. Success. > > -*** END OF TEST PSX13 *** > +*** END OF TEST PSX 13 *** > diff --git a/testsuites/psxtests/psx13/test.c > b/testsuites/psxtests/psx13/test.c > index 79b24c2..2d25b02 100644 > --- a/testsuites/psxtests/psx13/test.c > +++ b/testsuites/psxtests/psx13/test.c > @@ -1,26 +1,49 @@ > -/* > - * Psx13 > - * Chris Bond (working under Jennifer's account) > +/** > + * @file > + * > + * @brief This tests various file system functions. > * > * This test exercises the following routines: > * > - * device_lseek - test implemented > - * dup - test implemented > - * dup2 - test implemented > - * fdatasync- test implemented > - * fsync- test implemented > - * pathconf - test implemented > - * fpathconf- test implemented > - * umask- test implemented > - * utime- test implemented > - * utimes - test implemented > + * - lseek() > + * - dup() > + * - dup2() > + * - fdatasync() > + * - fsync() > + * - pathconf() > + * - fpathconf() > + * - umask() > + * - utime() > + * - utimes() > + * - sync() > + */ > + While you're at it, please conform to https://docs.rtems.org/branches/master/eng/coding-file-hdr.html#c-c-header-file-template > +/* > + * SPDX-License-Identifier: BSD-2-Clause > * > - * COPYRIGHT (c) 1989-2009. > + * COPYRIGHT (c) 1989-2009, 2021. > * On-Line Applications Research Corporation (OAR). > * > - * The license and distribution terms for this file may be > - * found in the file LICENSE in this distribution or at > - * http://www.rtems.org/license/LICENSE. > + * 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 O
Re: [PATCH] psx13: Reworked and relicensed
https://git.rtems.org/rtems/tree/testsuites/psxtests/psx13/main.c On Thu, Apr 22, 2021, 10:48 AM Gedare Bloom wrote: > On Thu, Apr 22, 2021 at 9:44 AM Ryan Long wrote: > > > > What other file? > > > > ls rtems/testsuites/psxtests/psx13 > > > > > > > > From: Joel Sherrill > > Sent: Thursday, April 22, 2021 9:21 AM > > To: Sebastian Huber > > Cc: Gedare Bloom ; Ryan Long ; > rtems-de...@rtems.org > > Subject: Re: [PATCH] psx13: Reworked and relicensed > > > > > > > > While you are updating the license on the OAR authored code, you should > pick up the other file in this directory. > > > > > > > > On Thu, Apr 22, 2021, 9:09 AM Sebastian Huber < > sebastian.hu...@embedded-brains.de> wrote: > > > > On 22/04/2021 15:44, Gedare Bloom wrote: > > > > >> + rv = close( fd1 ); > > >> + rtems_test_assert( rv == 0 ); > > >> > > > Just curious, why be inconsistent how you check for the return from > > > close? Above using != EOF, here using == 0. It doesn't matter greatly. > > Different APIs are tested. One uses 0, the other uses EOF. > > > > -- > > embedded brains GmbH > > Herr Sebastian HUBER > > Dornierstr. 4 > > 82178 Puchheim > > Germany > > email: sebastian.hu...@embedded-brains.de > > phone: +49-89-18 94 741 - 16 > > fax: +49-89-18 94 741 - 08 > > > > Registergericht: Amtsgericht München > > Registernummer: HRB 157899 > > Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler > > Unsere Datenschutzerklärung finden Sie hier: > > https://embedded-brains.de/datenschutzerklaerung/ > > > > ___ > > 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
Re: [PATCH] psx13: Reworked and relicensed
On Thu, Apr 22, 2021 at 9:44 AM Ryan Long wrote: > > What other file? > ls rtems/testsuites/psxtests/psx13 > > > From: Joel Sherrill > Sent: Thursday, April 22, 2021 9:21 AM > To: Sebastian Huber > Cc: Gedare Bloom ; Ryan Long ; > rtems-de...@rtems.org > Subject: Re: [PATCH] psx13: Reworked and relicensed > > > > While you are updating the license on the OAR authored code, you should pick > up the other file in this directory. > > > > On Thu, Apr 22, 2021, 9:09 AM Sebastian Huber > wrote: > > On 22/04/2021 15:44, Gedare Bloom wrote: > > >> + rv = close( fd1 ); > >> + rtems_test_assert( rv == 0 ); > >> > > Just curious, why be inconsistent how you check for the return from > > close? Above using != EOF, here using == 0. It doesn't matter greatly. > Different APIs are tested. One uses 0, the other uses EOF. > > -- > embedded brains GmbH > Herr Sebastian HUBER > Dornierstr. 4 > 82178 Puchheim > Germany > email: sebastian.hu...@embedded-brains.de > phone: +49-89-18 94 741 - 16 > fax: +49-89-18 94 741 - 08 > > Registergericht: Amtsgericht München > Registernummer: HRB 157899 > Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler > Unsere Datenschutzerklärung finden Sie hier: > https://embedded-brains.de/datenschutzerklaerung/ > > ___ > 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
RE: [PATCH] psx13: Reworked and relicensed
What other file? From: Joel Sherrill Sent: Thursday, April 22, 2021 9:21 AM To: Sebastian Huber Cc: Gedare Bloom ; Ryan Long ; rtems-de...@rtems.org Subject: Re: [PATCH] psx13: Reworked and relicensed While you are updating the license on the OAR authored code, you should pick up the other file in this directory. On Thu, Apr 22, 2021, 9:09 AM Sebastian Huber mailto:sebastian.hu...@embedded-brains.de>> wrote: On 22/04/2021 15:44, Gedare Bloom wrote: >> + rv = close( fd1 ); >> + rtems_test_assert( rv == 0 ); >> > Just curious, why be inconsistent how you check for the return from > close? Above using != EOF, here using == 0. It doesn't matter greatly. Different APIs are tested. One uses 0, the other uses EOF. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de<mailto:sebastian.hu...@embedded-brains.de> phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899 Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler Unsere Datenschutzerklärung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/ ___ devel mailing list devel@rtems.org<mailto:devel@rtems.org> http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH] psx13: Reworked and relicensed
On Thu, Apr 22, 2021, 9:23 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 22/04/2021 16:21, Joel Sherrill wrote: > > > While you are updating the license on the OAR authored code, you > > should pick up the other file in this directory. > Sorry, what do you mean? > There is a single other file in psx13 which can go to BSD2 > -- > embedded brains GmbH > Herr Sebastian HUBER > Dornierstr. 4 > 82178 Puchheim > Germany > email: sebastian.hu...@embedded-brains.de > phone: +49-89-18 94 741 - 16 > fax: +49-89-18 94 741 - 08 > > Registergericht: Amtsgericht München > Registernummer: HRB 157899 > Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler > Unsere Datenschutzerklärung finden Sie hier: > https://embedded-brains.de/datenschutzerklaerung/ > > ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH] psx13: Reworked and relicensed
On 22/04/2021 16:21, Joel Sherrill wrote: While you are updating the license on the OAR authored code, you should pick up the other file in this directory. Sorry, what do you mean? -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899 Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler Unsere Datenschutzerklärung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/ ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH] psx13: Reworked and relicensed
While you are updating the license on the OAR authored code, you should pick up the other file in this directory. On Thu, Apr 22, 2021, 9:09 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 22/04/2021 15:44, Gedare Bloom wrote: > > >> + rv = close( fd1 ); > >> + rtems_test_assert( rv == 0 ); > >> > > Just curious, why be inconsistent how you check for the return from > > close? Above using != EOF, here using == 0. It doesn't matter greatly. > Different APIs are tested. One uses 0, the other uses EOF. > > -- > embedded brains GmbH > Herr Sebastian HUBER > Dornierstr. 4 > 82178 Puchheim > Germany > email: sebastian.hu...@embedded-brains.de > phone: +49-89-18 94 741 - 16 > fax: +49-89-18 94 741 - 08 > > Registergericht: Amtsgericht München > Registernummer: HRB 157899 > Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler > Unsere Datenschutzerklärung finden Sie hier: > https://embedded-brains.de/datenschutzerklaerung/ > > ___ > 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
Re: [PATCH] psx13: Reworked and relicensed
On 22/04/2021 15:44, Gedare Bloom wrote: + rv = close( fd1 ); + rtems_test_assert( rv == 0 ); Just curious, why be inconsistent how you check for the return from close? Above using != EOF, here using == 0. It doesn't matter greatly. Different APIs are tested. One uses 0, the other uses EOF. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899 Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler Unsere Datenschutzerklärung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/ ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH] psx13: Reworked and relicensed
See below for comments. This test suite might be a good candidate for conversion to T_TEST_CASE framework. At any rate, this refactor is a marked improvement. On Wed, Apr 21, 2021 at 2:57 PM Ryan Long wrote: > > Changed the way the tests were structured, added rtems_test_assert()'s, > updated psx13.scn and the license. relicense changes should generally Update #3899. > --- > testsuites/psxtests/psx13/psx13.scn | 24 +- > testsuites/psxtests/psx13/test.c| 879 > +--- > 2 files changed, 335 insertions(+), 568 deletions(-) > > diff --git a/testsuites/psxtests/psx13/psx13.scn > b/testsuites/psxtests/psx13/psx13.scn > index 428a931..ee99867 100644 > --- a/testsuites/psxtests/psx13/psx13.scn > +++ b/testsuites/psxtests/psx13/psx13.scn > @@ -1,16 +1,16 @@ > *** POSIX TEST 13 *** > > Files initialized successfully. > -Testing device_lseek()... Failed!!! > -Testing dup() Failed!!! > -Testing dup2()... Success. > -Testing fdatasync().. Success. > -Testing umask().. Success. > -Testing utime().. Success. > -Testing utimes().. Success. > -Testing fsync().. Success. > -Testing pathconf()... Success. > -Testing fpathconf().. Success. > -Testing sync().. > +Testing lseek() on device... Success. > +Testing dup()... Success. > +Testing dup2().. Success. > +Testing fdatasync(). Success. > +Testing umask(). Success. > +Testing utime(). Success. > +Testing utimes() Success. > +Testing fsync(). Success. > +Testing pathconf().. Success. > +Testing fpathconf(). Success. > +Testing sync().. Success. > > -*** END OF TEST PSX13 *** > +*** END OF TEST PSX 13 *** > diff --git a/testsuites/psxtests/psx13/test.c > b/testsuites/psxtests/psx13/test.c > index 79b24c2..2d25b02 100644 > --- a/testsuites/psxtests/psx13/test.c > +++ b/testsuites/psxtests/psx13/test.c > @@ -1,26 +1,49 @@ > -/* > - * Psx13 > - * Chris Bond (working under Jennifer's account) > +/** > + * @file > + * > + * @brief This tests various file system functions. > * > * This test exercises the following routines: > * > - * device_lseek - test implemented > - * dup - test implemented > - * dup2 - test implemented > - * fdatasync- test implemented > - * fsync- test implemented > - * pathconf - test implemented > - * fpathconf- test implemented > - * umask- test implemented > - * utime- test implemented > - * utimes - test implemented > + * - lseek() > + * - dup() > + * - dup2() > + * - fdatasync() > + * - fsync() > + * - pathconf() > + * - fpathconf() > + * - umask() > + * - utime() > + * - utimes() > + * - sync() > + */ > + While you're at it, please conform to https://docs.rtems.org/branches/master/eng/coding-file-hdr.html#c-c-header-file-template > +/* > + * SPDX-License-Identifier: BSD-2-Clause > * > - * COPYRIGHT (c) 1989-2009. > + * COPYRIGHT (c) 1989-2009, 2021. > * On-Line Applications Research Corporation (OAR). > * > - * The license and distribution terms for this file may be > - * found in the file LICENSE in this distribution or at > - * http://www.rtems.org/license/LICENSE. > + * 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. > */ > > #ifdef HAVE_CONFIG_H > @@ -34,6 +57,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -42,685 +66,428 @@ > > const char rtems_test_name[] = "PSX 13"; > > -int InitFiles(void); > -int DeviceLSeekTest(void); > -int