All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Young <dyoung@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	xiyou.wangcong@gmail.com, penberg@kernel.org,
	fengguang.wu@intel.com, cl@linux.com,
	Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [PATCH 3/3] move hugepage test examples to tools/testing/selftests/vm
Date: Tue, 07 Feb 2012 09:31:40 +0800	[thread overview]
Message-ID: <4F307EFC.5010400@redhat.com> (raw)
In-Reply-To: <20120206155340.b9075240.akpm@linux-foundation.org>

On 02/07/2012 07:53 AM, Andrew Morton wrote:

> On Sun, 5 Feb 2012 16:15:55 +0800
> Dave Young <dyoung@redhat.com> wrote:
> 
>> hugepage-mmap.c, hugepage-shm.c and map_hugetlb.c in Documentation/vm are
>> simple pass/fail tests, It's better to promote them to tools/testing/selftests
>>
>> Thanks suggestion of Andrew Morton about this. They all need firstly setting up
>> proper nr_hugepages and hugepage-mmap need to mount hugetlbfs. So I add a shell
>> script run_test to do such work which will call the three test programs and
>> check the return value of them.
>>
>> Changes to original code including below:
>> a. add run_test script
>> b. return error when read_bytes mismatch with writed bytes.
>> c. coding style fixes: do not use assignment in if condition
>>
> 
> I think Frederic is doing away with tools/testing/selftests/run_tests
> in favour of a Makefile target?  ("make run_tests", for example).

>

> Until we see such a patch we cannot finalise your patch and if I apply
> your patch, his patch will need more work.  Not that this is rocket
> science ;)


Understand.

> 
>>
>> ...
>>
>> --- /dev/null
>> +++ b/tools/testing/selftests/vm/run_test
> 
> (We now have a "run_tests" and a "run_test".  The difference in naming
> is irritating)


Yes, I'm just refer to the breakpoints/Makefile which will make a target
breakpoints/run_test

> 
> Your vm/run_test file does quite a lot of work and we couldn't sensibly
> move all its functionality into Makefile, I expect.
> 
> So I think it's OK to retain a script for this, but I do think that we
> should think up a standardized way of invoking it from vm/Makefile, so
> the top-level Makefile in tools/testing/selftests can simply do "cd
> vm;make run_test", where the run_test target exists in all
> subdirectories.  The vm/Makefile run_test target can then call out to
> the script.


Frederic, do you have any idea about this?

> 
> Also, please do not assume that the script has the x bit set.  The x
> bit easily gets lost on kernel scripts (patch(1) can lose it) so it is
> safer to invoke the script via "/bin/sh script-name" or $SHELL or
> whatever.


Agree, and quilt can not keep the x bit as well, I have to use git to
create a executable shell script

> 
> Anyway, we should work with Frederic on sorting out some standard
> behavior before we can finalize this work, please.
> 


Fine, I can redo this after the standard behavior is out

-- 
Thanks
Dave

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Dave Young <dyoung@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	xiyou.wangcong@gmail.com, penberg@kernel.org,
	fengguang.wu@intel.com, cl@linux.com,
	Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [PATCH 3/3] move hugepage test examples to tools/testing/selftests/vm
Date: Tue, 07 Feb 2012 09:31:40 +0800	[thread overview]
Message-ID: <4F307EFC.5010400@redhat.com> (raw)
In-Reply-To: <20120206155340.b9075240.akpm@linux-foundation.org>

On 02/07/2012 07:53 AM, Andrew Morton wrote:

> On Sun, 5 Feb 2012 16:15:55 +0800
> Dave Young <dyoung@redhat.com> wrote:
> 
>> hugepage-mmap.c, hugepage-shm.c and map_hugetlb.c in Documentation/vm are
>> simple pass/fail tests, It's better to promote them to tools/testing/selftests
>>
>> Thanks suggestion of Andrew Morton about this. They all need firstly setting up
>> proper nr_hugepages and hugepage-mmap need to mount hugetlbfs. So I add a shell
>> script run_test to do such work which will call the three test programs and
>> check the return value of them.
>>
>> Changes to original code including below:
>> a. add run_test script
>> b. return error when read_bytes mismatch with writed bytes.
>> c. coding style fixes: do not use assignment in if condition
>>
> 
> I think Frederic is doing away with tools/testing/selftests/run_tests
> in favour of a Makefile target?  ("make run_tests", for example).

>

> Until we see such a patch we cannot finalise your patch and if I apply
> your patch, his patch will need more work.  Not that this is rocket
> science ;)


Understand.

> 
>>
>> ...
>>
>> --- /dev/null
>> +++ b/tools/testing/selftests/vm/run_test
> 
> (We now have a "run_tests" and a "run_test".  The difference in naming
> is irritating)


Yes, I'm just refer to the breakpoints/Makefile which will make a target
breakpoints/run_test

> 
> Your vm/run_test file does quite a lot of work and we couldn't sensibly
> move all its functionality into Makefile, I expect.
> 
> So I think it's OK to retain a script for this, but I do think that we
> should think up a standardized way of invoking it from vm/Makefile, so
> the top-level Makefile in tools/testing/selftests can simply do "cd
> vm;make run_test", where the run_test target exists in all
> subdirectories.  The vm/Makefile run_test target can then call out to
> the script.


Frederic, do you have any idea about this?

> 
> Also, please do not assume that the script has the x bit set.  The x
> bit easily gets lost on kernel scripts (patch(1) can lose it) so it is
> safer to invoke the script via "/bin/sh script-name" or $SHELL or
> whatever.


Agree, and quilt can not keep the x bit as well, I have to use git to
create a executable shell script

> 
> Anyway, we should work with Frederic on sorting out some standard
> behavior before we can finalize this work, please.
> 


Fine, I can redo this after the standard behavior is out

-- 
Thanks
Dave

  reply	other threads:[~2012-02-07  1:29 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-05  8:15 [PATCH 3/3] move hugepage test examples to tools/testing/selftests/vm Dave Young
2012-02-05  8:15 ` Dave Young
2012-02-06 23:53 ` Andrew Morton
2012-02-06 23:53   ` Andrew Morton
2012-02-07  1:31   ` Dave Young [this message]
2012-02-07  1:31     ` Dave Young
2012-02-08  3:40   ` [PATCH] selftests: Launch individual selftests from the main Makefile Frederic Weisbecker
2012-02-08  3:40     ` Frederic Weisbecker
2012-02-08 14:45     ` Christoph Lameter
2012-02-08 14:45       ` Christoph Lameter
2012-02-08 15:38       ` Frederic Weisbecker
2012-02-08 15:38         ` Frederic Weisbecker
2012-02-08 23:20     ` Andrew Morton
2012-02-08 23:20       ` Andrew Morton
2012-02-08 23:57       ` Frederic Weisbecker
2012-02-08 23:57         ` Frederic Weisbecker
2012-02-09  1:46   ` [PATCH 3/3 v2] move hugepage test examples to tools/testing/selftests/vm Dave Young
2012-02-09  1:46     ` Dave Young
2012-02-09 23:03     ` Andrew Morton
2012-02-09 23:03       ` Andrew Morton
2012-02-10  3:01       ` Dave Young
2012-02-10  3:01         ` Dave Young
2012-02-07  1:32 ` [PATCH 3/3] " Dave Young
2012-02-07  1:32   ` Dave Young

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=4F307EFC.5010400@redhat.com \
    --to=dyoung@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=fengguang.wu@intel.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=xiyou.wangcong@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.