* [PATCH] btrfs-progs: tests, use non-interactive sudo helper
@ 2015-01-19 18:11 David Sterba
2015-01-20 0:24 ` Qu Wenruo
0 siblings, 1 reply; 2+ messages in thread
From: David Sterba @ 2015-01-19 18:11 UTC (permalink / raw)
To: linux-btrfs; +Cc: quwenruo, David Sterba
Sudo may not be configured to run without user prompt, in that case the
tests would be stuck.
Reported-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
---
tests/common | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/common b/tests/common
index 84a4b9d335e2..d7d2e9bef050 100644
--- a/tests/common
+++ b/tests/common
@@ -58,7 +58,7 @@ export have_root_helper
setup_root_helper()
{
if [ $UID != 0 ]; then
- sudo=sudo
+ sudo="sudo --non-interactive"
fi
have_root_helper=1
}
--
2.1.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs-progs: tests, use non-interactive sudo helper
2015-01-19 18:11 [PATCH] btrfs-progs: tests, use non-interactive sudo helper David Sterba
@ 2015-01-20 0:24 ` Qu Wenruo
0 siblings, 0 replies; 2+ messages in thread
From: Qu Wenruo @ 2015-01-20 0:24 UTC (permalink / raw)
To: David Sterba, linux-btrfs
-------- Original Message --------
Subject: [PATCH] btrfs-progs: tests, use non-interactive sudo helper
From: David Sterba <dsterba@suse.cz>
To: <linux-btrfs@vger.kernel.org>
Date: 2015年01月20日 02:11
> Sudo may not be configured to run without user prompt, in that case the
> tests would be stuck.
>
> Reported-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
> Signed-off-by: David Sterba <dsterba@suse.cz>
> ---
> tests/common | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/common b/tests/common
> index 84a4b9d335e2..d7d2e9bef050 100644
> --- a/tests/common
> +++ b/tests/common
> @@ -58,7 +58,7 @@ export have_root_helper
> setup_root_helper()
> {
> if [ $UID != 0 ]; then
> - sudo=sudo
> + sudo="sudo --non-interactive"
> fi
> have_root_helper=1
> }
Looks good for me.
This seems much better than the original interactive one.
Thanks,
Qu
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-20 0:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-19 18:11 [PATCH] btrfs-progs: tests, use non-interactive sudo helper David Sterba
2015-01-20 0:24 ` Qu Wenruo
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).