public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cristian Marussi <cristian.marussi@arm.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 1/4] cgroup_regression_test.sh ported to newlib
Date: Fri, 21 Dec 2018 15:27:20 +0000	[thread overview]
Message-ID: <d5a4fb0d-ca6f-d0e5-0016-af83c32930a3@arm.com> (raw)
In-Reply-To: <20181221143507.GB27446@dell5510>

Hi Petr

On 21/12/2018 14:35, Petr Vorel wrote:
> Hi Cristian,
> 
> ...
>> +++ b/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
> ...
>> -cd $LTPROOT/testcases/bin
> You left this even after second commit. It's not needed.

because I misunderstood your indication in the previous mail

>> * Remove absolute (/bin/kill) and relative paths and cd into
$LTPROOT/testcases/bin

getting it like "remove A and remove B AND then CD into..." o.O

my bad ...:D I'll fix it

> 
>> +TST_TESTFUNC=do_test
>> +TST_SETUP=do_setup
>> +TST_CLEANUP=do_cleanup
>> +TST_CNT=10
>> +TST_NEEDS_ROOT=1
>> +TST_NEEDS_CMDS="dmesg mountpoint mount umount cat kill find mkdir rmdir grep"
> Test needs also using temporary directory (as it creates directories):
> TST_NEEDS_TMPDIR=1

Fine. I missed that.

> 
> 
>> -export TCID="cgroup_regression_test"
>> -export TST_TOTAL=10
>> -export TST_COUNT=1
>> +. tst_test.sh
> 
>> -failed=0
>> +do_setup()
>> +{
>> +	cd $LTPROOT/testcases/bin
> And here.
> 
o.O

> ...
>> +do_cleanup()
>> +{
>> +	cd $LTPROOT/testcases/bin
> One more time.
> 
o.O

> ...
>> -for ((cur = 1; cur <= $TST_TOTAL; cur++))
>> +do_test()
>>  {
>> -	export TST_COUNT=$cur
>> +	local cur=$1
> 
>>  	test_$cur
>>  }
> 
> do_test() function is not needed at all, looping can be done automatically:
> Remove underscore from test functions (s/test_([0-9]+)/test$1/)
> and change setup: TST_TESTFUNC=test
> 
> See
> https://github.com/linux-test-project/ltp/wiki/Test-Writing-Guidelines#user-content-2-3-1-basic-test-interface
> 
Sure.

> 
> Kind regards,
> Petr
> 

Regards

Cristian

  reply	other threads:[~2018-12-21 15:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-20 18:21 [LTP] [PATCH v2 0/4] cgroup tests newlib-porting Cristian Marussi
2018-12-20 18:21 ` [LTP] [PATCH v2 1/4] cgroup_regression_test.sh ported to newlib Cristian Marussi
2018-12-21 14:25   ` Petr Vorel
2018-12-21 15:20     ` Cristian Marussi
2018-12-21 18:23       ` Cristian Marussi
2018-12-21 14:35   ` Petr Vorel
2018-12-21 15:27     ` Cristian Marussi [this message]
2018-12-20 18:21 ` [LTP] [PATCH v2 2/4] cgroup_regression_test.sh cleanup Cristian Marussi
2018-12-20 18:21 ` [LTP] [PATCH v2 3/4] cgroup_regression_test.sh: added helper Cristian Marussi
2018-12-20 18:21 ` [LTP] [PATCH v2 4/4] cgroup: helpers various fixes Cristian Marussi
2018-12-21 14:01   ` Petr Vorel
2018-12-21 15:29     ` Cristian Marussi
2018-12-21 18:23     ` Cristian Marussi
2018-12-21 13:39 ` [LTP] [PATCH v2 0/4] cgroup tests newlib-porting Petr Vorel
2018-12-21 15:36   ` Cristian Marussi
2018-12-21 15:47     ` Petr Vorel
2018-12-21 18:23       ` Cristian Marussi

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=d5a4fb0d-ca6f-d0e5-0016-af83c32930a3@arm.com \
    --to=cristian.marussi@arm.com \
    --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