[1/7] tests/tcg: add a simple s390x test

Message ID 20180810030139.25916-2-pavel.zbitskiy@gmail.com
State New
Headers show
Series
  • Some improvements in z/Arch instructions support
Related show

Commit Message

Pavel Zbitskiy Aug. 10, 2018, 3:01 a.m.
Copied from alpha.

Signed-off-by: Pavel Zbitskiy <pavel.zbitskiy@gmail.com>
---
 tests/tcg/s390x/Makefile.target | 3 +++
 tests/tcg/s390x/hello-s390x.c   | 7 +++++++
 2 files changed, 10 insertions(+)
 create mode 100644 tests/tcg/s390x/Makefile.target
 create mode 100644 tests/tcg/s390x/hello-s390x.c

Comments

David Hildenbrand Aug. 13, 2018, 8:53 a.m. | #1
On 10.08.2018 05:01, Pavel Zbitskiy wrote:
> Copied from alpha.
> 
> Signed-off-by: Pavel Zbitskiy <pavel.zbitskiy@gmail.com>
> ---
>  tests/tcg/s390x/Makefile.target | 3 +++
>  tests/tcg/s390x/hello-s390x.c   | 7 +++++++
>  2 files changed, 10 insertions(+)
>  create mode 100644 tests/tcg/s390x/Makefile.target
>  create mode 100644 tests/tcg/s390x/hello-s390x.c
> 
> diff --git a/tests/tcg/s390x/Makefile.target b/tests/tcg/s390x/Makefile.target
> new file mode 100644
> index 0000000000..9f4076901f
> --- /dev/null
> +++ b/tests/tcg/s390x/Makefile.target
> @@ -0,0 +1,3 @@
> +VPATH+=$(SRC_PATH)/tests/tcg/s390x
> +CFLAGS+=-march=zEC12 -m64
> +TESTS+=hello-s390x
> diff --git a/tests/tcg/s390x/hello-s390x.c b/tests/tcg/s390x/hello-s390x.c
> new file mode 100644
> index 0000000000..3dc0a05f2b
> --- /dev/null
> +++ b/tests/tcg/s390x/hello-s390x.c
> @@ -0,0 +1,7 @@
> +#include <unistd.h>
> +
> +int main(void)
> +{
> +    write(1, "hello\n", 6);
> +    return 0;
> +}
> 

Reviewed-by: David Hildenbrand <david@redhat.com>
Thomas Huth Aug. 16, 2018, 1:44 p.m. | #2
On 08/10/2018 05:01 AM, Pavel Zbitskiy wrote:
> Copied from alpha.
> 
> Signed-off-by: Pavel Zbitskiy <pavel.zbitskiy@gmail.com>
> ---
>  tests/tcg/s390x/Makefile.target | 3 +++
>  tests/tcg/s390x/hello-s390x.c   | 7 +++++++
>  2 files changed, 10 insertions(+)
>  create mode 100644 tests/tcg/s390x/Makefile.target
>  create mode 100644 tests/tcg/s390x/hello-s390x.c
> 
> diff --git a/tests/tcg/s390x/Makefile.target b/tests/tcg/s390x/Makefile.target
> new file mode 100644
> index 0000000000..9f4076901f
> --- /dev/null
> +++ b/tests/tcg/s390x/Makefile.target
> @@ -0,0 +1,3 @@
> +VPATH+=$(SRC_PATH)/tests/tcg/s390x
> +CFLAGS+=-march=zEC12 -m64
> +TESTS+=hello-s390x
> diff --git a/tests/tcg/s390x/hello-s390x.c b/tests/tcg/s390x/hello-s390x.c
> new file mode 100644
> index 0000000000..3dc0a05f2b
> --- /dev/null
> +++ b/tests/tcg/s390x/hello-s390x.c
> @@ -0,0 +1,7 @@
> +#include <unistd.h>
> +
> +int main(void)
> +{
> +    write(1, "hello\n", 6);
> +    return 0;
> +}
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>

Patch

diff --git a/tests/tcg/s390x/Makefile.target b/tests/tcg/s390x/Makefile.target
new file mode 100644
index 0000000000..9f4076901f
--- /dev/null
+++ b/tests/tcg/s390x/Makefile.target
@@ -0,0 +1,3 @@ 
+VPATH+=$(SRC_PATH)/tests/tcg/s390x
+CFLAGS+=-march=zEC12 -m64
+TESTS+=hello-s390x
diff --git a/tests/tcg/s390x/hello-s390x.c b/tests/tcg/s390x/hello-s390x.c
new file mode 100644
index 0000000000..3dc0a05f2b
--- /dev/null
+++ b/tests/tcg/s390x/hello-s390x.c
@@ -0,0 +1,7 @@ 
+#include <unistd.h>
+
+int main(void)
+{
+    write(1, "hello\n", 6);
+    return 0;
+}