public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 0/2] do not pick free/unused port by chance
@ 2014-03-07 11:39 Jan Stancek
  2014-03-07 11:39 ` [LTP] [PATCH 1/2] add tst_get_unused_port() Jan Stancek
  2014-03-07 11:39 ` [LTP] [PATCH 2/2] do not pick free/unused port by chance Jan Stancek
  0 siblings, 2 replies; 7+ messages in thread
From: Jan Stancek @ 2014-03-07 11:39 UTC (permalink / raw)
  To: ltp-list

I'm rarely seeing tests like bind01, connect01, recv01,
recvfrom01, recvmsg01, send01, sendfile0X, sendmsg01
and sendto01 failing. All these are picking ports with
formula: (getpid() % 32768) + 11000, which occasionally
collides with test harness (beah) used in automated environment,
which is running on ports 12432/12434.

This series removes that formula and lets kernel pick random
free unused port instead. If test has no intention of binding
any server on that port, but still needs some unused port number
it can use newly added tst_get_unused_port() function.

Jan Stancek (2):
  add tst_get_unused_port()
  do not pick free/unused port by chance

 include/test.h                                  |    7 ++
 lib/tst_net.c                                   |   81 +++++++++++++++++++++++
 testcases/kernel/syscalls/bind/bind01.c         |    2 +-
 testcases/kernel/syscalls/connect/connect01.c   |   17 +++--
 testcases/kernel/syscalls/recv/recv01.c         |   15 +++--
 testcases/kernel/syscalls/recvfrom/recvfrom01.c |   15 +++--
 testcases/kernel/syscalls/recvmsg/recvmsg01.c   |   12 ++-
 testcases/kernel/syscalls/send/send01.c         |   15 +++--
 testcases/kernel/syscalls/sendfile/sendfile02.c |    6 ++-
 testcases/kernel/syscalls/sendfile/sendfile04.c |    6 ++-
 testcases/kernel/syscalls/sendfile/sendfile05.c |    6 ++-
 testcases/kernel/syscalls/sendfile/sendfile06.c |    6 ++-
 testcases/kernel/syscalls/sendmsg/sendmsg01.c   |   17 +++--
 testcases/kernel/syscalls/sendto/sendto01.c     |   15 +++--
 14 files changed, 173 insertions(+), 47 deletions(-)
 create mode 100644 lib/tst_net.c


------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2014-03-11 15:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-07 11:39 [LTP] [PATCH 0/2] do not pick free/unused port by chance Jan Stancek
2014-03-07 11:39 ` [LTP] [PATCH 1/2] add tst_get_unused_port() Jan Stancek
2014-03-09 23:40   ` Mike Frysinger
2014-03-10 14:22   ` [LTP] (no subject) Jan Stancek
2014-03-10 14:28   ` [LTP] [PATCH v2 1/2] add tst_get_unused_port() Jan Stancek
2014-03-11 15:24     ` chrubis
2014-03-07 11:39 ` [LTP] [PATCH 2/2] do not pick free/unused port by chance Jan Stancek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox