From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: Martin Doucha <martin.doucha@suse.com>, ltp@lists.linux.it
Subject: Re: [LTP] [RFC??[DO_NOT_MERGE][PATCH v2 1/1] netstress: Fix race between SETSID() and exit(0)
Date: Mon, 21 Feb 2022 14:05:56 +0100 [thread overview]
Message-ID: <YhOONDJPpHcX4bZW@yuki> (raw)
In-Reply-To: <20220218164845.11501-1-pvorel@suse.cz>
Hi!
Uff, I did found the root cause after debugging for a while.
The network tests rely a lot on passing data between processes by files
by a local directory and .needs_checkpoints causes the test to run under
a different directory, that is because checkpoints needs a backing file
that is mapped into the process memory. And so after setting
.need_checkpoints the client was storing the file into a different
directory.
This should be a minimal fix:
diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
index 047686dc3..891472c8a 100644
--- a/testcases/lib/tst_net.sh
+++ b/testcases/lib/tst_net.sh
@@ -715,7 +715,7 @@ tst_netload()
fi
s_opts="${cs_opts}${s_opts}-R $s_replies -B $TST_TMPDIR"
- c_opts="${cs_opts}${c_opts}-a $c_num -r $((c_requests / run_cnt)) -d $rfile"
+ c_opts="${cs_opts}${c_opts}-a $c_num -r $((c_requests / run_cnt)) -d $PWD/$rfile"
tst_res_ TINFO "run server 'netstress $s_opts'"
tst_res_ TINFO "run client 'netstress -l $c_opts' $run_cnt times"
However the debugging took longer than I wanted to since the network
tests are such a mess. The server does exit by TBROK (which looks like
it's an expected behavior), only half of the sever log is printed on a
failure, etc. These should really deserve some cleanups...
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-02-21 13:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-18 16:48 [LTP] [RFCŊ[DO_NOT_MERGE][PATCH v2 1/1] netstress: Fix race between SETSID() and exit(0) Petr Vorel
2022-02-18 17:28 ` Petr Vorel
2022-02-21 13:05 ` Cyril Hrubis [this message]
2022-02-21 13:13 ` [LTP] [RFC??[DO_NOT_MERGE][PATCH " Petr Vorel
2022-02-21 13:26 ` Cyril Hrubis
2022-02-21 13:36 ` Petr Vorel
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=YhOONDJPpHcX4bZW@yuki \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=martin.doucha@suse.com \
--cc=pvorel@suse.cz \
/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