xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH XTF] tests: add fep test
@ 2016-06-17 14:21 Wei Liu
  2016-06-20 13:43 ` Andrew Cooper
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Liu @ 2016-06-17 14:21 UTC (permalink / raw)
  To: Xen-devel; +Cc: andrew.cooper3, Wei Liu

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 tests/fep/Makefile | 12 ++++++++++++
 tests/fep/main.c   | 31 +++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+)
 create mode 100644 tests/fep/Makefile
 create mode 100644 tests/fep/main.c

diff --git a/tests/fep/Makefile b/tests/fep/Makefile
new file mode 100644
index 0000000..8702123
--- /dev/null
+++ b/tests/fep/Makefile
@@ -0,0 +1,12 @@
+MAKEFLAGS += -r
+ROOT := $(abspath $(CURDIR)/../..)
+
+include $(ROOT)/build/common.mk
+
+NAME      := fep
+CATEGORY  := utility
+TEST-ENVS := $(HVM_ENVIRONMENTS)
+
+obj-perenv += main.o
+
+include $(ROOT)/build/gen.mk
diff --git a/tests/fep/main.c b/tests/fep/main.c
new file mode 100644
index 0000000..34a93c0
--- /dev/null
+++ b/tests/fep/main.c
@@ -0,0 +1,31 @@
+/**
+ * @file tests/fep/main.c
+ * @ref test-fep
+ *
+ * @page test-fep FEP
+ *
+ * Returns SUCCESS if FEP is available, FAILURE if not.
+ *
+ * @sa tests/fep/main.c
+ */
+#include <xtf.h>
+
+void test_main(void)
+{
+    printk("Test availability of HVM forced emulation prefix\n");
+
+    if ( xtf_has_fep )
+        xtf_success(NULL);
+    else
+        xtf_failure(NULL);
+}
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [PATCH XTF] tests: add fep test
  2016-06-17 14:21 [PATCH XTF] tests: add fep test Wei Liu
@ 2016-06-20 13:43 ` Andrew Cooper
  2016-06-20 14:31   ` Wei Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cooper @ 2016-06-20 13:43 UTC (permalink / raw)
  To: Wei Liu, Xen-devel

On 17/06/16 15:21, Wei Liu wrote:
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>

LGTM, although a couple of comments.

> ---
>  tests/fep/Makefile | 12 ++++++++++++
>  tests/fep/main.c   | 31 +++++++++++++++++++++++++++++++

Please add this to the test index in docs/all-tests.dox

>  2 files changed, 43 insertions(+)
>  create mode 100644 tests/fep/Makefile
>  create mode 100644 tests/fep/main.c
>
> diff --git a/tests/fep/Makefile b/tests/fep/Makefile
> new file mode 100644
> index 0000000..8702123
> --- /dev/null
> +++ b/tests/fep/Makefile
> @@ -0,0 +1,12 @@
> +MAKEFLAGS += -r
> +ROOT := $(abspath $(CURDIR)/../..)
> +
> +include $(ROOT)/build/common.mk
> +
> +NAME      := fep
> +CATEGORY  := utility
> +TEST-ENVS := $(HVM_ENVIRONMENTS)

This really doesn't need to be all HVM environments.  FEP is a property
of the HVM container, not of the running mode of the domain.  hvm32
would be fine here, and the most simple option.

> +
> +obj-perenv += main.o
> +
> +include $(ROOT)/build/gen.mk
> diff --git a/tests/fep/main.c b/tests/fep/main.c
> new file mode 100644
> index 0000000..34a93c0
> --- /dev/null
> +++ b/tests/fep/main.c
> @@ -0,0 +1,31 @@
> +/**
> + * @file tests/fep/main.c
> + * @ref test-fep
> + *
> + * @page test-fep FEP
> + *
> + * Returns SUCCESS if FEP is available, FAILURE if not.

This is the content one will find from the test index, and as such,
should be the most complete.  At the very least, I would add a sentence
explaining what FEP is.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [PATCH XTF] tests: add fep test
  2016-06-20 13:43 ` Andrew Cooper
@ 2016-06-20 14:31   ` Wei Liu
  0 siblings, 0 replies; 3+ messages in thread
From: Wei Liu @ 2016-06-20 14:31 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Xen-devel, Wei Liu

On Mon, Jun 20, 2016 at 02:43:47PM +0100, Andrew Cooper wrote:
> On 17/06/16 15:21, Wei Liu wrote:
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> 
> LGTM, although a couple of comments.
> 
> > ---
> >  tests/fep/Makefile | 12 ++++++++++++
> >  tests/fep/main.c   | 31 +++++++++++++++++++++++++++++++
> 
> Please add this to the test index in docs/all-tests.dox
> 

Done.

> >  2 files changed, 43 insertions(+)
> >  create mode 100644 tests/fep/Makefile
> >  create mode 100644 tests/fep/main.c
> >
> > diff --git a/tests/fep/Makefile b/tests/fep/Makefile
> > new file mode 100644
> > index 0000000..8702123
> > --- /dev/null
> > +++ b/tests/fep/Makefile
> > @@ -0,0 +1,12 @@
> > +MAKEFLAGS += -r
> > +ROOT := $(abspath $(CURDIR)/../..)
> > +
> > +include $(ROOT)/build/common.mk
> > +
> > +NAME      := fep
> > +CATEGORY  := utility
> > +TEST-ENVS := $(HVM_ENVIRONMENTS)
> 
> This really doesn't need to be all HVM environments.  FEP is a property
> of the HVM container, not of the running mode of the domain.  hvm32
> would be fine here, and the most simple option.
> 

Done.

> > +
> > +obj-perenv += main.o
> > +
> > +include $(ROOT)/build/gen.mk
> > diff --git a/tests/fep/main.c b/tests/fep/main.c
> > new file mode 100644
> > index 0000000..34a93c0
> > --- /dev/null
> > +++ b/tests/fep/main.c
> > @@ -0,0 +1,31 @@
> > +/**
> > + * @file tests/fep/main.c
> > + * @ref test-fep
> > + *
> > + * @page test-fep FEP
> > + *
> > + * Returns SUCCESS if FEP is available, FAILURE if not.
> 
> This is the content one will find from the test index, and as such,
> should be the most complete.  At the very least, I would add a sentence
> explaining what FEP is.
> 

Sure.

V2 coming soon.

Wei.

> ~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

end of thread, other threads:[~2016-06-20 14:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-17 14:21 [PATCH XTF] tests: add fep test Wei Liu
2016-06-20 13:43 ` Andrew Cooper
2016-06-20 14:31   ` Wei Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).