Suppress QEMU syscall and ioctl debug messages

Compile QEMU with "Unsupported syscall" and "Unsupported ioctl" messages
suppressed, those can be shown by set/unset environment variable QEMU_SYSCALL_DEBUG.

Task-number: QTQAINFRA-2808
Change-Id: If0b28c47f2599c4ebca9cae6a6d38f9a4fd00458
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
This commit is contained in:
Assam Boudjelthia
2019-08-20 09:49:21 +03:00
parent 6e601907b9
commit 8a5d86d888

View File

@@ -121,6 +121,43 @@ index 11a311f9db..94d8abc745 100644
2.17.1
EOT
patch -p1 <<EOT
From fb4f0fa319e757c083f0b3674f575a09c323f5aa Mon Sep 17 00:00:00 2001
From: Assam Boudjelthia <assam.boudjelthia@qt.io>
Date: Tue, 20 Aug 2019 09:46:46 +0300
Subject: [PATCH] Suppress unsupported syscall and ioctl debug messages
Those messages were spamming the CI tests output, thus they can
only be shown by defining environment variable QEMU_SYSCALL_DEBUG=true
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 94d8abc745..e72cfb0cb5 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5479,7 +5479,8 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg)
ie = ioctl_entries;
for(;;) {
if (ie->target_cmd == 0) {
- gemu_log("Unsupported ioctl: cmd=0x%04lx\n", (long)cmd);
+ if (getenv("QEMU_SYSCALL_DEBUG"))
+ gemu_log("Unsupported ioctl: cmd=0x%04lx\n", (long)cmd);
return -TARGET_ENOSYS;
}
if (ie->target_cmd == cmd)
@@ -12172,7 +12173,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
default:
unimplemented:
- gemu_log("qemu: Unsupported syscall: %d\n", num);
+ if (getenv("QEMU_SYSCALL_DEBUG"))
+ gemu_log("qemu: Unsupported syscall: %d\n", num);
#if defined(TARGET_NR_setxattr) || defined(TARGET_NR_get_thread_area) || defined(TARGET_NR_getdomainname) || defined(TARGET_NR_set_robust_list)
unimplemented_nowarn:
#endif
--
2.17.1
EOT
./configure --target-list=arm-linux-user,aarch64-linux-user --static --disable-werror
make
sudo make install