From: chrubis@suse.cz
To: Alexey Kodanev <alexey.kodanev@oracle.com>
Cc: vasily.isaenko@oracle.com, ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH 2/2] network/stress/broken_ip: move common code to library
Date: Tue, 9 Sep 2014 14:17:01 +0200 [thread overview]
Message-ID: <20140909121701.GA3891@rei> (raw)
In-Reply-To: <1406553022-3436-2-git-send-email-alexey.kodanev@oracle.com>
Hi!
> +tst_set_ipv4_addr()
> +{
> + # Initialize test interfaces
> + # The number of the test link where tests run
> + LINK_NUM=${LINK_NUM:-0}
> +
> + initialize_if lhost ${LINK_NUM}
> + initialize_if rhost ${LINK_NUM}
> +
> + # Netmask of the IPv4 network
> + network_mask=24
> +
> + tst_resm TINFO "set remote ipv4 addr '$IPV4_NETWORK $RHOST_IPV4_HOST'"
> + # Set IPv4 addresses to the interfaces
> + set_ipv4addr rhost $LINK_NUM $IPV4_NETWORK $RHOST_IPV4_HOST
> + if [ $? -ne 0 ]; then
> + tst_brkm TBROK "Failed to add any IP address at the remote host"
> + fi
> +
> + tst_resm TINFO "set local ipv4 addr '$IPV4_NETWORK $LHOST_IPV4_HOST'"
> + set_ipv4addr lhost $LINK_NUM $IPV4_NETWORK $LHOST_IPV4_HOST
> + if [ $? -ne 0 ]; then
> + tst_brkm TBROK "Failed to add any IP address at the local host"
> + fi
> +}
I would love to get the code from initialize_if and set_ipv4addr to be
cleaned and moved here to the test_net.sh but that would require
changing all the stress testcases first.
The changes looks good to me, acked.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
prev parent reply other threads:[~2014-09-09 12:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-28 13:10 [LTP] [PATCH 1/2] network: uniform network parameters Alexey Kodanev
2014-07-28 13:10 ` [LTP] [PATCH 2/2] network/stress/broken_ip: move common code to library Alexey Kodanev
2014-09-09 12:17 ` chrubis [this message]
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=20140909121701.GA3891@rei \
--to=chrubis@suse.cz \
--cc=alexey.kodanev@oracle.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=vasily.isaenko@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox