summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-12-09 14:51:52 +0200
committerAvi Kivity <avi@qumranet.com>2007-12-09 14:51:52 +0200
commit7fe5f8e2c65ca86d06320076c05a49a47609273d (patch)
tree669780361d3e8ed533361a0ae72a8f8c55578226 /user
parentde5397c2a6519db793f4f23e8c058cd7983cbcaf (diff)
kvm: testsuite: improve access test speed
by buffering the test description line, we make the test much faster, requiring only three exits per test case. Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'user')
-rw-r--r--user/test/x86/access.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/user/test/x86/access.c b/user/test/x86/access.c
index df62c208..adfb944a 100644
--- a/user/test/x86/access.c
+++ b/user/test/x86/access.c
@@ -535,12 +535,17 @@ int ac_test_do_access(ac_test_t *at)
int ac_test_exec(ac_test_t *at)
{
int r;
+ char line[5000];
- printf("test");
+ *line = 0;
+ strcat(line, "test");
for (int i = 0; i < NR_AC_FLAGS; ++i)
- if (at->flags[i])
- printf(" %s", ac_names[i]);
- printf(": ");
+ if (at->flags[i]) {
+ strcat(line, " ");
+ strcat(line, ac_names[i]);
+ }
+ strcat(line, ": ");
+ printf("%s", line);
ac_test_setup_pte(at);
r = ac_test_do_access(at);
return r;