From: Steven Rostedt <rostedt@goodmis.org>
To: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
Cc: linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] libtracefs: Unit test for tracefs_instance_reset()
Date: Mon, 29 May 2023 08:05:52 -0400 [thread overview]
Message-ID: <20230529080552.2dbfdc9f@rorschach.local.home> (raw)
In-Reply-To: <20230426041124.69544-4-tz.stoyanov@gmail.com>
On Wed, 26 Apr 2023 07:11:24 +0300
"Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com> wrote:
> +static void test_instance_reset(void)
> +{
> + struct tracefs_instance *instance = NULL;
> + const char *name = get_rand_str();
> +
> + CU_TEST(tracefs_instance_exists(name) == false);
> + instance = tracefs_instance_create(name);
> + CU_TEST(instance != NULL);
> +
> + CU_TEST(test_instance_check_default_state(instance) == true);
> +
> + CU_TEST(tracefs_tracer_set(instance, TRACEFS_TRACER_HWLAT) == 0);
> + CU_TEST(tracefs_event_enable(instance, "bridge", "fdb_delete") == 0);
Was there a reason why you picked HWLAT tracer and the fdb_delete trace
event? Neither exist in my test machine setup, so this test
automatically fails.
-- Steve
> + CU_TEST(tracefs_instance_file_write(instance, "set_ftrace_pid", "5") > 0);
> + CU_TEST(tracefs_instance_file_write(instance, "trace_clock", "global") > 0);
> + CU_TEST(tracefs_instance_file_write(instance, "set_event_pid", "5") > 0);
> + CU_TEST(tracefs_instance_file_write(instance, "set_ftrace_filter",
> + "schedule:stacktrace") > 0);
> + CU_TEST(tracefs_instance_file_write(instance, "set_ftrace_notrace",
> + "schedule:stacktrace") > 0);
> + CU_TEST(tracefs_instance_file_write(instance, "tracing_cpumask", "0f") > 0);
> + CU_TEST(tracefs_instance_file_write(instance, "events/syscalls/sys_exit_read/trigger",
> + "enable_event:kmem:kmalloc:1") > 0);
> + CU_TEST(tracefs_instance_file_write(instance, "events/bridge/fdb_delete/filter",
> + "common_pid == 5") > 0);
> +
> + CU_TEST(test_instance_check_default_state(instance) == false);
> +
> + tracefs_instance_reset(instance);
> + CU_TEST(test_instance_check_default_state(instance) == true);
> +
> + CU_TEST(tracefs_instance_destroy(instance) == 0);
> + tracefs_instance_free(instance);
> +}
> +
next prev parent reply other threads:[~2023-05-29 12:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-26 4:11 [PATCH v2 0/3] libtracefs: Introduce new API to reset ftrace instance Tzvetomir Stoyanov (VMware)
2023-04-26 4:11 ` [PATCH v2 1/3] libtracefs: New " Tzvetomir Stoyanov (VMware)
2023-04-26 4:11 ` [PATCH v2 2/3] libtracefs: Documentation for tracefs_instance_reset() Tzvetomir Stoyanov (VMware)
2023-04-26 4:11 ` [PATCH v2 3/3] libtracefs: Unit test " Tzvetomir Stoyanov (VMware)
2023-05-29 12:05 ` Steven Rostedt [this message]
2023-05-30 8:19 ` Tzvetomir Stoyanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230529080552.2dbfdc9f@rorschach.local.home \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=tz.stoyanov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).