From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@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:13:36 +0100 [thread overview]
Message-ID: <YhOQAEHFCeMkrYsE@pevik> (raw)
In-Reply-To: <YhOONDJPpHcX4bZW@yuki>
Hi Cyril,
> Hi!
> Uff, I did found the root cause after debugging for a while.
Thanks a lot!
> 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"
Yes, this looks like enough. Do you want me to merge this proposal with added
this change? Or you send a patch or just merge fix yourself?
> 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...
I'd say specifically tst_netload() (in tst_net.sh) and netstress.c deserve
cleanup. Also, as we noticed several times shell tests tends to be buggy,
specially in combination with C tests. But not sure if feasible to write
everything in C.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-02-21 13:13 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 ` [LTP] [RFC??[DO_NOT_MERGE][PATCH " Cyril Hrubis
2022-02-21 13:13 ` Petr Vorel [this message]
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=YhOQAEHFCeMkrYsE@pevik \
--to=pvorel@suse.cz \
--cc=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=martin.doucha@suse.com \
/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 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.