* [dpdk-dev] [PATCH] app/test: quieten noise while forking
@ 2021-07-26 12:17 John Levon
2021-07-31 17:48 ` Thomas Monjalon
0 siblings, 1 reply; 4+ messages in thread
From: John Levon @ 2021-07-26 12:17 UTC (permalink / raw)
To: dev; +Cc: kkanas, John Levon
When closing file descriptors post-fork, ignore "." and ".."
directory entries.
Signed-off-by: John Levon <john.levon@nutanix.com>
---
app/test/process.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/app/test/process.h b/app/test/process.h
index 0ed91a939e..5b10cf64df 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -90,6 +90,11 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
}
while ((dirent = readdir(dir)) != NULL) {
+
+ if (strcmp(dirent->d_name, ".") == 0 ||
+ strcmp(dirent->d_name, "..") == 0)
+ continue;
+
errno = 0;
fd = strtol(dirent->d_name, &endptr, 10);
if (errno != 0 || endptr[0] != '\0') {
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] app/test: quieten noise while forking
2021-07-26 12:17 [dpdk-dev] [PATCH] app/test: quieten noise while forking John Levon
@ 2021-07-31 17:48 ` Thomas Monjalon
2021-08-01 17:53 ` John Levon
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2021-07-31 17:48 UTC (permalink / raw)
To: John Levon; +Cc: dev, kkanas
26/07/2021 14:17, John Levon:
> When closing file descriptors post-fork, ignore "." and ".."
> directory entries.
>
> Signed-off-by: John Levon <john.levon@nutanix.com>
Please could you add an example of the noise in the commit explanation?
Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH] app/test: quieten noise while forking
2021-07-31 17:48 ` Thomas Monjalon
@ 2021-08-01 17:53 ` John Levon
2021-08-02 11:22 ` Thomas Monjalon
0 siblings, 1 reply; 4+ messages in thread
From: John Levon @ 2021-08-01 17:53 UTC (permalink / raw)
To: dev; +Cc: thomas, kkanas, John Levon
When closing file descriptors post-fork, ignore "." and ".." directory
entries, so the test log doesn't have distracting errors like:
Error converting name fd 0 .:
Error converting name fd 0 ..:
Signed-off-by: John Levon <john.levon@nutanix.com>
---
app/test/process.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/app/test/process.h b/app/test/process.h
index 0ed91a939e..5b10cf64df 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -90,6 +90,11 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
}
while ((dirent = readdir(dir)) != NULL) {
+
+ if (strcmp(dirent->d_name, ".") == 0 ||
+ strcmp(dirent->d_name, "..") == 0)
+ continue;
+
errno = 0;
fd = strtol(dirent->d_name, &endptr, 10);
if (errno != 0 || endptr[0] != '\0') {
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] app/test: quieten noise while forking
2021-08-01 17:53 ` John Levon
@ 2021-08-02 11:22 ` Thomas Monjalon
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2021-08-02 11:22 UTC (permalink / raw)
To: John Levon; +Cc: dev, kkanas
01/08/2021 19:53, John Levon:
> When closing file descriptors post-fork, ignore "." and ".." directory
> entries, so the test log doesn't have distracting errors like:
>
> Error converting name fd 0 .:
> Error converting name fd 0 ..:
>
> Signed-off-by: John Levon <john.levon@nutanix.com>
Applied, thanks.
For info, when sending a new version (in future),
please add a number with the option -v (-v2 in this case).
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-02 11:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-26 12:17 [dpdk-dev] [PATCH] app/test: quieten noise while forking John Levon
2021-07-31 17:48 ` Thomas Monjalon
2021-08-01 17:53 ` John Levon
2021-08-02 11:22 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).