All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v1] openposix/fork/7-1.c: A bug fix
@ 2020-12-11  9:44 Bogdan Lezhepekov
  2020-12-11  9:54 ` Cyril Hrubis
  0 siblings, 1 reply; 8+ messages in thread
From: Bogdan Lezhepekov @ 2020-12-11  9:44 UTC (permalink / raw)
  To: ltp

The function output interferes with the variable errno, that leads to
the false positive result on limited test setups. The issue fixed.

Signed-off-by: Bogdan Lezhepekov <bogdan.lezhepekov@suse.com>
---
 .../open_posix_testsuite/conformance/interfaces/fork/7-1.c    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c
index c3db90c00..4249d713d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c
@@ -53,12 +53,14 @@ static void read_catalog(nl_catd cat, char *who)
 {
 	char *msg = NULL;
 	int i, j;
-	errno = 0;
 
 #if VERBOSE > 0
 	output("Reading the message catalog from %s...\n", who);
 #endif
 
+	/* the output function interferes with errno */ 
+	errno = 0;
+
 	for (i = 1; i <= 2; i++) {
 		for (j = 1; j <= 2; j++) {
 
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [LTP] [PATCH v1] openposix/fork/7-1.c: A bug fix
@ 2020-12-10 16:51 Bogdan Lezhepekov
  0 siblings, 0 replies; 8+ messages in thread
From: Bogdan Lezhepekov @ 2020-12-10 16:51 UTC (permalink / raw)
  To: ltp

The function output interferes with the variable errno, that leads to
the false positive result on limited test setups. The issue fixed.

Signed-off-by: Bogdan Lezhepekov <bogdan.lezhepekov@suse.com>
---
 .../open_posix_testsuite/conformance/interfaces/fork/7-1.c    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c
index c3db90c00..4249d713d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c
@@ -53,12 +53,14 @@ static void read_catalog(nl_catd cat, char *who)
 {
 	char *msg = NULL;
 	int i, j;
-	errno = 0;
 
 #if VERBOSE > 0
 	output("Reading the message catalog from %s...\n", who);
 #endif
 
+	/* the output function interferes with errno */ 
+	errno = 0;
+
 	for (i = 1; i <= 2; i++) {
 		for (j = 1; j <= 2; j++) {
 
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-12-11 11:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-11  9:44 [LTP] [PATCH v1] openposix/fork/7-1.c: A bug fix Bogdan Lezhepekov
2020-12-11  9:54 ` Cyril Hrubis
2020-12-11 10:04   ` Bogdan Lezhepekov
2020-12-11 10:22     ` Bogdan Lezhepekov
2020-12-11 11:26       ` Cyril Hrubis
2020-12-11 10:53     ` Cyril Hrubis
2020-12-11 11:27     ` Cyril Hrubis
  -- strict thread matches above, loose matches on Subject: below --
2020-12-10 16:51 Bogdan Lezhepekov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.