diff mbox

validation: correct use of #include

Message ID 1417800310-55545-1-git-send-email-mike.holmes@linaro.org
State Accepted
Commit 9aec4cd765f1ac440f90a49720431a9e6466f5b8
Headers show

Commit Message

Mike Holmes Dec. 5, 2014, 5:25 p.m. UTC
Header files found in the system should be included via <> and local header
files should be included via ""

Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---

From the gcc manual
https://gcc.gnu.org/onlinedocs/cpp/Include-Syntax.html

include <file>
This variant is used for system header files. It searches for a file named file
in a standard list of system directories. You can prepend directories to this
list with the -I option

include "file"
This variant is used for header files of your own program. It searches for a
file named file first in the directory containing the current file, then in the
quote directories and then the same directories used for <file>. You can prepend
directories to the list of quote directories with the -i quote_option.

 test/validation/common/odp_cunit_common.c          | 4 ++--
 test/validation/crypto/odp_crypto_test_async_inp.c | 5 ++---
 test/validation/crypto/odp_crypto_test_rng.c       | 4 ++--
 test/validation/crypto/odp_crypto_test_sync_inp.c  | 5 ++---
 test/validation/odp_init.c                         | 4 ++--
 test/validation/odp_queue.c                        | 4 ++--
 test/validation/odp_shm.c                          | 4 ++--
 7 files changed, 14 insertions(+), 16 deletions(-)

Comments

Bill Fischofer Dec. 5, 2014, 8:34 p.m. UTC | #1
On Fri, Dec 5, 2014 at 11:25 AM, Mike Holmes <mike.holmes@linaro.org> wrote:

> Header files found in the system should be included via <> and local header
> files should be included via ""
>
> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
>

Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>


> ---
>
> From the gcc manual
> https://gcc.gnu.org/onlinedocs/cpp/Include-Syntax.html
>
> include <file>
> This variant is used for system header files. It searches for a file named
> file
> in a standard list of system directories. You can prepend directories to
> this
> list with the -I option
>
> include "file"
> This variant is used for header files of your own program. It searches for
> a
> file named file first in the directory containing the current file, then
> in the
> quote directories and then the same directories used for <file>. You can
> prepend
> directories to the list of quote directories with the -i quote_option.
>
>  test/validation/common/odp_cunit_common.c          | 4 ++--
>  test/validation/crypto/odp_crypto_test_async_inp.c | 5 ++---
>  test/validation/crypto/odp_crypto_test_rng.c       | 4 ++--
>  test/validation/crypto/odp_crypto_test_sync_inp.c  | 5 ++---
>  test/validation/odp_init.c                         | 4 ++--
>  test/validation/odp_queue.c                        | 4 ++--
>  test/validation/odp_shm.c                          | 4 ++--
>  7 files changed, 14 insertions(+), 16 deletions(-)
>
> diff --git a/test/validation/common/odp_cunit_common.c
> b/test/validation/common/odp_cunit_common.c
> index 14ba840..950bd18 100644
> --- a/test/validation/common/odp_cunit_common.c
> +++ b/test/validation/common/odp_cunit_common.c
> @@ -12,8 +12,8 @@
>
>  #include <string.h>
>  #include <odp.h>
> -#include "odp_cunit_common.h"
> -#include "odph_linux.h"
> +#include <odp_cunit_common.h>
> +#include <odph_linux.h>
>  /* Globals */
>  static odph_linux_pthread_t thread_tbl[MAX_WORKERS];
>
> diff --git a/test/validation/crypto/odp_crypto_test_async_inp.c
> b/test/validation/crypto/odp_crypto_test_async_inp.c
> index 6b9a1b2..c140c0f 100644
> --- a/test/validation/crypto/odp_crypto_test_async_inp.c
> +++ b/test/validation/crypto/odp_crypto_test_async_inp.c
> @@ -5,9 +5,8 @@
>   */
>
>  #include <odp.h>
> -#include <odp_crypto.h>
> -#include "CUnit/Basic.h"
> -#include "CUnit/TestDB.h"
> +#include <CUnit/Basic.h>
> +#include <CUnit/TestDB.h>
>  #include "test_vectors.h"
>
>  /* Basic algorithm run function for async inplace mode.
> diff --git a/test/validation/crypto/odp_crypto_test_rng.c
> b/test/validation/crypto/odp_crypto_test_rng.c
> index 2898cb1..458f908 100644
> --- a/test/validation/crypto/odp_crypto_test_rng.c
> +++ b/test/validation/crypto/odp_crypto_test_rng.c
> @@ -4,8 +4,8 @@
>   * SPDX-License-Identifier:     BSD-3-Clause
>   */
>  #include <odp.h>
> -#include "CUnit/Basic.h"
> -#include "CUnit/TestDB.h"
> +#include <CUnit/Basic.h>
> +#include <CUnit/TestDB.h>
>  #include "test_vectors_len.h"
>
>  /*
> diff --git a/test/validation/crypto/odp_crypto_test_sync_inp.c
> b/test/validation/crypto/odp_crypto_test_sync_inp.c
> index 0d4360f..b63fd4d 100644
> --- a/test/validation/crypto/odp_crypto_test_sync_inp.c
> +++ b/test/validation/crypto/odp_crypto_test_sync_inp.c
> @@ -1,7 +1,6 @@
>  #include <odp.h>
> -#include <odp_crypto.h>
> -#include "CUnit/Basic.h"
> -#include "CUnit/TestDB.h"
> +#include <CUnit/Basic.h>
> +#include <CUnit/TestDB.h>
>  #include "test_vectors.h"
>
>  /* Basic algorithm run function for sync inplace.
> diff --git a/test/validation/odp_init.c b/test/validation/odp_init.c
> index 477aa12..5a17ce9 100644
> --- a/test/validation/odp_init.c
> +++ b/test/validation/odp_init.c
> @@ -4,8 +4,8 @@
>   * SPDX-License-Identifier:     BSD-3-Clause
>   */
>
> -#include "odp.h"
> -#include "CUnit/Basic.h"
> +#include <odp.h>
> +#include <CUnit/Basic.h>
>
>  #define DEFAULT_MSG_POOL_SIZE  (4*1024*1024)
>  #define DEFAULT_MSG_SIZE       (8)
> diff --git a/test/validation/odp_queue.c b/test/validation/odp_queue.c
> index 2c8fe80..9f42b6f 100644
> --- a/test/validation/odp_queue.c
> +++ b/test/validation/odp_queue.c
> @@ -4,8 +4,8 @@
>   * SPDX-License-Identifier:     BSD-3-Clause
>   */
>
> -#include "odp.h"
> -#include "odp_cunit_common.h"
> +#include <odp.h>
> +#include <odp_cunit_common.h>
>
>  #define MAX_BUFFER_QUEUE        (8)
>  #define MSG_POOL_SIZE           (4*1024*1024)
> diff --git a/test/validation/odp_shm.c b/test/validation/odp_shm.c
> index 8a991b1..63353db 100644
> --- a/test/validation/odp_shm.c
> +++ b/test/validation/odp_shm.c
> @@ -4,8 +4,8 @@
>   * SPDX-License-Identifier:     BSD-3-Clause
>   */
>
> -#include "odp.h"
> -#include "odp_cunit_common.h"
> +#include <odp.h>
> +#include <odp_cunit_common.h>
>
>  #define ALIGE_SIZE  (128)
>  #define TESTNAME "cunit_test_shared_data"
> --
> 2.1.0
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
Maxim Uvarov Dec. 9, 2014, 12:28 p.m. UTC | #2
Merged!

Maxim.

On 12/05/2014 11:34 PM, Bill Fischofer wrote:
>
>
> On Fri, Dec 5, 2014 at 11:25 AM, Mike Holmes <mike.holmes@linaro.org 
> <mailto:mike.holmes@linaro.org>> wrote:
>
>     Header files found in the system should be included via <> and
>     local header
>     files should be included via ""
>
>     Signed-off-by: Mike Holmes <mike.holmes@linaro.org
>     <mailto:mike.holmes@linaro.org>>
>
>
> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org 
> <mailto:bill.fischofer@linaro.org>>
>
>     ---
>
>     From the gcc manual
>     https://gcc.gnu.org/onlinedocs/cpp/Include-Syntax.html
>
>     include <file>
>     This variant is used for system header files. It searches for a
>     file named file
>     in a standard list of system directories. You can prepend
>     directories to this
>     list with the -I option
>
>     include "file"
>     This variant is used for header files of your own program. It
>     searches for a
>     file named file first in the directory containing the current
>     file, then in the
>     quote directories and then the same directories used for <file>.
>     You can prepend
>     directories to the list of quote directories with the -i quote_option.
>
>      test/validation/common/odp_cunit_common.c          | 4 ++--
>      test/validation/crypto/odp_crypto_test_async_inp.c | 5 ++---
>      test/validation/crypto/odp_crypto_test_rng.c       | 4 ++--
>      test/validation/crypto/odp_crypto_test_sync_inp.c  | 5 ++---
>      test/validation/odp_init.c                         | 4 ++--
>      test/validation/odp_queue.c                        | 4 ++--
>      test/validation/odp_shm.c                          | 4 ++--
>      7 files changed, 14 insertions(+), 16 deletions(-)
>
>     diff --git a/test/validation/common/odp_cunit_common.c
>     b/test/validation/common/odp_cunit_common.c
>     index 14ba840..950bd18 100644
>     --- a/test/validation/common/odp_cunit_common.c
>     +++ b/test/validation/common/odp_cunit_common.c
>     @@ -12,8 +12,8 @@
>
>      #include <string.h>
>      #include <odp.h>
>     -#include "odp_cunit_common.h"
>     -#include "odph_linux.h"
>     +#include <odp_cunit_common.h>
>     +#include <odph_linux.h>
>      /* Globals */
>      static odph_linux_pthread_t thread_tbl[MAX_WORKERS];
>
>     diff --git a/test/validation/crypto/odp_crypto_test_async_inp.c
>     b/test/validation/crypto/odp_crypto_test_async_inp.c
>     index 6b9a1b2..c140c0f 100644
>     --- a/test/validation/crypto/odp_crypto_test_async_inp.c
>     +++ b/test/validation/crypto/odp_crypto_test_async_inp.c
>     @@ -5,9 +5,8 @@
>       */
>
>      #include <odp.h>
>     -#include <odp_crypto.h>
>     -#include "CUnit/Basic.h"
>     -#include "CUnit/TestDB.h"
>     +#include <CUnit/Basic.h>
>     +#include <CUnit/TestDB.h>
>      #include "test_vectors.h"
>
>      /* Basic algorithm run function for async inplace mode.
>     diff --git a/test/validation/crypto/odp_crypto_test_rng.c
>     b/test/validation/crypto/odp_crypto_test_rng.c
>     index 2898cb1..458f908 100644
>     --- a/test/validation/crypto/odp_crypto_test_rng.c
>     +++ b/test/validation/crypto/odp_crypto_test_rng.c
>     @@ -4,8 +4,8 @@
>       * SPDX-License-Identifier:     BSD-3-Clause
>       */
>      #include <odp.h>
>     -#include "CUnit/Basic.h"
>     -#include "CUnit/TestDB.h"
>     +#include <CUnit/Basic.h>
>     +#include <CUnit/TestDB.h>
>      #include "test_vectors_len.h"
>
>      /*
>     diff --git a/test/validation/crypto/odp_crypto_test_sync_inp.c
>     b/test/validation/crypto/odp_crypto_test_sync_inp.c
>     index 0d4360f..b63fd4d 100644
>     --- a/test/validation/crypto/odp_crypto_test_sync_inp.c
>     +++ b/test/validation/crypto/odp_crypto_test_sync_inp.c
>     @@ -1,7 +1,6 @@
>      #include <odp.h>
>     -#include <odp_crypto.h>
>     -#include "CUnit/Basic.h"
>     -#include "CUnit/TestDB.h"
>     +#include <CUnit/Basic.h>
>     +#include <CUnit/TestDB.h>
>      #include "test_vectors.h"
>
>      /* Basic algorithm run function for sync inplace.
>     diff --git a/test/validation/odp_init.c b/test/validation/odp_init.c
>     index 477aa12..5a17ce9 100644
>     --- a/test/validation/odp_init.c
>     +++ b/test/validation/odp_init.c
>     @@ -4,8 +4,8 @@
>       * SPDX-License-Identifier:     BSD-3-Clause
>       */
>
>     -#include "odp.h"
>     -#include "CUnit/Basic.h"
>     +#include <odp.h>
>     +#include <CUnit/Basic.h>
>
>      #define DEFAULT_MSG_POOL_SIZE  (4*1024*1024)
>      #define DEFAULT_MSG_SIZE       (8)
>     diff --git a/test/validation/odp_queue.c b/test/validation/odp_queue.c
>     index 2c8fe80..9f42b6f 100644
>     --- a/test/validation/odp_queue.c
>     +++ b/test/validation/odp_queue.c
>     @@ -4,8 +4,8 @@
>       * SPDX-License-Identifier:     BSD-3-Clause
>       */
>
>     -#include "odp.h"
>     -#include "odp_cunit_common.h"
>     +#include <odp.h>
>     +#include <odp_cunit_common.h>
>
>      #define MAX_BUFFER_QUEUE        (8)
>      #define MSG_POOL_SIZE           (4*1024*1024)
>     diff --git a/test/validation/odp_shm.c b/test/validation/odp_shm.c
>     index 8a991b1..63353db 100644
>     --- a/test/validation/odp_shm.c
>     +++ b/test/validation/odp_shm.c
>     @@ -4,8 +4,8 @@
>       * SPDX-License-Identifier:     BSD-3-Clause
>       */
>
>     -#include "odp.h"
>     -#include "odp_cunit_common.h"
>     +#include <odp.h>
>     +#include <odp_cunit_common.h>
>
>      #define ALIGE_SIZE  (128)
>      #define TESTNAME "cunit_test_shared_data"
>     --
>     2.1.0
>
>
>     _______________________________________________
>     lng-odp mailing list
>     lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>     http://lists.linaro.org/mailman/listinfo/lng-odp
>
>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/test/validation/common/odp_cunit_common.c b/test/validation/common/odp_cunit_common.c
index 14ba840..950bd18 100644
--- a/test/validation/common/odp_cunit_common.c
+++ b/test/validation/common/odp_cunit_common.c
@@ -12,8 +12,8 @@ 
 
 #include <string.h>
 #include <odp.h>
-#include "odp_cunit_common.h"
-#include "odph_linux.h"
+#include <odp_cunit_common.h>
+#include <odph_linux.h>
 /* Globals */
 static odph_linux_pthread_t thread_tbl[MAX_WORKERS];
 
diff --git a/test/validation/crypto/odp_crypto_test_async_inp.c b/test/validation/crypto/odp_crypto_test_async_inp.c
index 6b9a1b2..c140c0f 100644
--- a/test/validation/crypto/odp_crypto_test_async_inp.c
+++ b/test/validation/crypto/odp_crypto_test_async_inp.c
@@ -5,9 +5,8 @@ 
  */
 
 #include <odp.h>
-#include <odp_crypto.h>
-#include "CUnit/Basic.h"
-#include "CUnit/TestDB.h"
+#include <CUnit/Basic.h>
+#include <CUnit/TestDB.h>
 #include "test_vectors.h"
 
 /* Basic algorithm run function for async inplace mode.
diff --git a/test/validation/crypto/odp_crypto_test_rng.c b/test/validation/crypto/odp_crypto_test_rng.c
index 2898cb1..458f908 100644
--- a/test/validation/crypto/odp_crypto_test_rng.c
+++ b/test/validation/crypto/odp_crypto_test_rng.c
@@ -4,8 +4,8 @@ 
  * SPDX-License-Identifier:     BSD-3-Clause
  */
 #include <odp.h>
-#include "CUnit/Basic.h"
-#include "CUnit/TestDB.h"
+#include <CUnit/Basic.h>
+#include <CUnit/TestDB.h>
 #include "test_vectors_len.h"
 
 /*
diff --git a/test/validation/crypto/odp_crypto_test_sync_inp.c b/test/validation/crypto/odp_crypto_test_sync_inp.c
index 0d4360f..b63fd4d 100644
--- a/test/validation/crypto/odp_crypto_test_sync_inp.c
+++ b/test/validation/crypto/odp_crypto_test_sync_inp.c
@@ -1,7 +1,6 @@ 
 #include <odp.h>
-#include <odp_crypto.h>
-#include "CUnit/Basic.h"
-#include "CUnit/TestDB.h"
+#include <CUnit/Basic.h>
+#include <CUnit/TestDB.h>
 #include "test_vectors.h"
 
 /* Basic algorithm run function for sync inplace.
diff --git a/test/validation/odp_init.c b/test/validation/odp_init.c
index 477aa12..5a17ce9 100644
--- a/test/validation/odp_init.c
+++ b/test/validation/odp_init.c
@@ -4,8 +4,8 @@ 
  * SPDX-License-Identifier:     BSD-3-Clause
  */
 
-#include "odp.h"
-#include "CUnit/Basic.h"
+#include <odp.h>
+#include <CUnit/Basic.h>
 
 #define DEFAULT_MSG_POOL_SIZE	(4*1024*1024)
 #define DEFAULT_MSG_SIZE	(8)
diff --git a/test/validation/odp_queue.c b/test/validation/odp_queue.c
index 2c8fe80..9f42b6f 100644
--- a/test/validation/odp_queue.c
+++ b/test/validation/odp_queue.c
@@ -4,8 +4,8 @@ 
  * SPDX-License-Identifier:     BSD-3-Clause
  */
 
-#include "odp.h"
-#include "odp_cunit_common.h"
+#include <odp.h>
+#include <odp_cunit_common.h>
 
 #define MAX_BUFFER_QUEUE        (8)
 #define MSG_POOL_SIZE           (4*1024*1024)
diff --git a/test/validation/odp_shm.c b/test/validation/odp_shm.c
index 8a991b1..63353db 100644
--- a/test/validation/odp_shm.c
+++ b/test/validation/odp_shm.c
@@ -4,8 +4,8 @@ 
  * SPDX-License-Identifier:     BSD-3-Clause
  */
 
-#include "odp.h"
-#include "odp_cunit_common.h"
+#include <odp.h>
+#include <odp_cunit_common.h>
 
 #define ALIGE_SIZE  (128)
 #define TESTNAME "cunit_test_shared_data"