From: Jan Stancek <jstancek@redhat.com>
To: ltp-list@lists.sourceforge.net
Subject: [LTP] [PATCH 0/2] do not pick free/unused port by chance
Date: Fri, 7 Mar 2014 12:39:23 +0100 [thread overview]
Message-ID: <cover.1394190599.git.jstancek@redhat.com> (raw)
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
next reply other threads:[~2014-03-07 11:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-07 11:39 Jan Stancek [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1394190599.git.jstancek@redhat.com \
--to=jstancek@redhat.com \
--cc=ltp-list@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox