[CRIU] [PATCH] zdtm/inotify_system_nodel.c: need to print mask of events for UNKNOWN event

Andrew Vagin avagin at parallels.com
Mon Nov 17 03:51:48 PST 2014


Acked-by: Andrew Vagin <avagin at parallels.com>

On Mon, Nov 17, 2014 at 12:51:44PM +0400, vkonyashkin wrote:
> Need to print a mask of events for UNKNOWN event in inotify_system_nodel.c
> and inotify_system.c tests. The current error message in this case is too vague:
> inotify_system_nodel.c:266: got unexpected event UNKNOWN
> 
> Signed-off-by: vkonyashkin <vkonyashkin at parallels.com>
> ---
>  test/zdtm/live/static/inotify_system.c       | 4 ++--
>  test/zdtm/live/static/inotify_system_nodel.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/test/zdtm/live/static/inotify_system.c b/test/zdtm/live/static/inotify_system.c
> index be5ee22..6a0074c 100644
> --- a/test/zdtm/live/static/inotify_system.c
> +++ b/test/zdtm/live/static/inotify_system.c
> @@ -262,8 +262,8 @@ int errors(int exp_len, int len, char *etalon_buf, char *buf) {
>  			exp_event = (struct inotify_event *) &etalon_buf[marker];
>  		else {
>  			if (!harmless(event->mask)) {
> -				fail("got unexpected event %s\n",
> -						handle_event(event->mask));
> +				fail("got unexpected event %s (%x mask)\n",
> +					handle_event(event->mask), event->mask);
>  				error++;
>  			}
>  			goto next_event;
> diff --git a/test/zdtm/live/static/inotify_system_nodel.c b/test/zdtm/live/static/inotify_system_nodel.c
> index be5ee22..6a0074c 100644
> --- a/test/zdtm/live/static/inotify_system_nodel.c
> +++ b/test/zdtm/live/static/inotify_system_nodel.c
> @@ -262,8 +262,8 @@ int errors(int exp_len, int len, char *etalon_buf, char *buf) {
>  			exp_event = (struct inotify_event *) &etalon_buf[marker];
>  		else {
>  			if (!harmless(event->mask)) {
> -				fail("got unexpected event %s\n",
> -						handle_event(event->mask));
> +				fail("got unexpected event %s (%x mask)\n",
> +					handle_event(event->mask), event->mask);
>  				error++;
>  			}
>  			goto next_event;
> -- 
> 1.7.11.7
> 


More information about the CRIU mailing list