#include "libqos/pci-pc.h"
#include "qemu/timer.h"
+static int verbosity_level;
+
/* Tests only initialization so far. TODO: Replace with functional tests */
static void nop(void)
{
static unsigned __attribute__((unused)) in_##name(void) \
{ \
unsigned res = qpci_io_read##len(dev, dev_bar, (val)); \
- g_test_message("*%s -> %x", #name, res); \
+ if (verbosity_level >= 2) { \
+ g_test_message("*%s -> %x", #name, res); \
+ } \
return res; \
} \
static void out_##name(unsigned v) \
{ \
- g_test_message("%x -> *%s", v, #name); \
+ if (verbosity_level >= 2) { \
+ g_test_message("%x -> *%s", v, #name); \
+ } \
qpci_io_write##len(dev, dev_bar, (val), v); \
}
int main(int argc, char **argv)
{
int ret;
+ char *v_env = getenv("V");
+
+ if (v_env) {
+ verbosity_level = atoi(v_env);
+ }
qtest_start("-device rtl8139");