]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tests: Clean up includes
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 4 Nov 2025 16:09:43 +0000 (16:09 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 14 Nov 2025 13:18:04 +0000 (13:18 +0000)
This commit was created with scripts/clean-includes:
 ./scripts/clean-includes --git tests tests

with one hand-edit to remove a now-empty #ifndef WIN32...#endif
from tests/qtest/dbus-display-test.c .

All .c should include qemu/osdep.h first.  The script performs three
related cleanups:

* Ensure .c files include qemu/osdep.h first.
* Including it in a .h is redundant, since the .c  already includes
  it.  Drop such inclusions.
* Likewise, including headers qemu/osdep.h includes is redundant.
  Drop these, too.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Message-id: 20251104160943.751997-10-peter.maydell@linaro.org

tests/qtest/aspeed-hace-utils.h
tests/qtest/aspeed-smc-utils.h
tests/qtest/aspeed_gpio-test.c
tests/qtest/dbus-display-test.c
tests/qtest/pnv-spi-seeprom-test.c
tests/unit/test-cutils.c
tests/unit/test-error-report.c
tests/unit/test-io-channel-command.c

index c8b2ec45af2516abf1c1995a3ee91f050684813c..27ab2bb97585bb39fdf5ee8bf86d5e8a15b1a844 100644 (file)
@@ -8,7 +8,6 @@
 #ifndef TESTS_ASPEED_HACE_UTILS_H
 #define TESTS_ASPEED_HACE_UTILS_H
 
-#include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/bitops.h"
 
index b07870f3b8fa4457ad82522983e7f6e1aa6d089c..e2fd8ff1bd1622760253bcd3782a6a21b0482aa1 100644 (file)
@@ -26,7 +26,6 @@
 #ifndef TESTS_ASPEED_SMC_UTILS_H
 #define TESTS_ASPEED_SMC_UTILS_H
 
-#include "qemu/osdep.h"
 #include "qemu/bswap.h"
 #include "libqtest-single.h"
 #include "qemu/bitops.h"
index c2f9ca2298a7f53bbaa07393fcbf46483cf0830d..decbba23c8f14d87a4d9016f13c012327c3fe5c4 100644 (file)
@@ -27,7 +27,6 @@
 #include "qemu/timer.h"
 #include "qobject/qdict.h"
 #include "libqtest-single.h"
-#include "qemu/typedefs.h"
 
 #define AST2600_GPIO_BASE 0x1E780000
 
index f7fc873bfb3764f94ed2c254e23974df0ed00c46..1d5951b71170fdc071eafd92d3730540a1028da1 100644 (file)
@@ -7,9 +7,6 @@
 #include <gio/gio.h>
 #include <gio/gunixfdlist.h>
 #include "libqtest.h"
-#ifndef WIN32
-#include <sys/mman.h>
-#endif
 #include "ui/dbus-display1.h"
 
 static GDBusConnection*
index 600493c425daec537bb964a84d72cd12ff0e0e42..8033261758bc2b8806d25773c46e82f04de77b61 100644 (file)
@@ -5,7 +5,6 @@
  *
  * SPDX-License-Identifier: GPL-2.0-or-later
  */
-#include <unistd.h>
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/bswap.h"
index 227acc59955c114f81fa911be72392039dc77ec1..75fae29003a544aaac5b3051ecc49d5e433aa920 100644 (file)
@@ -25,9 +25,9 @@
  * THE SOFTWARE.
  */
 
+#include "qemu/osdep.h"
 #include <math.h>
 
-#include "qemu/osdep.h"
 #include "qemu/cutils.h"
 #include "qemu/units.h"
 
index 0cbde3c4cf5f4ef24a835704a37a3ec0b3cfedd5..a8532fc58fc594e0cf957270146ae63ed3f18c55 100644 (file)
@@ -8,7 +8,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "glib-compat.h"
 #include <locale.h>
 
 #include "qemu/error-report.h"
index 4f022617df0e7b76722ed9cb7881d4c14e35365a..964418b5cd9567e138897e861f5a7e919e43bc63 100644 (file)
@@ -20,8 +20,6 @@
 
 #include "qemu/osdep.h"
 #include <glib/gstdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
 #include "io/channel-command.h"
 #include "io-channel-helpers.h"
 #include "qapi/error.h"