All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] setsockopt10: Fix running with more iterations
@ 2026-07-20 21:36 Petr Vorel
  2026-07-20 22:02 ` [LTP] " linuxtestproject.agent
  2026-07-21 12:44 ` [LTP] [PATCH 1/1] " Andrea Cervesato via ltp
  0 siblings, 2 replies; 3+ messages in thread
From: Petr Vorel @ 2026-07-20 21:36 UTC (permalink / raw)
  To: ltp

Do proper cleanup SAFE_CLOSE(tcp1_sk) before return to fix test when
running with more iterations:

    # ./setsockopt10  -i1022
    ...
    setsockopt10.c:165: TPASS: parent: tls disallows disconnect: EOPNOTSUPP (95)
    setsockopt10.c:116: TINFO: child: connect for tcp2 connection
    setsockopt10.c:120: TINFO: child: could not connect to tcp1: ECONNREFUSED (111)
    setsockopt10.c:134: TBROK: socket(2, 1, 0) failed: EMFILE (24)

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/kernel/syscalls/setsockopt/setsockopt10.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/testcases/kernel/syscalls/setsockopt/setsockopt10.c b/testcases/kernel/syscalls/setsockopt/setsockopt10.c
index 76c977d2eb..b12f7bf166 100644
--- a/testcases/kernel/syscalls/setsockopt/setsockopt10.c
+++ b/testcases/kernel/syscalls/setsockopt/setsockopt10.c
@@ -167,6 +167,7 @@ static void run(void)
 			tst_res(TFAIL | TTERRNO, "parent: unexpected errno from connect");
 		TST_CHECKPOINT_WAKE(2);
 		tst_reap_children();
+		SAFE_CLOSE(tcp1_sk);
 		return;
 	}
 
@@ -183,6 +184,7 @@ static void run(void)
 
 		TST_CHECKPOINT_WAKE(2);
 		tst_reap_children();
+		SAFE_CLOSE(tcp1_sk);
 		return;
 	}
 
-- 
2.55.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] setsockopt10: Fix running with more iterations
  2026-07-20 21:36 [LTP] [PATCH 1/1] setsockopt10: Fix running with more iterations Petr Vorel
@ 2026-07-20 22:02 ` linuxtestproject.agent
  2026-07-21 12:44 ` [LTP] [PATCH 1/1] " Andrea Cervesato via ltp
  1 sibling, 0 replies; 3+ messages in thread
From: linuxtestproject.agent @ 2026-07-20 22:02 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

Hi Petr,

On Mon, Jul 20 23:36:10 2026 +0200, Petr Vorel wrote:
> setsockopt10: Fix running with more iterations

Verdict - Reviewed

---
Note:

The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/1] setsockopt10: Fix running with more iterations
  2026-07-20 21:36 [LTP] [PATCH 1/1] setsockopt10: Fix running with more iterations Petr Vorel
  2026-07-20 22:02 ` [LTP] " linuxtestproject.agent
@ 2026-07-21 12:44 ` Andrea Cervesato via ltp
  1 sibling, 0 replies; 3+ messages in thread
From: Andrea Cervesato via ltp @ 2026-07-21 12:44 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>

--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

end of thread, other threads:[~2026-07-21 12:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-20 21:36 [LTP] [PATCH 1/1] setsockopt10: Fix running with more iterations Petr Vorel
2026-07-20 22:02 ` [LTP] " linuxtestproject.agent
2026-07-21 12:44 ` [LTP] [PATCH 1/1] " Andrea Cervesato via ltp

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.