All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiao Yang <yangx.jy@cn.fujitsu.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/3] net/tcp_fastopen_run.sh: Cleanup in TST_PARSE_ARGS functions for legacy API
Date: Mon, 7 May 2018 15:18:54 +0800	[thread overview]
Message-ID: <5AEFFDDE.1080706@cn.fujitsu.com> (raw)
In-Reply-To: <20180507064444.vft5titc7uur4nvk@dell5510>

On 2018/05/07 14:44, Petr Vorel wrote:
> Hi,
>
>> 1) Process getopts parameters by TST_OPTS and TST_PARSE_ARGS
>> 2) Pass $OPTARG as $2 to TST_PARSE_ARGS functions
>> Signed-off-by: Xiao Yang<yangx.jy@cn.fujitsu.com>
>> ---
>>   testcases/network/tcp_fastopen/tcp_fastopen_run.sh | 16 +++++++++-------
>>   1 file changed, 9 insertions(+), 7 deletions(-)
>> diff --git a/testcases/network/tcp_fastopen/tcp_fastopen_run.sh b/testcases/network/tcp_fastopen/tcp_fastopen_run.sh
>> index 5cc9804..865b3d4 100755
>> --- a/testcases/network/tcp_fastopen/tcp_fastopen_run.sh
>> +++ b/testcases/network/tcp_fastopen/tcp_fastopen_run.sh
>> @@ -20,8 +20,9 @@
>>   TST_NETLOAD_MAX_SRV_REPLIES=3
>> -while getopts :hr:n:R:6 opt; do
>> -	case "$opt" in
>> +tcp_fastopen_parse_args()
>> +{
>> +	case "$1" in
>>   	h)
>>   		echo "Usage:"
>>   		echo "h        help"
>> @@ -29,17 +30,18 @@ while getopts :hr:n:R:6 opt; do
>>   		echo "6        run over IPv6"
>>   		exit 0
>>   	;;
>> -	R) TST_NETLOAD_MAX_SRV_REPLIES=$OPTARG ;;
>> -	6) TST_IPV6=6 ;;
>> -	*) tst_brkm TBROK "unknown option: $opt" ;;
>> +	R) TST_NETLOAD_MAX_SRV_REPLIES=$2 ;;
>> +	*) tst_brkm TBROK "unknown option: $1" ;;
>>   	esac
>> -done
>> -shift $(($OPTIND - 1))
>> +}
>>   TST_TOTAL=1
>>   TCID="tcp_fastopen"
>>   TST_NEEDS_TMPDIR=1
>> +TST_OPTS=":hr:n:R:"
>> +TST_PARSE_ARGS=tcp_fastopen_parse_args
>> +
>>   TST_USE_LEGACY_API=1
>>   . tst_net.sh
> Acked-by: Petr Vorel<pvorel@suse.cz>
>
> NOTE: I propose to merge this patch-set after release (as it's not a bugfix, we should respect git freeze).
Hi Petr,

Agreed, we could megre it after release. :-)

Thanks,
Xiao Yang
>
> Kind regards,
> Petr
>
>
> .
>




  reply	other threads:[~2018-05-07  7:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-07  3:24 [LTP] [PATCH 1/3] lib/tst_net.sh: Append 6 to the end of $TST_OPTS Xiao Yang
2018-05-07  3:24 ` [LTP] [PATCH 2/3] net/tcp_fastopen_run.sh: Cleanup in TST_PARSE_ARGS functions for legacy API Xiao Yang
2018-05-07  6:44   ` Petr Vorel
2018-05-07  7:18     ` Xiao Yang [this message]
2018-05-23  7:48   ` Petr Vorel
2018-05-07  3:24 ` [LTP] [PATCH 3/3] net/nfs_lib.sh: Cleanup " Xiao Yang
2018-05-07  7:18   ` Petr Vorel
2018-05-07 19:35   ` Petr Vorel
2018-05-23  8:12   ` Petr Vorel
2018-05-07  6:43 ` [LTP] [PATCH 1/3] lib/tst_net.sh: Append 6 to the end of $TST_OPTS Petr Vorel
2018-05-07  7:30   ` Xiao Yang
2018-05-07  8:09     ` Petr Vorel
2018-05-07 10:31       ` Alexey Kodanev
2018-05-07 10:53         ` 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=5AEFFDDE.1080706@cn.fujitsu.com \
    --to=yangx.jy@cn.fujitsu.com \
    --cc=ltp@lists.linux.it \
    /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.