[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 7/7] tests/style: check qemu/osdep.h is included in all .c fil
From: |
Daniel P . Berrangé |
Subject: |
[PATCH v2 7/7] tests/style: check qemu/osdep.h is included in all .c files |
Date: |
Mon, 4 Jul 2022 16:23:03 +0100 |
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
tests/style-excludes.mak | 17 +++++++++++++++++
tests/style.mak | 6 ++++++
2 files changed, 23 insertions(+)
diff --git a/tests/style-excludes.mak b/tests/style-excludes.mak
index 931dd03a64..df158e1d9d 100644
--- a/tests/style-excludes.mak
+++ b/tests/style-excludes.mak
@@ -14,3 +14,20 @@ exclude_file_name_regexp--sc_prohibit_doubled_word = \
tests/qemu-iotests/142(\.out)? \
tests/qtest/arm-cpu-features\.c \
ui/cursor\.c
+
+exclude_file_name_regexp--sc_c_file_osdep_h = \
+ contrib/plugins/.* \
+ linux-user/(mips64|x86_64)/(signal|cpu_loop)\.c \
+ pc-bios/.* \
+ scripts/coverity-scan/model\.c \
+ scripts/xen-detect\.c \
+ subprojects/.* \
+ target/hexagon/(gen_semantics|gen_dectree_import)\.c \
+ target/s390x/gen-features\.c \
+ tests/migration/s390x/a-b-bios\.c \
+ tests/multiboot/.* \
+ tests/plugin/.* \
+ tests/tcg/.* \
+ tests/uefi-test-tools/.* \
+ tests/unit/test-rcu-(simpleq|slist|tailq)\.c \
+ tools/ebpf/rss.bpf.c
diff --git a/tests/style.mak b/tests/style.mak
index 4056bde619..301d978155 100644
--- a/tests/style.mak
+++ b/tests/style.mak
@@ -52,3 +52,9 @@ sc_prohibit_doubled_word:
| $(GREP) . \
&& { echo '$(ME): doubled words' 1>&2; exit 1; } \
|| :
+
+sc_c_file_osdep_h:
+ @require='#include "qemu/osdep.h"' \
+ in_vc_files='\.c$$' \
+ halt='all C files must include qemu/osdep.h' \
+ $(_sc_search_regexp)
--
2.36.1
- Re: [PATCH v2 1/7] tests: introduce tree-wide code style checking, (continued)
- [PATCH v2 7/7] tests/style: check qemu/osdep.h is included in all .c files,
Daniel P . Berrangé <=
[PATCH v2 6/7] misc: ensure qemu/osdep.h is included in all .c files, Daniel P . Berrangé, 2022/07/04