diff mbox

[1/6] tests/tcg/test_path.c: include utils/bufferiszero.c

Message ID 20170802201512.29142-2-crosa@redhat.com
State New
Headers show

Commit Message

Cleber Rosa Aug. 2, 2017, 8:15 p.m. UTC
Which contains one specific function used by iov.c.

Without this, "make -C tests/tcg test_path" (and consequently
"make -C tests/tcg" or simply "make test") fails quite early.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
 tests/tcg/test_path.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Philippe Mathieu-Daudé Aug. 2, 2017, 9:36 p.m. UTC | #1
Hi Cleber,

On 08/02/2017 05:15 PM, Cleber Rosa wrote:
> Which contains one specific function used by iov.c.
> 
> Without this, "make -C tests/tcg test_path" (and consequently
> "make -C tests/tcg" or simply "make test") fails quite early.
> 
> Signed-off-by: Cleber Rosa <crosa@redhat.com>
> ---
>   tests/tcg/test_path.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/tests/tcg/test_path.c b/tests/tcg/test_path.c
> index 1c29bce..74dbdaf 100644
> --- a/tests/tcg/test_path.c
> +++ b/tests/tcg/test_path.c
> @@ -3,6 +3,7 @@
>   #include "util/cutils.c"
>   #include "util/hexdump.c"
>   #include "util/iov.c"
> +#include "util/bufferiszero.c"

This fixes the build, however why not take this opportunity to fix it 
through the Makefile instead of including .c?

Regards,

Phil.

>   #include "util/path.c"
>   #include "util/qemu-timer-common.c"
>   #include <stdarg.h>
>
Cleber Rosa Aug. 2, 2017, 10:24 p.m. UTC | #2
On 08/02/2017 05:36 PM, Philippe Mathieu-Daudé wrote:
> Hi Cleber,
> 
> On 08/02/2017 05:15 PM, Cleber Rosa wrote:
>> Which contains one specific function used by iov.c.
>>
>> Without this, "make -C tests/tcg test_path" (and consequently
>> "make -C tests/tcg" or simply "make test") fails quite early.
>>
>> Signed-off-by: Cleber Rosa <crosa@redhat.com>
>> ---
>>   tests/tcg/test_path.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/tests/tcg/test_path.c b/tests/tcg/test_path.c
>> index 1c29bce..74dbdaf 100644
>> --- a/tests/tcg/test_path.c
>> +++ b/tests/tcg/test_path.c
>> @@ -3,6 +3,7 @@
>>   #include "util/cutils.c"
>>   #include "util/hexdump.c"
>>   #include "util/iov.c"
>> +#include "util/bufferiszero.c"
> 
> This fixes the build, however why not take this opportunity to fix it
> through the Makefile instead of including .c?
> 

Do you mean for all of the .c includes?  I just took a baby step, which
seemed more consistent with the mission (get it to build), without
changing a lot.

> Regards,
> 
> Phil.
> 

Thanks for the review!
- Cleber.

>>   #include "util/path.c"
>>   #include "util/qemu-timer-common.c"
>>   #include <stdarg.h>
>>
Cleber Rosa Aug. 17, 2017, 1:26 p.m. UTC | #3
On 08/02/2017 06:24 PM, Cleber Rosa wrote:
> 
> 
> On 08/02/2017 05:36 PM, Philippe Mathieu-Daudé wrote:
>> Hi Cleber,
>>
>> On 08/02/2017 05:15 PM, Cleber Rosa wrote:
>>> Which contains one specific function used by iov.c.
>>>
>>> Without this, "make -C tests/tcg test_path" (and consequently
>>> "make -C tests/tcg" or simply "make test") fails quite early.
>>>
>>> Signed-off-by: Cleber Rosa <crosa@redhat.com>
>>> ---
>>>   tests/tcg/test_path.c | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/tests/tcg/test_path.c b/tests/tcg/test_path.c
>>> index 1c29bce..74dbdaf 100644
>>> --- a/tests/tcg/test_path.c
>>> +++ b/tests/tcg/test_path.c
>>> @@ -3,6 +3,7 @@
>>>   #include "util/cutils.c"
>>>   #include "util/hexdump.c"
>>>   #include "util/iov.c"
>>> +#include "util/bufferiszero.c"
>>
>> This fixes the build, however why not take this opportunity to fix it
>> through the Makefile instead of including .c?
>>
> 
> Do you mean for all of the .c includes?  I just took a baby step, which
> seemed more consistent with the mission (get it to build), without
> changing a lot.
> 

Hi Phil,

Can you clarify what you meant here?

Thanks!
diff mbox

Patch

diff --git a/tests/tcg/test_path.c b/tests/tcg/test_path.c
index 1c29bce..74dbdaf 100644
--- a/tests/tcg/test_path.c
+++ b/tests/tcg/test_path.c
@@ -3,6 +3,7 @@ 
 #include "util/cutils.c"
 #include "util/hexdump.c"
 #include "util/iov.c"
+#include "util/bufferiszero.c"
 #include "util/path.c"
 #include "util/qemu-timer-common.c"
 #include <stdarg.h>