tests: change confusing macro agument names

Rather than use the names "fial" and "kep", use "fail" and "keep". In
the DO_TEST() macro, to prevent the preprocessor replacing the struct
member names during assignment, use the names "fail_" and "keep_"
instead.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
Jonathon Jongsma 2020-09-02 14:45:38 -05:00 committed by Laine Stump
parent be28a7fbd6
commit a5af3bd862

View File

@ -641,28 +641,28 @@ mymain(void)
}
#define DO_TEST(file, ACTION, dev, fial, kep, ...) \
#define DO_TEST(file, ACTION, dev, fail_, keep_, ...) \
do { \
const char *my_mon[] = { __VA_ARGS__, NULL}; \
const char *name = file " " #ACTION " " dev; \
data.action = ACTION; \
data.domain_filename = file; \
data.device_filename = dev; \
data.fail = fial; \
data.fail = fail_; \
data.mon = my_mon; \
data.keep = kep; \
data.keep = keep_; \
if (virTestRun(name, testQemuHotplug, &data) < 0) \
ret = -1; \
} while (0)
#define DO_TEST_ATTACH(file, dev, fial, kep, ...) \
DO_TEST(file, ATTACH, dev, fial, kep, __VA_ARGS__)
#define DO_TEST_ATTACH(file, dev, fail, keep, ...) \
DO_TEST(file, ATTACH, dev, fail, keep, __VA_ARGS__)
#define DO_TEST_DETACH(file, dev, fial, kep, ...) \
DO_TEST(file, DETACH, dev, fial, kep, __VA_ARGS__)
#define DO_TEST_DETACH(file, dev, fail, keep, ...) \
DO_TEST(file, DETACH, dev, fail, keep, __VA_ARGS__)
#define DO_TEST_UPDATE(file, dev, fial, kep, ...) \
DO_TEST(file, UPDATE, dev, fial, kep, __VA_ARGS__)
#define DO_TEST_UPDATE(file, dev, fail, keep, ...) \
DO_TEST(file, UPDATE, dev, fail, keep, __VA_ARGS__)
#define QMP_OK "{\"return\": {}}"