netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Machata <petrm@nvidia.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Breno Leitao <leitao@debian.org>, <davem@davemloft.net>,
	<edumazet@google.com>, <pabeni@redhat.com>,
	<liuhangbin@gmail.com>, <petrm@nvidia.com>, <matttbe@kernel.org>,
	Shuah Khan <shuah@kernel.org>, <netdev@vger.kernel.org>,
	Willem de Bruijn <willemb@google.com>, David Wei <dw@davidwei.uk>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:KERNEL SELFTEST FRAMEWORK"
	<linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH net-next v5] net: netconsole: selftests: Create a new netconsole selftest
Date: Wed, 21 Aug 2024 12:48:08 +0200	[thread overview]
Message-ID: <87ikvukv3s.fsf@nvidia.com> (raw)
In-Reply-To: <20240820160636.7bfc4d5a@kernel.org>


Jakub Kicinski <kuba@kernel.org> writes:

> On Mon, 19 Aug 2024 02:03:53 -0700 Breno Leitao wrote:
>> +function check_for_dependencies() {
>> +	if [ "$(id -u)" -ne 0 ]; then
>> +		echo "This test must be run as root" >&2
>> +		exit "${ksft_skip}"
>> +	fi
>> +
>> +	if ! which socat > /dev/null ; then
>> +		echo "SKIP: socat(1) is not available" >&2
>> +		exit "${ksft_skip}"
>> +	fi
>> +
>> +	if ! which ip > /dev/null ; then
>> +		echo "SKIP: ip(1) is not available" >&2
>> +		exit "${ksft_skip}"
>> +	fi
>> +
>> +	if ! which udevadm > /dev/null ; then
>> +		echo "SKIP: udevadm(1) is not available" >&2
>> +		exit "${ksft_skip}"
>> +	fi
>> +
>> +	if [ ! -d "${NETCONS_CONFIGFS}" ]; then
>> +		echo "SKIP: directory ${NETCONS_CONFIGFS} does not exist. Check if NETCONSOLE_DYNAMIC is enabled" >&2
>> +		exit "${ksft_skip}"
>> +	fi
>> +
>> +	if ip link show "${DSTIF}" 2> /dev/null; then
>> +		echo "SKIP: interface ${DSTIF} exists in the system. Not overwriting it." >&2
>> +		exit "${ksft_skip}"
>> +	fi
>
> nit: maybe ip addr list to see if the 192.168.1.x network is already in
> use? 

Or alternatively use 192.0.2.0/24 subnet, that shouldn't be used in the
wild.

      parent reply	other threads:[~2024-08-21 10:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-19  9:03 [PATCH net-next v5] net: netconsole: selftests: Create a new netconsole selftest Breno Leitao
2024-08-20 23:06 ` Jakub Kicinski
2024-08-21  7:58   ` Breno Leitao
2024-08-21 10:48   ` Petr Machata [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=87ikvukv3s.fsf@nvidia.com \
    --to=petrm@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=dw@davidwei.uk \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=liuhangbin@gmail.com \
    --cc=matttbe@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    --cc=willemb@google.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;
as well as URLs for NNTP newsgroup(s).