All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] net/host: update to new api
Date: Tue, 17 Nov 2020 12:30:41 +0100	[thread overview]
Message-ID: <20201117113041.GA43177@pevik> (raw)
In-Reply-To: <80a391bf-b305-13ab-df79-169c8d4a0a28@oracle.com>

Hi Alexey,

> > do_test()
> > {
> > 	local rhost=${RHOST:-$(hostname)}

> Hi Petr, Kory

> For new API we shouldn't use RHOST. Also the naming is misleading,
> it can be a local host name.

Thanks for catching it. Suppose this version is ok.

Kind regards,
Petr

TST_TESTFUNC="do_test"
TST_NEEDS_CMDS="awk host hostname"

. tst_net.sh

do_test()
{
	local lhost="$(hostname)"
	local addr

	tst_res TINFO "test basic functionality of the host command"

	if addr=$(host $lhost); then
		addr=$(echo "$addr" | awk '{print $NF}')
		EXPECT_PASS host $addr \>/dev/null
	else
		tst_brk TFAIL "host $lhost on local machine failed"
	fi
}

tst_run

      reply	other threads:[~2020-11-17 11:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16 10:18 [LTP] [PATCH] net/host: update to new api Kory Maincent
2020-11-16 18:41 ` Petr Vorel
2020-11-16 18:48   ` Petr Vorel
2020-11-17  8:33     ` =?unknown-8bit?q?K=C3=B6ry?= Maincent
2020-11-17  9:39   ` Alexey Kodanev
2020-11-17 11:30     ` Petr Vorel [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=20201117113041.GA43177@pevik \
    --to=pvorel@suse.cz \
    --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.