added vmcp test
PATCH 1/1 added vmcp test
--- runtest/s390x_tests | 2 ++ testcases/commands/vmcp/README.md | 29 ++++++++++++++++++ testcases/commands/vmcp/vmcp_m.sh | 49 +++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 runtest/s390x_tests create mode 100644 testcases/commands/vmcp/README.md create mode 100644 testcases/commands/vmcp/vmcp_m.sh
runtest/s390x_tests new file +2 -0
@@ -0,0 +1,2 @@ +# Those tests are designed to be executed in s390x environment (zVM or LPAR) +vmcp vmcp_m.sh
testcases/commands/vmcp/README.md new file +29 -0
@@ -0,0 +1,29 @@ +# 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. + +## Getting Started + +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* + +## Prerequisites + +z/VM guest must be prepared to be populated with guest Linux OS. + +## Running the tests manually + +Transfer the scripts to the target system and run: + +./vmcp_m.sh + +## Versioning + +Tested already on SLES 12 SP3 + +## License + +The files in this directory are licensed under the GPL v2+ license.
testcases/commands/vmcp/vmcp_m.sh new file +49 -0
49 lines not on this page · raw message
Signature · 1 line
2.17.2 (Apple Git-113)
PATCH 1/1 added vmcp test
Hi!
Quoted 24 lines
runtest/s390x_tests | 2 ++ testcases/commands/vmcp/README.md | 29 ++++++++++++++++++ testcases/commands/vmcp/vmcp_m.sh | 49 +++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 runtest/s390x_tests create mode 100644 testcases/commands/vmcp/README.md create mode 100644 testcases/commands/vmcp/vmcp_m.shruntest/s390x_tests new file +2
-0@@ -0,0 +1,2 @@ +# Those tests are designed to be executed in s390x environment (zVM or LPAR) +vmcp vmcp_m.shtestcases/commands/vmcp/README.md new file +2
-0@@ -0,0 +1,29 @@ +# vmcp tool and module test +
testcases/commands/vmcp/README.md line 12
Quoted 10 lines
testcases/commands/vmcp/README.md new file +10
-0+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. + +## Getting Started + +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* +
This description should rather be part of the top level comment in the test. Nearly all LTP tests have description as a part of the test which means that having it anywhere else would only confuse the users.
Quoted 7 lines
testcases/commands/vmcp/README.md new file +7
-0+## Prerequisites + +z/VM guest must be prepared to be populated with guest Linux OS. + +## Running the tests manually + +Transfer the scripts to the target system and run:
testcases/commands/vmcp/README.md line 29
Quoted 10 lines
testcases/commands/vmcp/README.md new file +10
-0+ +./vmcp_m.sh + +## Versioning + +Tested already on SLES 12 SP3 + +## License + +The files in this directory are licensed under the GPL v2+ license.
This information is mostly rendundant and useless.
testcases/commands/vmcp/vmcp_m.sh line 7
Quoted 13 lines
testcases/commands/vmcp/vmcp_m.sh new file +7
-0@@ -0,0 +1,49 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +#!/bin/sh + +TST_CNT=2 +TST_TESTFUNC=vmcp_main +TST_USAGE=usage
This is still missing TST_NEEDS_CMDS=vmcp
testcases/commands/vmcp/vmcp_m.sh line 17
Quoted 10 lines
testcases/commands/vmcp/vmcp_m.sh new file +10
-0+. tst_test.sh + +usage() +{ +cat << EOF +usage: $0 + +OPTIONS +EOF +}
Do we really need a help that just prints the script name? I doubt so.
testcases/commands/vmcp/vmcp_m.sh line 27
Quoted 9 lines
testcases/commands/vmcp/vmcp_m.sh new file +9
-0+vmcp_run() +{ + + $2 + if [ $? -eq $1 ]; then + tst_res TPASS "'$2' returned '$1'" + else + tst_res TFAIL "'$2' did not return '$1'" + fi
Missing indentation inside of the if blocks.
testcases/commands/vmcp/vmcp_m.sh line 32
Quoted 5 lines
testcases/commands/vmcp/vmcp_m.sh new file +5
-0+} + +vmcp_main1() +{ + echo "verifyBasicVMCPCommands"
No echo in tests. Use tst_res TINFO. Also the message should be a sentence, this is not a test indentifier but message that appears in the logs.
testcases/commands/vmcp/vmcp_m.sh line 42
Quoted 10 lines
testcases/commands/vmcp/vmcp_m.sh new file +10
-0+ 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() +{ + echo "verifyErrorCondition"
Here as well.
Quoted 13 lines
testcases/commands/vmcp/vmcp_m.sh new file +7
-0+ vmcp_run 4 "vmcp -L" + vmcp_run 4 "vmcp -m q dasd" + vmcp_run 1 "vmcp dasddasddasd" +} + + +tst_runSignature · 5 lines
2.17.2 (Apple Git-113) -- Mailing list info: https://lists.linux.it/listinfo/ltp
Signature · 2 lines
Cyril Hrubis [email protected]