linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH 2/3] tests: Skip unbind/bind tests when not root
Date: Fri, 18 Sep 2020 21:45:27 +0100	[thread overview]
Message-ID: <4c0e1641-088b-02cb-292d-c67cfbb1fd9c@ideasonboard.com> (raw)
In-Reply-To: <20200918202616.55977-3-kieran.bingham@ideasonboard.com>

Hi Kieran

On 18/09/2020 21:26, Kieran Bingham wrote:
> The user must be root to be able to perform the unbind/bind cycle.
> Skip this test when the user does not have root privilidges.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> ---
>  tests/vsp-unit-test-0026.sh | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/tests/vsp-unit-test-0026.sh b/tests/vsp-unit-test-0026.sh
> index 0e013cec881b..88038f3fdebf 100755
> --- a/tests/vsp-unit-test-0026.sh
> +++ b/tests/vsp-unit-test-0026.sh
> @@ -41,6 +41,12 @@ test_copy() {
>  test_main() {
>  	local format
>  
> +	if [ ! "$(id -u)" = 0 ] ; then
> +		# Root is required to run unbind tests
> +		test_complete skip

Ugh, this is a bit annoying as it generates a warning on the output
actually, as we haven't yet called test_start.

We could do a test_start "Rebinding VSPs", and then it will either skip
or pass. But any failures would be in the kernel logs...

> +		return
> +	fi
> +
>  	# Unbind and rebind VSPs individually
>  	for v in $vsps; do
>  		unbind_vsp $v
> 

-- 
Regards
--
Kieran

  reply	other threads:[~2020-09-18 20:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18 20:26 [PATCH 0/3] VSP-Tests: unbind: Kieran Bingham
2020-09-18 20:26 ` [PATCH 1/3] scripts: vsp-lib.sh: Remove unused variable Kieran Bingham
2020-09-18 20:26 ` [PATCH 2/3] tests: Skip unbind/bind tests when not root Kieran Bingham
2020-09-18 20:45   ` Kieran Bingham [this message]
2020-09-18 20:52   ` [PATCH v2] " Kieran Bingham
2020-09-18 20:26 ` [PATCH 3/3] tests: unbind/bind: Only test non display VSPs Kieran Bingham
2020-09-19  8:38   ` Sergei Shtylyov

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=4c0e1641-088b-02cb-292d-c67cfbb1fd9c@ideasonboard.com \
    --to=kieran.bingham@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    /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).