tests: Remove (mostly) useless architecture checks

These checks at the beginning of some of the tests are mostly useless:
We only run the tests on x86 anyway, and g_test_message() does not
print anything unless you call g_test_init() first.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Acked-by: John Snow <jsnow@redhat.com>
Acked-by: Corey Minyard <cminyard@mvista.com>
Message-Id: <1551456970-463-1-git-send-email-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
Thomas Huth 2019-03-01 17:16:10 +01:00 committed by Laurent Vivier
parent a3e3b0a7bd
commit 9a92aa3b17
4 changed files with 0 additions and 28 deletions

View File

@ -548,16 +548,9 @@ static void fuzz_registers(void)
int main(int argc, char **argv)
{
const char *arch = qtest_get_arch();
int fd;
int ret;
/* Check architecture */
if (strcmp(arch, "i386") && strcmp(arch, "x86_64")) {
g_test_message("Skipping test for non-x86\n");
return 0;
}
/* Create a temporary raw image */
fd = mkstemp(test_image);
g_assert(fd >= 0);

View File

@ -1009,16 +1009,9 @@ static void test_cdrom_dma(void)
int main(int argc, char **argv)
{
const char *arch = qtest_get_arch();
int fd;
int ret;
/* Check architecture */
if (strcmp(arch, "i386") && strcmp(arch, "x86_64")) {
g_test_message("Skipping test for non-x86\n");
return 0;
}
/* Create temporary blkdebug instructions */
fd = mkstemp(debug_path);
g_assert(fd >= 0);

View File

@ -400,15 +400,8 @@ static void open_socket(void)
int main(int argc, char **argv)
{
const char *arch = qtest_get_arch();
int ret;
/* Check architecture */
if (strcmp(arch, "i386") && strcmp(arch, "x86_64")) {
g_test_message("Skipping test for non-x86\n");
return 0;
}
open_socket();
/* Run the tests */

View File

@ -263,16 +263,9 @@ static void test_enable_irq(void)
int main(int argc, char **argv)
{
const char *arch = qtest_get_arch();
char *cmdline;
int ret;
/* Check architecture */
if (strcmp(arch, "i386") && strcmp(arch, "x86_64")) {
g_test_message("Skipping test for non-x86\n");
return 0;
}
/* Run the tests */
g_test_init(&argc, &argv, NULL);