Commit 13ee9e30 authored by Thomas Huth's avatar Thomas Huth
Browse files

tests: Do not use "\n" in g_test_message() strings



g_test_message() takes care of the newline on its own, so we
should not use \n in the strings here.

Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
parent 142659b8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ static inline unsigned in_reg(IVState *s, enum Reg reg)
    unsigned res;

    res = qpci_io_readl(s->dev, s->reg_bar, reg);
    g_test_message("*%s -> %x\n", name, res);
    g_test_message("*%s -> %x", name, res);

    return res;
}
@@ -83,7 +83,7 @@ static inline void out_reg(IVState *s, enum Reg reg, unsigned v)
{
    const char *name = reg2str(reg);

    g_test_message("%x -> *%s\n", v, name);
    g_test_message("%x -> *%s", v, name);
    qpci_io_writel(s->dev, s->reg_bar, reg, v);
}

+2 −2
Original line number Diff line number Diff line
@@ -199,9 +199,9 @@ static void bcd_check_time(void)
        t = (long)mktime(datep);
        s = (long)mktime(&start);
        if (t < s) {
            g_test_message("RTC is %ld second(s) behind wall-clock\n", (s - t));
            g_test_message("RTC is %ld second(s) behind wall-clock", (s - t));
        } else {
            g_test_message("RTC is %ld second(s) ahead of wall-clock\n", (t - s));
            g_test_message("RTC is %ld second(s) ahead of wall-clock", (t - s));
        }

        g_assert_cmpint(ABS(t - s), <=, wiggle);
+2 −2
Original line number Diff line number Diff line
@@ -1066,7 +1066,7 @@ int main(int argc, char **argv)

    tmpfs = mkdtemp(template);
    if (!tmpfs) {
        g_test_message("mkdtemp on path (%s): %s\n", template, strerror(errno));
        g_test_message("mkdtemp on path (%s): %s", template, strerror(errno));
    }
    g_assert(tmpfs);

@@ -1087,7 +1087,7 @@ int main(int argc, char **argv)

    ret = rmdir(tmpfs);
    if (ret != 0) {
        g_test_message("unable to rmdir: path (%s): %s\n",
        g_test_message("unable to rmdir: path (%s): %s",
                       tmpfs, strerror(errno));
    }

+2 −2
Original line number Diff line number Diff line
@@ -165,9 +165,9 @@ static void check_time(int wiggle)
        t = (long)mktime(datep);
        s = (long)mktime(&start);
        if (t < s) {
            g_test_message("RTC is %ld second(s) behind wall-clock\n", (s - t));
            g_test_message("RTC is %ld second(s) behind wall-clock", (s - t));
        } else {
            g_test_message("RTC is %ld second(s) ahead of wall-clock\n", (t - s));
            g_test_message("RTC is %ld second(s) ahead of wall-clock", (t - s));
        }

        g_assert_cmpint(ABS(t - s), <=, wiggle);
+3 −3
Original line number Diff line number Diff line
@@ -46,12 +46,12 @@ static QPCIDevice *get_device(void)
static unsigned __attribute__((unused)) in_##name(void) \
{ \
    unsigned res = qpci_io_read##len(dev, dev_bar, (val));     \
    g_test_message("*%s -> %x\n", #name, res); \
    g_test_message("*%s -> %x", #name, res); \
    return res; \
} \
static void out_##name(unsigned v) \
{ \
    g_test_message("%x -> *%s\n", v, #name); \
    g_test_message("%x -> *%s", v, #name); \
    qpci_io_write##len(dev, dev_bar, (val), v);        \
}

@@ -176,7 +176,7 @@ static void test_timer(void)
        }
    }

    g_test_message("Everythink is ok!\n");
    g_test_message("Everythink is ok!");
}


Loading