[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <655fca48-1d87-5ee2-4e8a-a94f34323c73@huawei-partners.com>
Date: Wed, 4 Sep 2024 15:56:29 +0300
From: Mikhail Ivanov <ivanov.mikhail1@...wei-partners.com>
To: <mic@...ikod.net>
CC: <willemdebruijn.kernel@...il.com>, <gnoack3000@...il.com>,
<linux-security-module@...r.kernel.org>, <netdev@...r.kernel.org>,
<netfilter-devel@...r.kernel.org>, <yusongping@...wei.com>,
<artem.kuzin@...wei.com>, <konstantin.meskhidze@...wei.com>
Subject: Re: [RFC PATCH v1 2/4] selftests/landlock: Implement per-syscall
microbenchmarks
8/16/2024 3:59 AM, Mikhail Ivanov wrote:> diff --git
a/tools/testing/selftests/landlock/bench/run.sh
b/tools/testing/selftests/landlock/bench/run.sh
> index afbcbb2ba6aa..582313f689ad 100755
> --- a/tools/testing/selftests/landlock/bench/run.sh
> +++ b/tools/testing/selftests/landlock/bench/run.sh
> @@ -237,14 +242,48 @@ print_overhead()
> done < $BASE_TRACE_DUMP
> }
>
> +print_overhead_workload()
> +{
> + print "\nTracing results\n"
> + print "===============\n"
> + print "cmd: "
> + print "%s " $WORKLOAD
> + print "\n"
> + print "syscalls: %s\n" $TRACED_SYSCALLS
> + print "access: %s\n" $ACCESS
> +
> + print_overhead
> +}
> +
> +print_overhead_microbench()
> +{
> + print "\nTracing results\n"
> + print "===============\n"
> + print "cmd: Microbenchmarks\n"
> + print "syscalls: %s\n" $TRACED_SYSCALLS
> +
> + print_overhead
> +}
> +
> +form_trace_cmd()
> +{
> + trace_cmd=$TRACE_CMD
> + trace_cmd+=" -e $1 -D $SANDBOX_DELAY -o $TMP_BUF"
> + trace_cmd+=" $TASKSET -c $CPU_AFFINITY"
> + trace_cmd+=" $NICE -n -19"
> +
> + echo $trace_cmd
> +}
> +
> run_traced_workload()
> {
> + trace_cmd=$(form_trace_cmd $TRACED_SYSCALLS)
> +
> if [ $1 == 0 ]; then
> output=$BASE_TRACE_DUMP
> - sandbox_cmd=
> else
> output=$LL_TRACE_DUMP
> - sandbox_cmd="$SANDBOXER_BIN $SANDBOXER_ARGS"
> + trace_cmd+="$SANDBOXER_BIN $SANDBOXER_ARGS"
Missing space:
trace_cmd+=" $SANDBOXER_BIN $SANDBOXER_ARGS"
> fi
>
> echo '' > $output
Powered by blists - more mailing lists