diff mbox

[1/5] test: access: split off test case formatting from execution

Message ID 1272469678-10728-2-git-send-email-avi@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Avi Kivity April 28, 2010, 3:47 p.m. UTC
None
diff mbox

Patch

diff --git a/kvm/user/test/x86/access.c b/kvm/user/test/x86/access.c
index 5eadff8..dbc1213 100644
--- a/kvm/user/test/x86/access.c
+++ b/kvm/user/test/x86/access.c
@@ -557,9 +557,8 @@  int ac_test_do_access(ac_test_t *at)
     return 1;
 }
 
-int ac_test_exec(ac_test_t *at)
+static void ac_test_show(ac_test_t *at)
 {
-    int r;
     char line[5000];
 
     *line = 0;
@@ -571,6 +570,13 @@  int ac_test_exec(ac_test_t *at)
 	}
     strcat(line, ": ");
     printf("%s", line);
+}
+
+int ac_test_exec(ac_test_t *at)
+{
+    int r;
+
+    ac_test_show(at);
     ac_test_setup_pte(at);
     r = ac_test_do_access(at);
     return r;