* [PATCH] testsuite: fix parsing of tags used in the testcases
@ 2020-12-11 13:06 Luc Van Oostenryck
2020-12-11 16:39 ` Ramsay Jones
0 siblings, 1 reply; 3+ messages in thread
From: Luc Van Oostenryck @ 2020-12-11 13:06 UTC (permalink / raw)
To: linux-sparse; +Cc: Luc Van Oostenryck
In testcases' tags, if a value contains 'check-' then this
value will be used as the tagname instead of the value.
Fix this by adding a bit more context in the regexp used for parsing these.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
validation/test-suite | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/validation/test-suite b/validation/test-suite
index 6935d40cee51..1b05c75e9f74 100755
--- a/validation/test-suite
+++ b/validation/test-suite
@@ -84,8 +84,8 @@ get_tag_value()
check_assert=""
check_cpp_if=""
- lines=$(grep 'check-[a-z-]*' $1 | \
- sed -e 's/^.*\(check-[a-z-]*:*\) *\(.*\)$/\1 \2/')
+ lines=$(grep '^ \* check-[a-z-]*' $1 | \
+ sed -e 's/^ \* \(check-[a-z-]*:*\) *\(.*\)$/\1 \2/')
while read tag val; do
#echo "-> tag: '$tag'"
--
2.29.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] testsuite: fix parsing of tags used in the testcases
2020-12-11 13:06 [PATCH] testsuite: fix parsing of tags used in the testcases Luc Van Oostenryck
@ 2020-12-11 16:39 ` Ramsay Jones
2020-12-11 20:14 ` Luc Van Oostenryck
0 siblings, 1 reply; 3+ messages in thread
From: Ramsay Jones @ 2020-12-11 16:39 UTC (permalink / raw)
To: Luc Van Oostenryck, linux-sparse
On 11/12/2020 13:06, Luc Van Oostenryck wrote:
> In testcases' tags, if a value contains 'check-' then this
> value will be used as the tagname instead of the value.
>
> Fix this by adding a bit more context in the regexp used for parsing these.
>
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
> ---
> validation/test-suite | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/validation/test-suite b/validation/test-suite
> index 6935d40cee51..1b05c75e9f74 100755
> --- a/validation/test-suite
> +++ b/validation/test-suite
> @@ -84,8 +84,8 @@ get_tag_value()
> check_assert=""
> check_cpp_if=""
>
> - lines=$(grep 'check-[a-z-]*' $1 | \
> - sed -e 's/^.*\(check-[a-z-]*:*\) *\(.*\)$/\1 \2/')
> + lines=$(grep '^ \* check-[a-z-]*' $1 | \
> + sed -e 's/^ \* \(check-[a-z-]*:*\) *\(.*\)$/\1 \2/')
>
> while read tag val; do
> #echo "-> tag: '$tag'"
>
I needed to apply this to get the testsuite to pass on tonights
'fetch'. However, my immediate thought was 'what if you had more
than one space before/after the '*'?
It just so happens that I had a couple of 'warning: <file>: test unhandled'
after applying the patch (for asm-empty-clobber.c and asm-goto-labels.c)
where they had two spaces after the '*', so ... :-D
ATB,
Ramsay Jones
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] testsuite: fix parsing of tags used in the testcases
2020-12-11 16:39 ` Ramsay Jones
@ 2020-12-11 20:14 ` Luc Van Oostenryck
0 siblings, 0 replies; 3+ messages in thread
From: Luc Van Oostenryck @ 2020-12-11 20:14 UTC (permalink / raw)
To: Ramsay Jones; +Cc: linux-sparse
On Fri, Dec 11, 2020 at 04:39:15PM +0000, Ramsay Jones wrote:
>
> I needed to apply this to get the testsuite to pass on tonights
> 'fetch'. However, my immediate thought was 'what if you had more
> than one space before/after the '*'?
>
> It just so happens that I had a couple of 'warning: <file>: test unhandled'
> after applying the patch (for asm-empty-clobber.c and asm-goto-labels.c)
> where they had two spaces after the '*', so ... :-D
Yes, I messed up twice here :(
Thanks for noticing.
-- Luc
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-11 21:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-11 13:06 [PATCH] testsuite: fix parsing of tags used in the testcases Luc Van Oostenryck
2020-12-11 16:39 ` Ramsay Jones
2020-12-11 20:14 ` Luc Van Oostenryck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox