From: Yao Qi <yao@codesourcery.com>
To: Doug Evans <dje@google.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [RFC 3/3] Test on solib load and unload
Date: Sun, 22 Sep 2013 06:25:00 -0000 [thread overview]
Message-ID: <523E8D0A.2050205@codesourcery.com> (raw)
In-Reply-To: <21051.32359.845429.92304@ruffy.mtv.corp.google.com>
On 09/20/2013 06:44 AM, Doug Evans wrote:
> > +standard_testfile .c
> > +set executable $testfile
> > +set expfile $testfile.exp
> > +
> > +# make check RUNTESTFLAGS='solib.exp SOLIB_NUMBER=1024'
>
> SOLIB_NUMBER doesn't read very well.
> How about NUM_SOLIBS?
>
I should mention the naming convention I used here before. It is
"TEST_PARAMETER". "SOLIB" is like a name space, and all variables used
in this test should be prefixed by "SOLIB_". I tried "." to replace
"_", but "." is not allowed to use.
If we write a test case on backtrace, and we need variable to control
the depth of bt, we can name it "BACKTRACE_DEPTH".
> > +if ![info exists SOLIB_NUMBER] {
> > + set SOLIB_NUMBER 128
> > +}
> > +
> > +for {set i 0} {$i < $SOLIB_NUMBER} {incr i} {
> > +
> > + # Produce source files.
> > + set libname "solib-lib$i"
> > + set src [standard_temp_file $libname.c]
> > + set exe [standard_temp_file $libname]
> > +
> > + set code "int shr$i (void) {return $i;}"
> > + set f [open $src "w"]
> > + puts $f $code
> > + close $f
>
> IWBN if the test harness provided utilities for generating source
> files instead of hardcoding the generating of them in the test.
> Parameters to such a set of functions would include things like the name
> of a high level entry point (what one might pass to dlsym), the number
> of functions in the file, the number of classes, etc.
>
IMO, it is not the perf test framework's responsibility to generate
source files and I am not sure the utilities like these can be reused
by other tests.
We can add a new proc gdb_produce_source with two parameters, NAME and
SOURCES. NAME is the file name and SOURCES is a list of lines of source
code we want to write to file NAME. For instance,
gdb_produce_source $src { "int shr$i (void) {return 0;}" }
It can be used here and replace some code in gdb.exp.
--
Yao (é½å°§)
next prev parent reply other threads:[~2013-09-22 6:25 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-14 13:01 [RFC] GDB performance testing infrastructure Yao Qi
2013-08-21 20:39 ` Tom Tromey
2013-08-27 6:21 ` Yao Qi
2013-08-27 13:49 ` Agovic, Sanimir
2013-08-28 3:04 ` Yao Qi
2013-09-19 0:36 ` Doug Evans
2013-08-28 4:17 ` [RFC 0/3] GDB Performance testing Yao Qi
2013-08-28 4:17 ` [RFC 3/3] Test on solib load and unload Yao Qi
2013-08-28 4:27 ` Yao Qi
2013-08-28 11:31 ` Agovic, Sanimir
2013-09-03 1:59 ` Yao Qi
2013-09-03 6:33 ` Agovic, Sanimir
2013-09-02 15:24 ` Blanc, Nicolas
2013-09-03 2:04 ` Yao Qi
2013-09-03 7:50 ` Blanc, Nicolas
2013-09-19 22:45 ` Doug Evans
2013-09-20 19:19 ` Tom Tromey
2013-10-05 0:34 ` Doug Evans
2013-10-07 16:31 ` Tom Tromey
2013-09-22 6:25 ` Yao Qi [this message]
2013-09-23 0:14 ` Doug Evans
2013-09-24 2:31 ` Yao Qi
2013-10-05 0:37 ` Doug Evans
2013-09-20 19:14 ` Tom Tromey
2013-08-28 4:17 ` [RFC 1/3] New make target 'check-perf' and new dir gdb.perf Yao Qi
2013-08-28 9:40 ` Agovic, Sanimir
2013-09-19 17:47 ` Doug Evans
2013-09-20 19:00 ` Tom Tromey
2013-09-20 18:59 ` Tom Tromey
2013-08-28 4:17 ` [RFC 2/3] Perf test framework Yao Qi
2013-08-28 9:57 ` Agovic, Sanimir
2013-09-03 1:45 ` Yao Qi
2013-09-03 6:38 ` Agovic, Sanimir
2013-09-19 19:09 ` Doug Evans
2013-09-20 8:04 ` Yao Qi
2013-09-20 16:51 ` Doug Evans
2013-09-22 2:54 ` Yao Qi
2013-09-22 23:14 ` Doug Evans
2013-09-20 17:12 ` Doug Evans
2013-09-19 17:25 ` [RFC 0/3] GDB Performance testing Doug Evans
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=523E8D0A.2050205@codesourcery.com \
--to=yao@codesourcery.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
/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