[PATCH] Beautify s390x sthyi data tail prints

Heiko Carstens heiko.carstens at de.ibm.com
Wed Dec 5 11:37:14 UTC 2018


On Fri, Nov 30, 2018 at 04:41:39PM +0100, Janosch Frank wrote:
> The test already expects a ", " before the print of struct
> padding. Let's add it to s390.c to make the output look a bit nicer and
> fix test runs on z/VM that have padding at the end of the STHYI structs.
> 
> Signed-off-by: Janosch Frank <frankja at linux.ibm.com>
> ---
>  s390.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/s390.c b/s390.c
> index 422c08d..a00c274 100644
> --- a/s390.c
> +++ b/s390.c
> @@ -472,10 +472,12 @@ decode_ebcdic(const char *ebcdic, char *ascii, size_t size)
>  	do { \
>  		if ((size_) > sizeof(*(hdr_)) && \
>  		    !is_filled((char *) ((hdr_) + 1), '\0', \
> -		               (size_) - sizeof(*(hdr_)))) \
> +		               (size_) - sizeof(*(hdr_)))) {	\
> +			tprints(", ");				   \
>  			print_quoted_string((char *) ((hdr_) + 1), \
>  					    (size_) - sizeof(*(hdr_)), \
>  					    QUOTE_FORCE_HEX); \
> +		} \

Thanks Janosch. This fixes the s390_sthyi-v selftest, which fails
without this patch when running on z/VM.

Relevant contents of s390_sthyi-v.gen.log:

--- exp	2018-12-05 12:25:51.275162995 +0100
+++ log	2018-12-05 12:25:51.275162995 +0100
@@ -1,5 +1,5 @@
-s390_sthyi(STHYI_FC_CP_IFL_CAP, {/* header */... infydifl=0, "\xfe\x00...
+s390_sthyi(STHYI_FC_CP_IFL_CAP, {/* header */... infydifl=0"\xfe\x00\...
 +++ exited with 0 +++
s390_sthyi-v.gen.test: failed test: ../../strace -e trace=s390_sthyi -a47 -v ../s390_sthyi-v output mismatch
FAIL s390_sthyi-v.gen.test (exit status: 1)



More information about the Strace-devel mailing list