From: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
linux-renesas-soc@vger.kernel.org
Cc: Kieran Bingham <kieran.bingham@ideasonboard.com>
Subject: [PATCH 2/3] tests: Skip unbind/bind tests when not root
Date: Fri, 18 Sep 2020 21:26:15 +0100 [thread overview]
Message-ID: <20200918202616.55977-3-kieran.bingham@ideasonboard.com> (raw)
In-Reply-To: <20200918202616.55977-1-kieran.bingham@ideasonboard.com>
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
+ return
+ fi
+
# Unbind and rebind VSPs individually
for v in $vsps; do
unbind_vsp $v
--
2.25.1
next prev parent reply other threads:[~2020-09-18 20:26 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 ` Kieran Bingham [this message]
2020-09-18 20:45 ` [PATCH 2/3] tests: Skip unbind/bind tests when not root Kieran Bingham
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=20200918202616.55977-3-kieran.bingham@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).