mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
exec: silence hugetlbfs warning under qtest
vhost-user-test prints a warning. A test should not need to run on hugetlbfs, let's silence the warning under qtest. The condition can't check on qtest_enabled() since vhost-user-test actually doesn't use qtest accel. However, qtest_driver() can be used, if qtest_init() is called early enough. For that reason, move chardev and qtest initialization early. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
421f4448ce
commit
1c7ba94a18
2 changed files with 18 additions and 15 deletions
5
exec.c
5
exec.c
|
@ -51,6 +51,7 @@
|
|||
#include "qemu/main-loop.h"
|
||||
#include "translate-all.h"
|
||||
#include "sysemu/replay.h"
|
||||
#include "sysemu/qtest.h"
|
||||
|
||||
#include "exec/memory-internal.h"
|
||||
#include "exec/ram_addr.h"
|
||||
|
@ -1196,8 +1197,10 @@ static long gethugepagesize(const char *path, Error **errp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (fs.f_type != HUGETLBFS_MAGIC)
|
||||
if (!qtest_driver() &&
|
||||
fs.f_type != HUGETLBFS_MAGIC) {
|
||||
fprintf(stderr, "Warning: path not on HugeTLBFS: %s\n", path);
|
||||
}
|
||||
|
||||
return fs.f_bsize;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue