-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add additional tests for file stream and Unix sockets functionality #369
base: master
Are you sure you want to change the base?
Conversation
Unit Test Results7 919 tests +132 7 073 ✅ + 4 41m 7s ⏱️ - 1m 40s For more details on these failures, see this check. Results for commit 9de5d91. ± Comparison against base commit 7e3f9f2. This pull request removes 15 and adds 147 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
1469559
to
270a415
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor comments.
Please tick appropriate ticks and use a meaningful name for the PR.
TEST_ASSERT_EQUAL_INT(strlen(teststr), fread(buf, 1, sizeof(buf), filep)); | ||
TEST_ASSERT_EQUAL_INT(1, feof(filep)); | ||
TEST_ASSERT_EQUAL_INT(-1, fseek(filep, SEEK_CUR, 10)); | ||
TEST_ASSERT_EQUAL_INT(1, feof(filep)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also check if F_ERROR
is set after fseek()
fails with a read or write error? (In this test case or another.)
TEST_ASSERT_EQUAL_INT(0, err); | ||
|
||
errno = 0; | ||
n = fread(buf, 1, 3, filep); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also test fread()
with size == 0
or count == 0
?
TEST_ASSERT_EQUAL_INT(0, err); | ||
|
||
errno = 0; | ||
n = fwrite("1234567", 1, 7, filep[1]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also test fwrite()
with size == 0
or count == 0
?
errno = 0; | ||
err = fflush(filep[1]); | ||
TEST_ASSERT_EQUAL_INT(-1, err); | ||
TEST_ASSERT_EQUAL_INT(EAGAIN, errno); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also check F_ERROR
after fflush()
fails?
270a415
to
da35cbf
Compare
JIRA: RTOS-892
JIRA: RTOS-892
da35cbf
to
9de5d91
Compare
Description
Motivation and Context
Types of changes
How Has This Been Tested?
Checklist:
Special treatment
phoenix-rtos/phoenix-rtos-kernel#579
phoenix-rtos/libphoenix#376