* [LTP] [PATCH] added vmcp testcase
@ 2019-03-07 13:42 Elif Aslan
2019-03-27 16:34 ` Cyril Hrubis
0 siblings, 1 reply; 2+ messages in thread
From: Elif Aslan @ 2019-03-07 13:42 UTC (permalink / raw)
To: ltp
---
runtest/s390x_tests | 2 ++
testcases/commands/vmcp/vmcp_m.sh | 51 +++++++++++++++++++++++++++++++
2 files changed, 53 insertions(+)
create mode 100644 runtest/s390x_tests
create mode 100644 testcases/commands/vmcp/vmcp_m.sh
diff --git a/runtest/s390x_tests b/runtest/s390x_tests
new file mode 100644
index 000000000..0c2bf05a5
--- /dev/null
+++ b/runtest/s390x_tests
@@ -0,0 +1,2 @@
+# Those tests are designed to be executed in s390x environment (zVM or LPAR)
+vmcp vmcp_m.sh
diff --git a/testcases/commands/vmcp/vmcp_m.sh b/testcases/commands/vmcp/vmcp_m.sh
new file mode 100644
index 000000000..6702094e8
--- /dev/null
+++ b/testcases/commands/vmcp/vmcp_m.sh
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# vmcp tool and module test
+#
+# The tool allows Linux users to send commands to the z/VM control program (CP).
+# The normal usage is to invoke vmcp with the command you want to execute.
+#
+# The test case contains one shell script:
+#
+# vmcp_m.sh: basically executes the vmcp tool with different parameters and verifies that
+# output and exitcodes are as expected
+#
+
+#!/bin/sh
+
+TST_CNT=2
+TST_TESTFUNC=vmcp_main
+TST_NEEDS_CMDS="vmcp"
+. tst_test.sh
+
+vmcp_run()
+{
+
+ $2
+ if [ $? -eq $1 ]; then
+ tst_res TPASS "'$2' returned '$1'"
+ else
+ tst_res TFAIL "'$2' did not return '$1'"
+ fi
+}
+
+vmcp_main1()
+{
+ tst_res TINFO "Verify basic VMCP commands"
+ vmcp_run 0 "vmcp --version";
+ vmcp_run 0 "vmcp --help";
+ vmcp_run 0 "vmcp -v";
+ vmcp_run 0 "vmcp -h";
+ vmcp_run 0 "vmcp q dasd";
+}
+
+vmcp_main2()
+{
+ tst_res TINFO "Verify error conditions"
+ vmcp_run 4 "vmcp -L"
+ vmcp_run 4 "vmcp -m q dasd"
+ vmcp_run 1 "vmcp dasddasddasd"
+}
+
+
+tst_run
--
2.17.2 (Apple Git-113)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [LTP] [PATCH] added vmcp testcase
2019-03-07 13:42 [LTP] [PATCH] added vmcp testcase Elif Aslan
@ 2019-03-27 16:34 ` Cyril Hrubis
0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2019-03-27 16:34 UTC (permalink / raw)
To: ltp
Hi!
Applied, thanks.
I do suppose that more in-depth tests would follow i.e. running diffent
queries and checking that the actual output looks sane, etc.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-27 16:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-07 13:42 [LTP] [PATCH] added vmcp testcase Elif Aslan
2019-03-27 16:34 ` Cyril Hrubis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.