From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] Convert ptrace01.c to new library
Date: Thu, 3 Oct 2019 12:39:44 +0200 [thread overview]
Message-ID: <20191003103944.GA1858@rei> (raw)
In-Reply-To: <ECADFF3FD767C149AD96A924E7EA6EAF977BF7B1@USCULXMSG01.am.sony.com>
Hi!
> > /**********************************************************
> > - *
> > - * TEST IDENTIFIER : ptrace01
> > - *
> > - * EXECUTED BY : anyone
> > - *
> > - * TEST TITLE : functionality test for ptrace(2)
> > - *
> > - * TEST CASE TOTAL : 2
> > - *
> > - * AUTHOR : Saji Kumar.V.R <saji.kumar@wipro.com>
> > - *
> > - * SIGNALS
> > - * Uses SIGUSR1 to pause before test if option set.
> > - * (See the parse_opts(3) man page).
> > - *
> > - * DESCRIPTION
> > + * DESCRIPTION
> > * This test case tests the functionality of ptrace() for
> > * PTRACE_TRACEME & PTRACE_KILL requests.
> > * Here, we fork a child & the child does ptrace(PTRACE_TRACEME, ...).
> > @@ -44,243 +21,114 @@
> > * In both cases, child should stop & notify parent on reception
> > * of SIGUSR2
> > *
> > - * Setup:
> > - * Setup signal handling.
> > - * Pause for SIGUSR1 if option specified.
> > - *
> > - * Test:
> > - * Loop if the proper options are given.
> > - * setup signal handler for SIGUSR2 signal
> > - * fork a child
> > - *
> > - * CHILD:
> > - * setup signal handler for SIGUSR2 signal
> > - * call ptrace() with PTRACE_TRACEME request
> > - * send SIGUSR2 signal to self
> > - * PARENT:
> > - * wait() for child.
> > - * if parent is notified when child gets a signal through wait(),
> > - * then
> > - * do ptrace(PTRACE_KILL, ..) on child
> > - * wait() for child to finish,
> > - * if child exited abnormaly,
> > - * TEST passed
> > - * else
> > - * TEST failed
> > - * else
> > - * TEST failed
> > - *
> > - * Cleanup:
> > - * Print errno log and/or timing stats if options given
> > - *
> > - * USAGE: <for command-line>
> > - * ptrace01 [-c n] [-e] [-i n] [-I x] [-P x] [-t] [-h] [-f] [-p]
> > - * where, -c n : Run n copies concurrently.
> > - * -e : Turn on errno logging.
> > - * -h : Show help screen
> > - * -f : Turn off functional testing
> > - * -i n : Execute test n times.
> > - * -I x : Execute test for x seconds.
> > - * -p : Pause for SIGUSR1 before starting
> > - * -P x : Pause for x seconds between iterations.
> > - * -t : Turn on syscall timing.
> > - *
> > -
> > **********************************************************
> > ******/
> > + */
>
> It looks like the old comment had some nicely structured meta-data. I'm not
> familiar with the process for converting to the new library. Is it intentional to
> eliminate this meta-data? (This is more of a question for the LTP leaders
> than for Jorik).
Well most of the old data is unfortunatelly garbage, for instance it
lists the USAGE lists flags implemented in the test library, repeating
these in each test is actually doing a harm. So we tend to keep carefuly
selected subset.
I suspect that there was some kind of silly template that had to be
filled up in order to get test accepted in the old days, which resulted
in long and mostly useless comments on the top of the testcases.
> I know that Cyril is working on a new meta-data system. If this meta-data is eliminated
> now, does it make adding it back into the new system harder?
>
> Personally, I find it useful to see the pseudo-code outline when I'm debugging a
> test. So I hate to see those be eliminated. But maybe those are hard to trust
> as they tend to not be maintained along with the code?
Well in this case the patch actually keeps the test description, which
is the same as the pseudo-code but in a paragraph of a text, so as far
as I can tell it's fine.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2019-10-03 10:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-01 7:01 [LTP] [PATCH] Convert ptrace01.c to new library Jorik Cronenberg
2019-10-01 20:14 ` Tim.Bird
2019-10-03 10:39 ` Cyril Hrubis [this message]
2019-10-08 10:47 ` Cyril Hrubis
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=20191003103944.GA1858@rei \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/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