Browse Source

tests: Clean up includes

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
pull/307/head
Peter Maydell 5 months ago
parent
commit
168558ed7b
  1. 1
      tests/qtest/aspeed-hace-utils.h
  2. 1
      tests/qtest/aspeed-smc-utils.h
  3. 1
      tests/qtest/aspeed_gpio-test.c
  4. 3
      tests/qtest/dbus-display-test.c
  5. 1
      tests/qtest/pnv-spi-seeprom-test.c
  6. 2
      tests/unit/test-cutils.c
  7. 1
      tests/unit/test-error-report.c
  8. 2
      tests/unit/test-io-channel-command.c

1
tests/qtest/aspeed-hace-utils.h

@ -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"

1
tests/qtest/aspeed-smc-utils.h

@ -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"

1
tests/qtest/aspeed_gpio-test.c

@ -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

3
tests/qtest/dbus-display-test.c

@ -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*

1
tests/qtest/pnv-spi-seeprom-test.c

@ -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"

2
tests/unit/test-cutils.c

@ -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"

1
tests/unit/test-error-report.c

@ -8,7 +8,6 @@
*/
#include "qemu/osdep.h"
#include "glib-compat.h"
#include <locale.h>
#include "qemu/error-report.h"

2
tests/unit/test-io-channel-command.c

@ -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"

Loading…
Cancel
Save