Skip to contentSkip to conversation

tests: add fep test

PATCH Superseded Wei Liu 2 participants 3 messages Jun 17, 2016 – Jun 20, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

PATCH 1/1 tests: add fep test

---
 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
tests/fep/Makefile new file +12 -0
new file mode 100644
index 0000000..8702123
@@ -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
tests/fep/main.c new file +31 -0
new file mode 100644
index 0000000..34a93c0
@@ -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:
+ */
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#1 lore raw
Quoted 1 line · Wei Liu

LGTM, although a couple of comments.

Quoted 3 lines
---
 tests/fep/Makefile | 12 ++++++++++++
 tests/fep/main.c   | 31 +++++++++++++++++++++++++++++++

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

Quoted 10 lines
 2 files changed, 43 insertions(+)
 create mode 100644 tests/fep/Makefile
 create mode 100644 tests/fep/main.c
tests/fep/Makefile new file +0 -0
new file mode 100644
index 0000000..8702123

tests/fep/Makefile line 8

Quoted 8 lines
tests/fep/Makefile new file +8 -0
@@ -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.

Quoted 10 lines
tests/fep/Makefile new file +4 -0
+
+obj-perenv += main.o
+
+include $(ROOT)/build/gen.mk
tests/fep/main.c new file +0 -0
new file mode 100644
index 0000000..34a93c0

tests/fep/main.c line 7

Quoted 7 lines
tests/fep/main.c new file +7 -0
@@ -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
[email protected]
http://lists.xen.org/xen-devel

author
#2 lore raw
Quoted 11 lines · Andrew Cooper
Quoted 1 line · Wei Liu

LGTM, although a couple of comments.

Quoted 3 lines
---
 tests/fep/Makefile | 12 ++++++++++++
 tests/fep/main.c   | 31 +++++++++++++++++++++++++++++++

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

Done.

Quoted 14 lines
Quoted 14 lines
 2 files changed, 43 insertions(+)
 create mode 100644 tests/fep/Makefile
 create mode 100644 tests/fep/main.c
tests/fep/Makefile new file +4 -0
new file mode 100644
index 0000000..8702123
@@ -0,0 +1,12 @@
+MAKEFLAGS += -r
+ROOT := $(abspath $(CURDIR)/../..)
+
+include $(ROOT)/build/common.mk
Quoted 9 lines

tests/fep/Makefile line 8

Quoted 4 lines
tests/fep/Makefile new file +4 -0
+
+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.

Quoted 13 lines
Quoted 13 lines
tests/fep/Makefile new file +4 -0
+
+obj-perenv += main.o
+
+include $(ROOT)/build/gen.mk
tests/fep/main.c new file +3 -0
new file mode 100644
index 0000000..34a93c0
@@ -0,0 +1,31 @@
+/**
+ * @file tests/fep/main.c
+ * @ref test-fep
Quoted 9 lines

tests/fep/main.c line 7

Quoted 4 lines
tests/fep/main.c new file +4 -0
+ *
+ * @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.

Quoted 1 line

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel