All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] adding s390x tests to ltp
@ 2019-02-04 16:13 Elif Aslan
  2019-02-04 23:51 ` Petr Vorel
  2019-02-07 12:52 ` Jan Stancek
  0 siblings, 2 replies; 6+ messages in thread
From: Elif Aslan @ 2019-02-04 16:13 UTC (permalink / raw)
  To: ltp

---
 runtest/s390x_tools                           |  2 +
 testcases/commands/s390x_tools/vmcp/vmcp_m.sh | 58 +++++++++++++++++++
 2 files changed, 60 insertions(+)
 create mode 100644 runtest/s390x_tools
 create mode 100644 testcases/commands/s390x_tools/vmcp/vmcp_m.sh

diff --git a/runtest/s390x_tools b/runtest/s390x_tools
new file mode 100644
index 000000000..c88f0cac4
--- /dev/null
+++ b/runtest/s390x_tools
@@ -0,0 +1,2 @@
+#DESCRIPTION:s390x_tools tests
+vmcp vmcp_m.sh
diff --git a/testcases/commands/s390x_tools/vmcp/vmcp_m.sh b/testcases/commands/s390x_tools/vmcp/vmcp_m.sh
new file mode 100644
index 000000000..d1f7752de
--- /dev/null
+++ b/testcases/commands/s390x_tools/vmcp/vmcp_m.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+#
+# Copyright (C) 2018 IBM Corp.
+# 
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.  This file is offered as-is,
+# without any warranty.
+
+#set -x
+#
+
+TST_CNT=2
+TST_TESTFUNC=vmcp_main
+TST_USAGE=usage
+. tst_test.sh
+
+usage()
+{
+	cat << EOF
+usage: $0 
+
+OPTIONS
+EOF
+}
+
+vmcp_run()
+{
+
+	$2
+	if [ $? -eq $1 ]; then
+		tst_res TPASS "'$2' returned '$1'. Test passed"
+	else
+		tst_res TFAIL "'$2' did not return '$1'. Test failed"
+	fi
+}
+
+vmcp_main1()
+{
+	echo "verifyBasicVMCPCommands"
+	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"
+	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] 6+ messages in thread

* [LTP] [PATCH] adding s390x tests to ltp
  2019-02-04 16:13 [LTP] [PATCH] adding s390x tests to ltp Elif Aslan
@ 2019-02-04 23:51 ` Petr Vorel
  2019-02-07 12:52 ` Jan Stancek
  1 sibling, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2019-02-04 23:51 UTC (permalink / raw)
  To: ltp

Hi Elif,

these tests are just user space tests for vmcp, LTP would not benefit from it.
I guess you should try to contribute test to s390-tools, where vmcp belongs to.

LTP tests are concern about kernel related tests. There are some user space
tests, but these are related to kernel (e.g. insmod, keyctl) or able to trigger
kernel oops (e.g. filesystem related tools).

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [LTP] [PATCH] adding s390x tests to ltp
  2019-02-04 16:13 [LTP] [PATCH] adding s390x tests to ltp Elif Aslan
  2019-02-04 23:51 ` Petr Vorel
@ 2019-02-07 12:52 ` Jan Stancek
  2019-02-07 12:54   ` Cyril Hrubis
  2019-02-18 18:21   ` Petr Vorel
  1 sibling, 2 replies; 6+ messages in thread
From: Jan Stancek @ 2019-02-07 12:52 UTC (permalink / raw)
  To: ltp



----- Original Message -----
> ---
>  runtest/s390x_tools                           |  2 +
>  testcases/commands/s390x_tools/vmcp/vmcp_m.sh | 58 +++++++++++++++++++
>  2 files changed, 60 insertions(+)
>  create mode 100644 runtest/s390x_tools
>  create mode 100644 testcases/commands/s390x_tools/vmcp/vmcp_m.sh
> 
> diff --git a/runtest/s390x_tools b/runtest/s390x_tools
> new file mode 100644
> index 000000000..c88f0cac4
> --- /dev/null
> +++ b/runtest/s390x_tools
> @@ -0,0 +1,2 @@
> +#DESCRIPTION:s390x_tools tests
> +vmcp vmcp_m.sh

Hi,

There is already a runtest/commands, any reason for making new one?

> diff --git a/testcases/commands/s390x_tools/vmcp/vmcp_m.sh
> b/testcases/commands/s390x_tools/vmcp/vmcp_m.sh
> new file mode 100644
> index 000000000..d1f7752de
> --- /dev/null
> +++ b/testcases/commands/s390x_tools/vmcp/vmcp_m.sh
> @@ -0,0 +1,58 @@
> +#!/bin/sh
> +#
> +# Copyright (C) 2018 IBM Corp.
> +#
> +# Copying and distribution of this file, with or without modification,
> +# are permitted in any medium without royalty provided the copyright
> +# notice and this notice are preserved.  This file is offered as-is,
> +# without any warranty.
> +
> +#set -x
> +#
> +
> +TST_CNT=2
> +TST_TESTFUNC=vmcp_main
> +TST_USAGE=usage

Maybe also: TST_NEEDS_CMDS="vmcp" ?
Not sure if all s390x distros have this command installed.

But that should also be sufficient check to run this on any arch,
if command doesn't exist it will TCONF.

Regards,
Jan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [LTP] [PATCH] adding s390x tests to ltp
  2019-02-07 12:52 ` Jan Stancek
@ 2019-02-07 12:54   ` Cyril Hrubis
  2019-02-18 18:21   ` Petr Vorel
  1 sibling, 0 replies; 6+ messages in thread
From: Cyril Hrubis @ 2019-02-07 12:54 UTC (permalink / raw)
  To: ltp

Hi!
> There is already a runtest/commands, any reason for making new one?

If we are going to add more s390x related tests it would make sense to
create a runtest file for them.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [LTP] [PATCH] adding s390x tests to ltp
  2019-02-07 12:52 ` Jan Stancek
  2019-02-07 12:54   ` Cyril Hrubis
@ 2019-02-18 18:21   ` Petr Vorel
  2019-02-18 18:33     ` Jan Stancek
  1 sibling, 1 reply; 6+ messages in thread
From: Petr Vorel @ 2019-02-18 18:21 UTC (permalink / raw)
  To: ltp

Hi Jan, Cyril,

> Maybe also: TST_NEEDS_CMDS="vmcp" ?
> Not sure if all s390x distros have this command installed.

> But that should also be sufficient check to run this on any arch,
> if command doesn't exist it will TCONF.

The reason, why I suggested to move these tests to upstream [1]
is that testing "vmcp --version" or "vmcp --help" does not really depend on
anyhow on SUT. Adding it to upstream into make check (there are none check yet)
would bring 1) earlier catch of potencial bugs as upstream developers can run it
for each commit (CI) and distros during package build.

We had some discussion before about removing some user space packages [2].
Cyril suggested to to keep tests that are working with files (cp/df/ln)
and remove at least unzip and wc.
Doing some real testing (really using vmcp.ko) would make this tests useful to
run on LTP, but current code IMHO does nothing with kernel. Or do I miss
something?

Anyway, it looks like you have no objection about adding it to LTP, so I changed
state of this test New. In that case, I suggest to

remove debugging:
> +#set -x
> +#

use tst_res TINFO instead of echo
+	echo "verifyBasicVMCPCommands"
+	echo "verifyErrorCondition"

Kind regards,
Petr

[1] https://github.com/ibm-s390-tools/s390-tools
[2] https://patchwork.ozlabs.org/patch/905064/#1902070

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [LTP] [PATCH] adding s390x tests to ltp
  2019-02-18 18:21   ` Petr Vorel
@ 2019-02-18 18:33     ` Jan Stancek
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Stancek @ 2019-02-18 18:33 UTC (permalink / raw)
  To: ltp



----- Original Message -----
> Hi Jan, Cyril,
> 
> > Maybe also: TST_NEEDS_CMDS="vmcp" ?
> > Not sure if all s390x distros have this command installed.
> 
> > But that should also be sufficient check to run this on any arch,
> > if command doesn't exist it will TCONF.
> 
> The reason, why I suggested to move these tests to upstream [1]
> is that testing "vmcp --version" or "vmcp --help" does not really depend on
> anyhow on SUT. Adding it to upstream into make check (there are none check
> yet)
> would bring 1) earlier catch of potencial bugs as upstream developers can run
> it
> for each commit (CI) and distros during package build.
> 
> We had some discussion before about removing some user space packages [2].
> Cyril suggested to to keep tests that are working with files (cp/df/ln)
> and remove at least unzip and wc.
> Doing some real testing (really using vmcp.ko) would make this tests useful
> to
> run on LTP, but current code IMHO does nothing with kernel. Or do I miss
> something?
> 
> Anyway, it looks like you have no objection about adding it to LTP

I don't. My only question was if runtest/commands would be more fitting
for the test, but people seemed to prefer s390x specific runtest-file instead.

Regards,
Jan

>, so I
> changed
> state of this test New. In that case, I suggest to
> 
> remove debugging:
> > +#set -x
> > +#
> 
> use tst_res TINFO instead of echo
> +	echo "verifyBasicVMCPCommands"
> +	echo "verifyErrorCondition"
> 
> Kind regards,
> Petr
> 
> [1] https://github.com/ibm-s390-tools/s390-tools
> [2] https://patchwork.ozlabs.org/patch/905064/#1902070
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-02-18 18:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-04 16:13 [LTP] [PATCH] adding s390x tests to ltp Elif Aslan
2019-02-04 23:51 ` Petr Vorel
2019-02-07 12:52 ` Jan Stancek
2019-02-07 12:54   ` Cyril Hrubis
2019-02-18 18:21   ` Petr Vorel
2019-02-18 18:33     ` Jan Stancek

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.