[PATCH v1] Changing print_dev_t to print raw device number if -Xraw

Dmitry V. Levin ldv at altlinux.org
Tue Dec 11 00:46:10 UTC 2018


On Sat, Dec 08, 2018 at 05:57:45PM -0800, shankarapailoor wrote:
> From 56db93a04ece46a98038f7aa7c2f33eb93bd7c2c Mon Sep 17 00:00:00 2001
> From: Shankara Pailoor <shankarapailoor at gmail.com>
> Date: Sat, 8 Dec 2018 14:12:42 -0800
> Subject: [PATCH v2] print_dev_t: print raw device value under -Xraw instead of
>  makedev(..) tests/btrfs.c: Add handling of -Xraw and -Xverbose flags
>  tests/xstat.c: Likewise tests/trace_fstat.in: Likewise
>  tests/trace_stat_like.in: Likewise tests/fstat-Xraw.c: New file
>  tests/fstat-Xverbose.c: Likewise tests/fstat-Xabbrev.c: Likewise tests/fstat64-Xraw.c: Likewise
>  tests/fstat64-Xverbose.c: Likewise tests/fstat64-Xabbrev.c: Likewise
>  tests/pure_executables.list: Add fstat-Xraw, fstat-Xabbrev, fstat-Xverbose,
>  fstat64-Xraw, fstat64-Xverbose, fstat64-Xabbrev. tests/.gitignore: Likewise
>  tests/gen_tests.in: New tests

What is this? :)

> --- a/tests/.gitignore
> +++ b/tests/.gitignore
> @@ -89,7 +89,13 @@ finit_module
>  flock
>  fork-f
>  fstat
> +fstat-Xraw
> +fstat-Xverbose
> +fstat-Xabbrev
>  fstat64
> +fstat64-Xraw
> +fstat64-Xverbose
> +fstat64-Xabbrev
>  fstatat64
>  fstatfs
>  fstatfs64

Please keep the list sorted.

> --- a/tests/btrfs.c
> +++ b/tests/btrfs.c
> @@ -180,13 +180,33 @@ sprint_xlat_(uint32_t val, const char *xlat)
>  		if ((unsigned) ret >= sizeof(str))
>  			error_msg_and_fail("sprint_ioc(%#x, %s): buffer "
>  					   "overflow", val, xlat);
> -
>  		return str;
>  	}
> -
>  	return xlat;
>  }

No need to change sprint_xlat_.

> diff --git a/tests/gen_tests.in b/tests/gen_tests.in
> index 7374add8..9a0b26f2 100644
> --- a/tests/gen_tests.in
> +++ b/tests/gen_tests.in
> @@ -89,7 +89,13 @@ finit_module	-a25
>  flock	-a19
>  fork-f	-a26 -qq -f -e signal=none -e trace=chdir
>  fstat	-a15 -v -P stat.sample
> +fstat-Xraw -a15 -v -Xraw -P stat.sample -e trace=fstat
> +fstat-Xverbose -a15 -v -Xverbose -P stat.sample -e trace=fstat
> +fstat-Xabbrev -a15 -v -Xabbrev -P stat.sample -e trace=fstat
>  fstat64	-a17 -v -P stat.sample
> +fstat64-Xraw -a17 -Xraw -v -P stat.sample
> +fstat64-Xverbose -a17 -Xverbose -v -P stat.sample
> +fstat64-Xabbrev -a17 -Xabbrev -v -P stat.sample
>  fstatat64	-a32 -v -P stat.sample -P /dev/full
>  fstatfs	-a18
>  fstatfs64	-a24

Please keep the list sorted.

> diff --git a/tests/pure_executables.list b/tests/pure_executables.list
> index a4e9020a..746c0949 100755
> --- a/tests/pure_executables.list
> +++ b/tests/pure_executables.list
> @@ -65,7 +65,13 @@ file_ioctl
>  finit_module
>  flock
>  fstat
> +fstat-Xraw
> +fstat-Xverbose
> +fstat-Xabbrev
>  fstat64
> +fstat64-Xraw
> +fstat64-Xverbose
> +fstat64-Xabbrev
>  fstatat64
>  fstatfs
>  fstatfs64

Please keep the list sorted.

> diff --git a/tests/trace_fstat.in b/tests/trace_fstat.in
> index 34cfa7e6..a6b80213 100644
> --- a/tests/trace_fstat.in
> +++ b/tests/trace_fstat.in
> @@ -1,5 +1,11 @@
>  fstat	-a15
> +fstat-Xraw -a15 -Xraw
> +fstat-Xverbose -a15 -Xverbose
> +fstat-Xabbrev -a15 -Xabbrev
>  fstat64	-a17
> +fstat64-Xraw	-a17 -Xraw
> +fstat64-Xverbose	-a17 -Xverbose
> +fstat64-Xabbrev	-a17 -Xabbrev
>  fstatat64	-a32
>  newfstatat	-a32
>  oldfstat	-a21

Please keep the list sorted.

> diff --git a/tests/trace_stat_like.in b/tests/trace_stat_like.in
> index 22bd7f27..c4dc880b 100644
> --- a/tests/trace_stat_like.in
> +++ b/tests/trace_stat_like.in
> @@ -1,5 +1,11 @@
>  fstat	-a15
> +fstat-Xraw	-a15 -Xraw
> +fstat-Xverbose	-a15 -Xverbose
> +fstat-Xabbrev	-a15 -Xabbrev
>  fstat64	-a17
> +fstat64-Xraw	-a17 -Xraw
> +fstat64-Xverbose	-a17 -Xverbose
> +fstat64-Xabbrev	-a17 -Xabbrev
>  fstatat64	-a32
>  lstat	-a32
>  lstat64	-a32

Please keep the list sorted.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20181211/43885325/attachment.bin>


More information about the Strace-devel mailing list