Subject: Re: [RFC PATCH net-next] selftests: forwarding: add a test for MAC Merge layer

From: Petr Machata <[email-masked]>
Date: Mon, 13 Feb 2023 11:51:37 +0100

Vladimir Oltean <[email-masked]> writes:

> +# Borrowed from mlxsw/qos_lib.sh, message adapted.
> +bail_on_lldpad()
> +{
> +	if systemctl is-active --quiet lldpad; then
> +		cat >/dev/stderr <<-EOF
> +		WARNING: lldpad is running
> +
> +			lldpad will likely autoconfigure the MAC Merge layer,
> +			while this test will configure it manually. One of them
> +			is arbitrarily going to overwrite the other. That will
> +			cause spurious failures (or, unlikely, passes) of this
> +			test.
> +		EOF
> +		exit 1
> +	fi
> +}

This would be good to have unified. Can you make the function reusable,
with a generic or parametrized message? I should be able to carve a bit
of time later to move it to lib.sh, migrate the mlxsw selftests, and
drop the qos_lib.sh copy.