@@ -1867,8 +1867,7 @@ int main(int argc, char **argv)
}
/* Check architecture */
- arch = qtest_get_arch();
- if (strcmp(arch, "i386") && strcmp(arch, "x86_64")) {
+ if (strcmp(qtest_get_base_arch(), "x86")) {
g_test_message("Skipping test for non-x86");
return 0;
}
While this change makes sense (unifying two checks into one) ...
diff --git a/tests/qtest/am53c974-test.c b/tests/qtest/am53c974-test.c
index ed3ac7db20..dc41182a38 100644
--- a/tests/qtest/am53c974-test.c
+++ b/tests/qtest/am53c974-test.c
@@ -253,11 +253,9 @@ static void test_reset_before_transfer_ok(void)
int main(int argc, char **argv)
{
- const char *arch = qtest_get_arch();
-
g_test_init(&argc, &argv, NULL);
- if (strcmp(arch, "i386") == 0) {
+ if (!strcmp(qtest_get_base_arch(), "x86") &&
qtest_get_arch_bits() == 32) {
... this change looks more cumbersome now (doing two checks now instead
of one), at least at the current point in time. Do you urgently need
this for your refactoring? If not, I'd maybe postpone such changes that
make the checks more compilcated to a later point in time.