-
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
libc: add passing custom parameter to unix-socket test #378
Conversation
maybe it would be better to pass custom timeout param as a commandline param if possible (that way we will be able to provide custom values for any particular target requiring it?) |
371e861
to
887953c
Compare
887953c
to
32b45b7
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.
some nitpicks, also 👍 for writing short/simple commit message titles
libc/socket/unix-socket.c
Outdated
if (argc == 2) { | ||
pollTimeoutDiff = atoi(argv[1]); | ||
} | ||
|
||
/* Assume /tmp dir is missing */ |
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.
is this comment valid? the code looks like we assume initially that it's not missing? Also fix check if (isMissing)
to be MISRA-compliant (or use bool
)
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.
The suggestion hasn't been fully taken into account. Still the comment seems to be wrong. I'd remove the comment and rename the variable name to make readable what is happening in here (createTmpIfMissing
doesn't check the arg, it check's whether dir exists anyway and then sets the value).
e5f5080
to
ddbba9b
Compare
ddbba9b
to
fa0f338
Compare
fa0f338
to
e5a3e81
Compare
8790843
to
12e5c5e
Compare
*/ | ||
for (int i = 1; i < argc; i++) { | ||
if (strcmp(argv[i], "--extra-poll-delay-ms") == 0) { | ||
pollTimeoutDelay = atoi(argv[i + 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.
Should pollTimeoutDelay
ever be allowed to have negative value? If not, maybe it'd be good to have a simple argument value validation here?
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.
It is passed directly in test.yaml, but I can add it.
bae5e5a
to
7128227
Compare
7128227
to
c18bc5f
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.
Please look at the latest comments and then we can merge it :)
libc/socket/unix-socket.c
Outdated
/* Assume /tmp dir is missing */ | ||
int isMissing = 0; |
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.
/* Assume /tmp dir is missing */ | |
int isMissing = 0; | |
bool wasTmpMissing = false; |
Please see the comment above.
libc/socket/unix-socket.c
Outdated
if (argc == 2) { | ||
pollTimeoutDiff = atoi(argv[1]); | ||
} | ||
|
||
/* Assume /tmp dir is missing */ |
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.
The suggestion hasn't been fully taken into account. Still the comment seems to be wrong. I'd remove the comment and rename the variable name to make readable what is happening in here (createTmpIfMissing
doesn't check the arg, it check's whether dir exists anyway and then sets the value).
Add passing custom parameter to unix-socket test on armv7a9-zynq7000-qemu since blocking interval significantly overruns timeout due to host system scheduling delays JIRA: CI-501
c18bc5f
to
cca6f20
Compare
…et test
JIRA: CI-501
Description
Motivation and Context
Types of changes
How Has This Been Tested?
Checklist:
Special treatment