lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200529233845.25d975c6b23d62da1dfb75cb@kernel.org>
Date:   Fri, 29 May 2020 23:38:45 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Tom Zanussi <zanussi@...nel.org>
Cc:     rostedt@...dmis.org, mhiramat@...nel.org,
        skhan@...uxfoundation.org, linux-kernel@...r.kernel.org,
        linux-rt-users@...r.kernel.org
Subject: Re: [PATCH v2 2/2] selftests/ftrace: Distinguish between hist and
 synthetic event checks

Hi Tom,

On Thu, 28 May 2020 14:32:38 -0500
Tom Zanussi <zanussi@...nel.org> wrote:

> With synthetic events now a separate config item as a result of
> 'tracing: Move synthetic events to a separate file', tests that use
> both need to explicitly check for hist trigger support rather than
> relying on hist triggers to pull in synthetic events.
> 
> Add an additional hist trigger check to all the trigger tests that now
> require it, otherwise they'll fail if synthetic events but not hist
> triggers are enabled.

OK, this looks good to me. And if you don't want to repeat it,
you can also put the check function into the test.d/functions.

Acked-by: Masami Hiramatsu <mhiramat@...nel.org>

Thank you,

> 
> Signed-off-by: Tom Zanussi <zanussi@...nel.org>
> ---
>  .../trigger/inter-event/trigger-field-variable-support.tc    | 5 +++++
>  .../trigger/inter-event/trigger-inter-event-combined-hist.tc | 5 +++++
>  .../trigger/inter-event/trigger-multi-actions-accept.tc      | 5 +++++
>  .../trigger/inter-event/trigger-onmatch-action-hist.tc       | 5 +++++
>  .../trigger/inter-event/trigger-onmatch-onmax-action-hist.tc | 5 +++++
>  .../test.d/trigger/inter-event/trigger-onmax-action-hist.tc  | 5 +++++
>  .../trigger/inter-event/trigger-snapshot-action-hist.tc      | 5 +++++
>  .../test.d/trigger/inter-event/trigger-trace-action-hist.tc  | 5 +++++
>  8 files changed, 40 insertions(+)
> 
> diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-field-variable-support.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-field-variable-support.tc
> index 77be6e1f6e7b..e232059a8ab2 100644
> --- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-field-variable-support.tc
> +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-field-variable-support.tc
> @@ -17,6 +17,11 @@ if [ ! -f synthetic_events ]; then
>      exit_unsupported
>  fi
>  
> +if [ ! -f events/sched/sched_process_fork/hist ]; then
> +    echo "hist trigger is not supported"
> +    exit_unsupported
> +fi
> +
>  echo "Test field variable support"
>  
>  echo 'wakeup_latency u64 lat; pid_t pid; int prio; char comm[16]' > synthetic_events
> diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-inter-event-combined-hist.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-inter-event-combined-hist.tc
> index f3eb8aacec0e..07cfcb8157b6 100644
> --- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-inter-event-combined-hist.tc
> +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-inter-event-combined-hist.tc
> @@ -17,6 +17,11 @@ if [ ! -f synthetic_events ]; then
>      exit_unsupported
>  fi
>  
> +if [ ! -f events/sched/sched_process_fork/hist ]; then
> +    echo "hist trigger is not supported"
> +    exit_unsupported
> +fi
> +
>  echo "Test create synthetic event"
>  
>  echo 'waking_latency  u64 lat pid_t pid' > synthetic_events
> diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-multi-actions-accept.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-multi-actions-accept.tc
> index d281f056f980..73e413c2ca26 100644
> --- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-multi-actions-accept.tc
> +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-multi-actions-accept.tc
> @@ -17,6 +17,11 @@ if [ ! -f synthetic_events ]; then
>      exit_unsupported
>  fi
>  
> +if [ ! -f events/sched/sched_process_fork/hist ]; then
> +    echo "hist trigger is not supported"
> +    exit_unsupported
> +fi
> +
>  echo "Test multiple actions on hist trigger"
>  echo 'wakeup_latency u64 lat; pid_t pid' >> synthetic_events
>  TRIGGER1=events/sched/sched_wakeup/trigger
> diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmatch-action-hist.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmatch-action-hist.tc
> index a708f0e7858a..ebe0ad827f9f 100644
> --- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmatch-action-hist.tc
> +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmatch-action-hist.tc
> @@ -17,6 +17,11 @@ if [ ! -f synthetic_events ]; then
>      exit_unsupported
>  fi
>  
> +if [ ! -f events/sched/sched_process_fork/hist ]; then
> +    echo "hist trigger is not supported"
> +    exit_unsupported
> +fi
> +
>  echo "Test create synthetic event"
>  
>  echo 'wakeup_latency  u64 lat pid_t pid char comm[16]' > synthetic_events
> diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmatch-onmax-action-hist.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmatch-onmax-action-hist.tc
> index dfce6932d8be..2a2ef767249e 100644
> --- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmatch-onmax-action-hist.tc
> +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmatch-onmax-action-hist.tc
> @@ -17,6 +17,11 @@ if [ ! -f synthetic_events ]; then
>      exit_unsupported
>  fi
>  
> +if [ ! -f events/sched/sched_process_fork/hist ]; then
> +    echo "hist trigger is not supported"
> +    exit_unsupported
> +fi
> +
>  echo "Test create synthetic event"
>  
>  echo 'wakeup_latency  u64 lat pid_t pid char comm[16]' > synthetic_events
> diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmax-action-hist.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmax-action-hist.tc
> index 0035995c2194..98d73bfb0296 100644
> --- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmax-action-hist.tc
> +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-onmax-action-hist.tc
> @@ -17,6 +17,11 @@ if [ ! -f synthetic_events ]; then
>      exit_unsupported
>  fi
>  
> +if [ ! -f events/sched/sched_process_fork/hist ]; then
> +    echo "hist trigger is not supported"
> +    exit_unsupported
> +fi
> +
>  echo "Test create synthetic event"
>  
>  echo 'wakeup_latency  u64 lat pid_t pid char comm[16]' > synthetic_events
> diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-snapshot-action-hist.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-snapshot-action-hist.tc
> index f546c1b66a9b..01b01b9c4e07 100644
> --- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-snapshot-action-hist.tc
> +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-snapshot-action-hist.tc
> @@ -12,6 +12,11 @@ if [ ! -f set_event ]; then
>      exit_unsupported
>  fi
>  
> +if [ ! -f events/sched/sched_process_fork/hist ]; then
> +    echo "hist trigger is not supported"
> +    exit_unsupported
> +fi
> +
>  if [ ! -f snapshot ]; then
>      echo "snapshot is not supported"
>      exit_unsupported
> diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-trace-action-hist.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-trace-action-hist.tc
> index 8021d60aafec..c3baa486aeb4 100644
> --- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-trace-action-hist.tc
> +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-trace-action-hist.tc
> @@ -17,6 +17,11 @@ if [ ! -f synthetic_events ]; then
>      exit_unsupported
>  fi
>  
> +if [ ! -f events/sched/sched_process_fork/hist ]; then
> +    echo "hist trigger is not supported"
> +    exit_unsupported
> +fi
> +
>  grep -q "trace(<synthetic_event>" README || exit_unsupported # version issue
>  
>  echo "Test create synthetic event"
> -- 
> 2.17.1
> 


-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ