summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2011-09-14 12:35:09 +0530
committerAmit Shah <amit.shah@redhat.com>2011-09-14 12:35:09 +0530
commitf6e02b2630114c4193327428076db3fc6d1d0b68 (patch)
tree824932466c69a886ab77da84e5231759ea79256d
parent36f7d69fea4a024bf9b69e7dc44a443660165f83 (diff)
downloadtest-virtserial-f6e02b2630114c4193327428076db3fc6d1d0b68.tar.gz
test-virtserial-f6e02b2630114c4193327428076db3fc6d1d0b68.tar.xz
test-virtserial-f6e02b2630114c4193327428076db3fc6d1d0b68.zip
auto-virtserial: Enable all tests at compile-time (instead of run-time)
The tests were enabled at run-time to allow for some tests to be disabled. However, no way exists to disable tests non-programmatically, and any disabling can be done by just flipping the bit for that test. Signed-off-by: Amit Shah <amit.shah@redhat.com>
-rw-r--r--auto-virtserial.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/auto-virtserial.c b/auto-virtserial.c
index c406d4f..244a61f 100644
--- a/auto-virtserial.c
+++ b/auto-virtserial.c
@@ -1546,78 +1546,97 @@ static struct test_parameters {
{
.test_function = test_open_close,
.needs_guestok = true,
+ .enabled = true,
},
{
.test_function = test_multiple_open,
.needs_guestok = true,
+ .enabled = true,
},
{
.test_function = test_sysfs_and_udev,
.needs_guestok = true,
+ .enabled = true,
},
{
.test_function = test_read_without_host,
.needs_guestok = true,
+ .enabled = true,
},
{
.test_function = test_blocking_read,
.needs_guestok = true,
+ .enabled = true,
},
{
.test_function = test_nonblocking_read,
.needs_guestok = true,
+ .enabled = true,
},
{
.test_function = test_blocking_write,
.needs_guestok = true,
+ .enabled = true,
},
{
.test_function = test_nonblocking_write,
.needs_guestok = true,
+ .enabled = true,
},
{
.test_function = test_poll,
.needs_guestok = true,
+ .enabled = true,
},
{
.test_function = test_lseek,
.needs_guestok = true,
+ .enabled = true,
},
{
.test_function = test_guest_throttle,
.needs_guestok = true,
+ .enabled = true,
},
{
.test_function = test_host_throttle,
.needs_guestok = true,
+ .enabled = true,
},
{
.test_function = test_guest_caching,
.needs_guestok = true,
+ .enabled = true,
},
{
.test_function = test_host_caching,
.needs_guestok = true,
+ .enabled = true,
},
{
.test_function = test_host_file_send,
.needs_guestok = true,
+ .enabled = true,
},
{
.test_function = test_guest_file_send,
.needs_guestok = true,
+ .enabled = true,
},
{
.test_function = test_console,
.needs_guestok = false,
+ .enabled = true,
},
{
.test_function = test_threaded_read_write,
.needs_guestok = true,
+ .enabled = true,
},
{
.test_function = test_sigio_handler,
.needs_guestok = true,
+ .enabled = true,
},
};
@@ -1819,10 +1838,6 @@ int main(int argc, const char *argv[])
}
}
next:
- /* mark all tests as 'to be run' */
- for (i = 0; i < TEST_END; i++)
- tests[i].enabled = true;
-
/* Now we're all set to start our tests. */
start_tests();