[rtems commit] pwdgrp.c: Fix Unchecked return value from library ( CID #1255518)

Ryan Long ryan.long at oarcorp.com
Tue Mar 16 14:15:21 UTC 2021


I found this error yesterday, when doing more testing based on Chris's feedback. I've taken out the _Assert_Unused_variable_equals() in pwdgrp.c and replaced it with just a (void). The test passed afterwards, but Joel wants me to test it a little further. I'll get the patch in to fix that by the end of the day. 

-----Original Message-----
From: Sebastian Huber <sebastian.huber at embedded-brains.de> 
Sent: Tuesday, March 16, 2021 6:33 AM
To: RTEMS <devel at rtems.org>; Ryan Long <ryan.long at oarcorp.com>
Subject: Re: [rtems commit] pwdgrp.c: Fix Unchecked return value from library ( CID #1255518)

On 16/03/2021 12:30, Sebastian Huber wrote:

> On 08/03/2021 21:56, Joel Sherrill wrote:
>
>> Module:    rtems
>> Branch:    master
>> Commit:    55ba229d228d1b7372256978828c573dd0af56d4
>> Changeset:http://git.rtems.org/rtems/commit/?id=55ba229d228d1b7372256
>> 978828c573dd0af56d4
>>
>>
>> Author:    Ryan Long<ryan.long at oarcorp.com>
>> Date:      Tue Mar  2 11:46:02 2021 -0500
>>
>> pwdgrp.c: Fix Unchecked return value from library (CID #1255518)
>>
>> CID 1255518: Unchecked return value from library in pwdgrp_init().
>>
>> Closes #4282
>
> I get an assertion in the tests with RTEMS_DEBUG enabled:
>
>     test start: PWDGRP 1
>
>     *** BEGIN OF TEST PWDGRP 1 ***
>
>     *** TEST VERSION: 6.0.0.ca801609a7100804520809d1407174f465befee5
>
>     *** TEST STATE: EXPECTED_PASS
>
>     *** TEST BUILD: RTEMS_DEBUG RTEMS_NETWORKING RTEMS_POSIX_API
>
>     *** TEST TOOLS: 10.2.1 20210315 (RTEMS 6, RSB 
> 62363ba982213588ef5d8bc8c4ff3acc28075f3f,
>     Newlib d10d0d9)
>
>     assertion "(sc) == (0)" failed: file 
> "/home/EB/sebastian_h/src/rtems/cpukit/libcsupport/src/pwdgrp.c",
>     line 72, function: pwdgrp_init

Also these tests:

     test start: PSXPASSWD 2

     *** BEGIN OF TEST PSXPASSWD 2 ***

     *** TEST VERSION: 6.0.0.ca801609a7100804520809d1407174f465befee5

     *** TEST STATE: EXPECTED_PASS

     *** TEST BUILD: RTEMS_DEBUG RTEMS_NETWORKING RTEMS_POSIX_API

     *** TEST TOOLS: 10.2.1 20210315 (RTEMS 6, RSB 62363ba982213588ef5d8bc8c4ff3acc28075f3f,
     Newlib d10d0d9)

     Init - Creating /etc

     Init - Creating /etc/passwd

     Init - Creating /etc/group

     Init - setpwent() -- OK

     assertion "(sc) == (0)" failed: file "/home/EB/sebastian_h/src/rtems/cpukit/libcsupport/src/pwdgrp.c",

     line 72, function: pwdgrp_init


     test start: SHELL 1

     *** BEGIN OF TEST SHELL 1 ***

     *** TEST VERSION: 6.0.0.ca801609a7100804520809d1407174f465befee5

     *** TEST STATE: EXPECTED_PASS

     *** TEST BUILD: RTEMS_DEBUG RTEMS_NETWORKING RTEMS_POSIX_API

     *** TEST TOOLS: 10.2.1 20210315 (RTEMS 6, RSB 62363ba982213588ef5d8bc8c4ff3acc28075f3f,
     Newlib d10d0d9)

     assertion "(sc) == (0)" failed: file "/home/EB/sebastian_h/src/rtems/cpukit/libcsupport/src/pwdgrp.c",
     line 72, function: pwdgrp_init

--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at 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/



More information about the devel mailing list