diff mbox

[20/67] tests: relative include for child directory

Message ID 1525376963-79623-21-git-send-email-mst@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michael S. Tsirkin May 3, 2018, 7:50 p.m. UTC
When pulling in headers that are in the child directory of the C file
(as opposed to one in include/), we should use its relative path, with
name of the child directory. Full path including the current directory
works more or less by accident.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 tests/migration-test.c | 2 +-
 tests/pkix_asn1_tab.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Juan Quintela May 8, 2018, 12:22 p.m. UTC | #1
"Michael S. Tsirkin" <mst@redhat.com> wrote:
> When pulling in headers that are in the child directory of the C file
> (as opposed to one in include/), we should use its relative path, with
> name of the child directory. Full path including the current directory
> works more or less by accident.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>
diff mbox

Patch

diff --git a/tests/migration-test.c b/tests/migration-test.c
index 422bf1a..be8d564 100644
--- a/tests/migration-test.c
+++ b/tests/migration-test.c
@@ -80,7 +80,7 @@  static const char *tmpfs;
 /* A simple PC boot sector that modifies memory (1-100MB) quickly
  * outputting a 'B' every so often if it's still running.
  */
-#include "tests/migration/x86-a-b-bootblock.h"
+#include "migration/x86-a-b-bootblock.h"
 
 static void init_bootfile_x86(const char *bootpath)
 {
diff --git a/tests/pkix_asn1_tab.c b/tests/pkix_asn1_tab.c
index f15fc51..f3bb2c7 100644
--- a/tests/pkix_asn1_tab.c
+++ b/tests/pkix_asn1_tab.c
@@ -4,7 +4,7 @@ 
  */
 
 #include "qemu/osdep.h"
-#include "tests/crypto-tls-x509-helpers.h"
+#include "crypto-tls-x509-helpers.h"
 
 #ifdef QCRYPTO_HAVE_TLS_TEST_SUPPORT