From: Steven Rostedt <rostedt@goodmis.org>
To: sameeruddin shaik <sameeruddin.shaik8@gmail.com>
Cc: Tzvetomir Stoyanov <tz.stoyanov@gmail.com>,
Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Subject: Re: Bug in Test code
Date: Sat, 10 Apr 2021 22:23:31 -0400 [thread overview]
Message-ID: <20210410222331.24d04032@oasis.local.home> (raw)
In-Reply-To: <6b3b676e-b57c-5d05-142e-9e85e61a6ce5@gmail.com>
On Mon, 12 Apr 2021 06:43:44 +0530
sameeruddin shaik <sameeruddin.shaik8@gmail.com> wrote:
> hi,
>
> Test: tracing options ...FAILED
> 1. tracefs-utest.c:746 - check_options_mask_empty(all)
> 2. tracefs-utest.c:747 - check_options_mask_empty(enabled)
> Test: custom system directory ...FAILED
> 1. tracefs-utest.c:746 - check_options_mask_empty(all)
> 2. tracefs-utest.c:747 - check_options_mask_empty(enabled)
> Test: ftrace marker ...trace-utest: ../nptl/pthread_mutex_lock.c:81:
> __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.
> Aborted (core dumped)
>
>
> Above tests are failing for me, what about you guys?
>
> Do i have to give any command line options when running the test ?
>
> I ran test like below
>
> -----------------------
>
> #./trace-utest
>
> -----------------------
>
Hi Sameer,
Thanks for the report. Yes, it is a bug in the tests. We did a last
minute change to have the options bitmask be stored in the instance and
it is immutable, but did not update the tests. The below patch should
fix it for you. Let us know if it does.
Thanks!
-- Steve
diff --git a/utest/tracefs-utest.c b/utest/tracefs-utest.c
index 1f48e6f..3407202 100644
--- a/utest/tracefs-utest.c
+++ b/utest/tracefs-utest.c
@@ -679,7 +679,7 @@ out:
return ret;
}
-static bool check_options_mask_empty(struct tracefs_options_mask *mask)
+static bool check_options_mask_empty(const struct tracefs_options_mask *mask)
{
int i;
@@ -692,8 +692,9 @@ static bool check_options_mask_empty(struct tracefs_options_mask *mask)
static void test_instance_tracing_options(struct tracefs_instance *instance)
{
- struct tracefs_options_mask *enabled;
- struct tracefs_options_mask *all, *all_copy;
+ const struct tracefs_options_mask *enabled;
+ const struct tracefs_options_mask *all_copy;
+ const struct tracefs_options_mask *all;
enum tracefs_option_id i = 1;
char file[PATH_MAX];
const char *name;
@@ -745,9 +746,6 @@ static void test_instance_tracing_options(struct tracefs_instance *instance)
}
CU_TEST(check_options_mask_empty(all));
CU_TEST(check_options_mask_empty(enabled));
-
- free(all);
- free(enabled);
}
static void test_tracing_options(void)
next prev parent reply other threads:[~2021-04-11 2:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-12 1:13 Bug in Test code sameeruddin shaik
2021-04-11 2:23 ` Steven Rostedt [this message]
2021-04-13 1:05 ` sameeruddin shaik
2021-04-12 4:32 ` Tzvetomir Stoyanov
2021-04-14 1:03 ` Sameeruddin Shaik
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=20210410222331.24d04032@oasis.local.home \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=sameeruddin.shaik8@gmail.com \
--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).