* [LTP] TST_BRK_SUPPORTS_ONLY_TCONF_TBROK() error message
@ 2019-04-30 14:43 Petr Vorel
2019-04-30 14:46 ` Petr Vorel
2019-04-30 14:51 ` Jan Stancek
0 siblings, 2 replies; 3+ messages in thread
From: Petr Vorel @ 2019-04-30 14:43 UTC (permalink / raw)
To: ltp
Hi Jan,
your commit 0738e3753 ("lib: build check parameters for tst_brk()") added check
for invalid types. I guess we didn't find a way how to print meaningful error
message e.g. "tst_brk(): invalid type, please use TBROK/TCONF/TFAIL" as Xiao
suggested [1]. Because error message on tst_brk(TINFO, "foo") is a bit
confusing:
../../../../include/tst_common.h:69:25: error: size of unnamed array is negative
do { ((void)sizeof(char[1 - 2 * !!(condition)])); } while (0)
(this is not related to current release effort)
Kind regards,
Petr
[1] https://patchwork.ozlabs.org/comment/2026378/
^ permalink raw reply [flat|nested] 3+ messages in thread* [LTP] TST_BRK_SUPPORTS_ONLY_TCONF_TBROK() error message
2019-04-30 14:43 [LTP] TST_BRK_SUPPORTS_ONLY_TCONF_TBROK() error message Petr Vorel
@ 2019-04-30 14:46 ` Petr Vorel
2019-04-30 14:51 ` Jan Stancek
1 sibling, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2019-04-30 14:46 UTC (permalink / raw)
To: ltp
Hi Jan,
> your commit 0738e3753 ("lib: build check parameters for tst_brk()") added check
> for invalid types. I guess we didn't find a way how to print meaningful error
> message e.g. "tst_brk(): invalid type, please use TBROK/TCONF/TFAIL" as Xiao
> suggested [1]. Because error message on tst_brk(TINFO, "foo") is a bit
> confusing:
At least on gcc 8.3.
> ../../../../include/tst_common.h:69:25: error: size of unnamed array is negative
> do { ((void)sizeof(char[1 - 2 * !!(condition)])); } while (0)
Kind regards,
Petr
^ permalink raw reply [flat|nested] 3+ messages in thread* [LTP] TST_BRK_SUPPORTS_ONLY_TCONF_TBROK() error message
2019-04-30 14:43 [LTP] TST_BRK_SUPPORTS_ONLY_TCONF_TBROK() error message Petr Vorel
2019-04-30 14:46 ` Petr Vorel
@ 2019-04-30 14:51 ` Jan Stancek
1 sibling, 0 replies; 3+ messages in thread
From: Jan Stancek @ 2019-04-30 14:51 UTC (permalink / raw)
To: ltp
----- Original Message -----
> Hi Jan,
>
> your commit 0738e3753 ("lib: build check parameters for tst_brk()") added
> check
> for invalid types. I guess we didn't find a way how to print meaningful error
Correct - at least not something that would work easily across all
compilers types/versions.
> message e.g. "tst_brk(): invalid type, please use TBROK/TCONF/TFAIL" as Xiao
> suggested [1]. Because error message on tst_brk(TINFO, "foo") is a bit
> confusing:
>
> ../../../../include/tst_common.h:69:25: error: size of unnamed array is
> negative
> do { ((void)sizeof(char[1 - 2 * !!(condition)])); } while (0)
>
> (this is not related to current release effort)
>
> Kind regards,
> Petr
>
> [1] https://patchwork.ozlabs.org/comment/2026378/
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-30 14:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-30 14:43 [LTP] TST_BRK_SUPPORTS_ONLY_TCONF_TBROK() error message Petr Vorel
2019-04-30 14:46 ` Petr Vorel
2019-04-30 14:51 ` Jan Stancek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox