* [LTP] [RFC PATCH 1/1] shell: Remove tst_su
@ 2019-03-27 16:31 Petr Vorel
2019-03-27 16:37 ` Cyril Hrubis
0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2019-03-27 16:31 UTC (permalink / raw)
To: ltp
tst_su was added into legacy (but at the time the only) shell API in
commit cd9a41dff ("test.sh: Add tst_su"). It was never used nor added
into new shell API, thus removing.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
doc/test-writing-guidelines.txt | 25 +------------------------
testcases/lib/test.sh | 9 ---------
2 files changed, 1 insertion(+), 33 deletions(-)
diff --git a/doc/test-writing-guidelines.txt b/doc/test-writing-guidelines.txt
index 3b8541e7a..f1912dc12 100644
--- a/doc/test-writing-guidelines.txt
+++ b/doc/test-writing-guidelines.txt
@@ -1470,7 +1470,7 @@ setup(). The function will generate a TCONF if the requested flags are not
fully supported on the running kernel, and TBROK if either a zero mask was
supplied or if the kernel is already tainted before executing the test.
-Then you can call tst_taint_check() during run(), which returns 0 or the
+Then you can call tst_taint_check() during run(), which returns 0 or the
tainted flags set in /proc/sys/kernel/tainted as specified earlier.
Depending on your kernel version, not all tainted-flags will be supported.
@@ -2122,29 +2122,6 @@ is a workaround since there are a daemons dumb enough to probe all newly
mounted filesystems, which prevents them from umounting shortly after they
were mounted.
-Running commands as different user with 'su'
-++++++++++++++++++++++++++++++++++++++++++++
-
-While some distributions retain paths added to +$PATH+ when doing
-+su user -c "command"+ this does not work at least in Debian. If you want to
-run LTP binaries as a different user you must use 'tst_su' instead which sets
-up +$PATH+ and the runs the command.
-
-.Run test child binary as a test user
-[source,sh]
--------------------------------------------------------------------------------
-#!/bin/sh
-TCID=foo01
-. test.sh
-
-tst_su testusr foo01_child
-if [ $? -ne 0 ]; then
- tst_resm TFAIL "foo failed"
-else
- tst_resm TPASS "foo passed"
-fi
--------------------------------------------------------------------------------
-
ROD and ROD_SILENT
++++++++++++++++++
diff --git a/testcases/lib/test.sh b/testcases/lib/test.sh
index 954f2a22a..670248ee5 100644
--- a/testcases/lib/test.sh
+++ b/testcases/lib/test.sh
@@ -368,15 +368,6 @@ tst_module_exists()
tst_brkm TCONF "Failed to find module '$mod_name'"
}
-# Appends LTP path when doing su
-tst_su()
-{
- local usr="$1"
- shift
-
- su "$usr" -c "PATH=\$PATH:$LTPROOT/testcases/bin/ $@"
-}
-
TST_CHECKPOINT_WAIT()
{
ROD tst_checkpoint wait 10000 "$1"
--
2.21.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [LTP] [RFC PATCH 1/1] shell: Remove tst_su
2019-03-27 16:31 [LTP] [RFC PATCH 1/1] shell: Remove tst_su Petr Vorel
@ 2019-03-27 16:37 ` Cyril Hrubis
2019-03-27 16:42 ` Petr Vorel
0 siblings, 1 reply; 3+ messages in thread
From: Cyril Hrubis @ 2019-03-27 16:37 UTC (permalink / raw)
To: ltp
Hi!
Looks like we removed last user of that API in:
commit 0fc9b8624bea8acfdb408bf5ff4916b1453e3daa
Author: Petr Vorel <pvorel@suse.cz>
Date: Thu Sep 27 16:57:20 2018 +0200
Remove admin_tools test
Hence acked.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 3+ messages in thread
* [LTP] [RFC PATCH 1/1] shell: Remove tst_su
2019-03-27 16:37 ` Cyril Hrubis
@ 2019-03-27 16:42 ` Petr Vorel
0 siblings, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2019-03-27 16:42 UTC (permalink / raw)
To: ltp
Hi,
> Hi!
> Looks like we removed last user of that API in:
> commit 0fc9b8624bea8acfdb408bf5ff4916b1453e3daa
> Author: Petr Vorel <pvorel@suse.cz>
> Date: Thu Sep 27 16:57:20 2018 +0200
> Remove admin_tools test
> Hence acked.
Thx! Pushed with adjusted commit message.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-27 16:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-27 16:31 [LTP] [RFC PATCH 1/1] shell: Remove tst_su Petr Vorel
2019-03-27 16:37 ` Cyril Hrubis
2019-03-27 16:42 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox