Fix #308, Improve SB create pipe error reporting#452
Fix #308, Improve SB create pipe error reporting#452astrogeco merged 1 commit intonasa:ic-20200213from
Conversation
ad6f5eb to
25e5d9b
Compare
|
Squashed, ready for review. |
skliper
left a comment
There was a problem hiding this comment.
Technically we may want an EID for each case.
|
I’m good with this, but is this the first time cFE sends OSAL EID’s upstream? I was under the impression that cFE always remapped OSAL EIDs to cFE EIDs.
From: Joseph Hickey <[email protected]>
Sent: Tuesday, January 14, 2020 13:16
To: nasa/cFE <[email protected]>
Cc: Knight, Christopher D. (ARC-TI) <[email protected]>; Author <[email protected]>
Subject: [EXTERNAL] Re: [nasa/cFE] Fix #308, Improve SB create pipe error reporting (#452)
@jphickey requested changes on this pull request.
________________________________
In fsw/cfe-core/src/sb/cfe_sb_api.c<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_nasa_cFE_pull_452-23discussion-5Fr366575835&d=DwMCaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=JDJB_KO_kIJMmlWcOl5Br6wthfeLCcxzUseDoBjuvfFQOIpFSnwdteHjX4mn9USx&m=2DuLoBB6EpwRjGyHrtHTJSHj3E1EBzh4cAaKQdzUET4&s=xuPY9Lfs74PBAuwlBOMyvYtXb7q9K0Gp1LbT2fa2zi0&e=>:
+ case CFE_OS_ERR_NAME_TAKEN:
+ CFE_EVS_SendEventWithAppID(CFE_SB_CR_PIPE_ERR_EID,CFE_EVS_EventType_ERROR,CFE_SB.AppId,
+ "CreatePipeErr:OS_QueueCreate failed, name taken (app=%s, name=%s)",
+ CFE_SB_GetAppTskName(TskId,FullName), PipeName);
+
+ *PipeIdPtr = OriginalPipeIdParamValue;
+
+ break;
+ case OS_ERR_NO_FREE_IDS:
+ CFE_EVS_SendEventWithAppID(CFE_SB_CR_PIPE_ERR_EID,CFE_EVS_EventType_ERROR,CFE_SB.AppId,
+ "CreatePipeErr:OS_QueueCreate failed, no free id's (app=%s)",
+ CFE_SB_GetAppTskName(TskId,FullName));
+
+ break;
+ default:
+ CFE_EVS_SendEventWithAppID(CFE_SB_CR_PIPE_ERR_EID,CFE_EVS_EventType_ERROR,CFE_SB.AppId,
This should either both use the OSAL-defined code (OS_ERR_NAME_TAKEN, OS_ERR_NO_FREE_IDS) or the CFE-defined equivalent (CFE_OS_ERR_NAME_TAKEN, CFE_OS_ERR_NO_FREE_IDS) but not one of each.
My preference is to use the actual OSAL return codes, the CFE wrapper ones don't add much value.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_nasa_cFE_pull_452-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DAIZYMK2XLBULBEJ7J6EL4B3Q5YTQ7A5CNFSM4KDJQLLKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCRXV55I-23pullrequestreview-2D342843125&d=DwMCaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=JDJB_KO_kIJMmlWcOl5Br6wthfeLCcxzUseDoBjuvfFQOIpFSnwdteHjX4mn9USx&m=2DuLoBB6EpwRjGyHrtHTJSHj3E1EBzh4cAaKQdzUET4&s=5Y3SAxS4J7nLdhUTcDXvlLUImZbq-wm0DgMmwbzlkus&e=>, or unsubscribe<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AIZYMK6774OIJUDAHMRXYNTQ5YTQ7ANCNFSM4KDJQLLA&d=DwMCaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=JDJB_KO_kIJMmlWcOl5Br6wthfeLCcxzUseDoBjuvfFQOIpFSnwdteHjX4mn9USx&m=2DuLoBB6EpwRjGyHrtHTJSHj3E1EBzh4cAaKQdzUET4&s=38NFDpQoVwxx28zdBL2pjXDH2HIPP2gpsEJhM2ZVabc&e=>.
|
|
This is not sending OSAL return codes in an event - it is sending the CFE-defined event based on the OSAL return code. Because the actual call ( |
skliper
left a comment
There was a problem hiding this comment.
Just to translate to a request - add unique EID's for each error (per non-open-sourced coding standard).
copy will implement by next week's CCB |
resolved |
skliper
left a comment
There was a problem hiding this comment.
Confirm current unit tests cover these new cases, needs squash
…unit test changes
a2c0815 to
7d13f76
Compare
squashed |
|
CCB 20200122 - Reviewed and approved for CI pending confirmation of test coverage |
Author responded to changes, CCB approved
Describe the contribution
Improves error reporting for CFE_SB_CreatePipe()
Testing performed
Standard build process, ran SB unit tests.
Expected behavior changes
Improvement in error reporting when using a pipe name that is already in use, or when the queue limit has been reached.
System(s) tested on:
Debian 9
Additional context
Add any other context about the contribution here.
Contributor Info
[email protected]
Community contributors
N/A