public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: Maxim Uvarov <maxim.uvarov@linaro.org>
Cc: ltp-list@lists.sourceforge.net,
	Maxim Uvarov <maxim.uvarov@linaro.com>,
	linaro-networking@linaro.org
Subject: Re: [LTP] [PATCH] LTP cacheflush01 add arm variant
Date: Wed, 9 Oct 2013 03:55:38 -0400 (EDT)	[thread overview]
Message-ID: <1444343766.3683031.1381305338134.JavaMail.root@redhat.com> (raw)
In-Reply-To: <1380881832-7418-2-git-send-email-maxim.uvarov@linaro.com>



----- Original Message -----
> From: "Maxim Uvarov" <maxim.uvarov@linaro.org>
> To: ltp-list@lists.sourceforge.net
> Cc: linaro-networking@linaro.org, "Maxim Uvarov" <maxim.uvarov@linaro.com>
> Sent: Friday, 4 October, 2013 12:17:12 PM
> Subject: [LTP] [PATCH] LTP cacheflush01 add arm variant
> 
> Cache flush on arm provided via
> __ARM_NR_cacheflush(unsigned long start, unsigned long end, int flags)
> defined in ./arch/arm/kernel/traps.c.
> Flags are not used, providing 0 there.
> 
> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.com>

Hi,

looks good to me. I was thinking about getting rid of that ifdef,
but I'm not sure it's worth the trouble for such trivial testcase.

Small nits (related to original code):
- no need for brackets for single statement
- it would be helpful to see the errno in case of failure:
  tst_resm(TFAIL | TTERRNO, "failed with unexpected errno");
- "malloc failed" flags should be TFAIL | TERRNO
- tst_tmpdir()/tst_rmdir() is not needed
- unnecessary comments can be removed

Regards,
Jan

> ---
>  .../kernel/syscalls/cacheflush/cacheflush01.c      |    9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/testcases/kernel/syscalls/cacheflush/cacheflush01.c
> b/testcases/kernel/syscalls/cacheflush/cacheflush01.c
> index 9c02f0a..fae51b4 100644
> --- a/testcases/kernel/syscalls/cacheflush/cacheflush01.c
> +++ b/testcases/kernel/syscalls/cacheflush/cacheflush01.c
> @@ -137,6 +137,14 @@ int main(int ac, char **av)
>  	}
>  
>  	/* Invokes cacheflush() with proper parameters */
> +#if defined(__arm__)
> +	TEST(ltp_syscall(__ARM_NR_cacheflush, addr, addr + getpagesize(), 0));
> +	if (TEST_RETURN == 0) {
> +		tst_resm(TPASS, "passed with no errno");
> +	} else {
> +		tst_resm(TFAIL, "failed with unexpected errno");
> +	}
> +#else
>  	TEST(ltp_syscall(__NR_cacheflush, addr, getpagesize(), ICACHE));
>  	if (TEST_RETURN == 0) {
>  		tst_resm(TPASS, "passed with no errno");
> @@ -157,6 +165,7 @@ int main(int ac, char **av)
>  	} else {
>  		tst_resm(TFAIL, "failed with unexpected errno");
>  	}
> +#endif
>  
>  	cleanup();
>  	tst_exit();
> --
> 1.7.9.5
> 
> 
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
> 

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2013-10-09  7:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-04 10:17 [LTP] [PATCH] LTP max_map_count: filer out not accounted vector stub for arm Maxim Uvarov
2013-10-04 10:17 ` [LTP] [PATCH] LTP cacheflush01 add arm variant Maxim Uvarov
2013-10-09  7:55   ` Jan Stancek [this message]
2013-10-09  7:59 ` [LTP] [PATCH] LTP max_map_count: filer out not accounted vector stub for arm Jan Stancek
2013-10-09 10:33   ` Maxim Uvarov
2013-10-18 12:22     ` Maxim Uvarov
2013-10-21  7:50       ` Jan Stancek

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=1444343766.3683031.1381305338134.JavaMail.root@redhat.com \
    --to=jstancek@redhat.com \
    --cc=linaro-networking@linaro.org \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=maxim.uvarov@linaro.com \
    --cc=maxim.uvarov@linaro.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