Re: [PATCH 1/1] selftests: gpio: use pkg-config to determine libmount CFLAGS/LDLIBS

2017-06-29 Thread Bamvor Zhang Jian
On 29 June 2017 at 19:39, Fathi Boudra wrote: > On 29 June 2017 at 12:01, Michael Ellerman wrote: >> Fathi Boudra writes: >> >>> Fix hardcoded and misplaced libmount headers. Use pkg-config instead to >>> figure out CFLAGS/LDLIBS, fixing also their value for cross-compilation. >> >> Can you expl

Re: [PATCH v2] selftests: gpio: add config fragment for gpio-mockup

2017-04-03 Thread Bamvor Zhang Jian
86_64 and arm64 with defconfig and kselftest-merge. > > Signed-off-by: Fathi Boudra Reviewed-by: Bamvor Jian Zhang > --- > > Changes in v2: > * Per Bamvor Zhang Jian review, add gpiolib dependency (CONFIG_GPIOLIB). >Skipped CONFIG_DEBUG_GPIO as it isn't necessary, an

Re: [PATCH] selftests: gpio: add config fragment for gpio-mockup

2017-03-30 Thread Bamvor Zhang Jian
Hi, Fathi On 29 March 2017 at 02:41, Fathi Boudra wrote: > The gpio test requires to insert gpio-mockup module. > > Signed-off-by: Fathi Boudra > --- > tools/testing/selftests/gpio/config | 1 + > 1 file changed, 1 insertion(+) > create mode 100644 tools/testing/selftests/gpio/config > > diff

Re: [PATCH v2] selftests: gpio: fix Makefile

2017-03-30 Thread Bamvor Zhang Jian
Hi, Fathi Thanks for your patch. On 28 March 2017 at 13:36, Fathi Boudra wrote: > * Fix hardcoded and misplaced libmount headers. Use pkg-config instead to > figure out CFLAGS/LDLIBS, fixing also their value for cross-compilation. > Note: if pkg-config is missing (command not found), it will

Re: [PATCH 1/2] selftests: fix the broken individual test for x86

2017-03-28 Thread Bamvor Zhang Jian
Hi, Michael On 28 March 2017 at 08:22, Michael Ellerman wrote: > Bamvor Jian Zhang writes: > >> Andy Lutomirski report that build individual testcase in x86 is broken: >> >> $ make -C tools/testing/selftests/x86 ldt_gdt_32 >> make: Entering directory '/home/luto/apps/linux/tools/testing/selftest

Re: [PATCH v2 6/6] selftests: enable O and KBUILD_OUTPUT

2017-03-22 Thread Bamvor Zhang Jian
Hi, Shuah On 21 March 2017 at 19:02, Shuah Khan wrote: > On 03/21/2017 10:09 AM, Bamvor Zhang Jian wrote: >> Hi, Shuah >> >> On 21 March 2017 at 21:54, Shuah Khan wrote: >>> On 03/21/2017 03:00 AM, Bamvor Zhang Jian wrote: >>>> Hi, >>>> &

Re: [PATCH v2 6/6] selftests: enable O and KBUILD_OUTPUT

2017-03-22 Thread Bamvor Zhang Jian
Hi, Michael, Shuah On 22 March 2017 at 12:38, Michael Ellerman wrote: > Bamvor Zhang Jian writes: >> On 21 March 2017 at 16:35, Michael Ellerman wrote: >>> I see at least 18 Makefile's in tools/testing/selftests that use >>> $(OUTPUT)/, which would all ne

Re: [PATCH v2 6/6] selftests: enable O and KBUILD_OUTPUT

2017-03-21 Thread Bamvor Zhang Jian
Hi, Shuah On 21 March 2017 at 21:54, Shuah Khan wrote: > On 03/21/2017 03:00 AM, Bamvor Zhang Jian wrote: >> Hi, >> >> On 21 March 2017 at 16:35, Michael Ellerman wrote: >>> Andy Lutomirski writes: >>> >>>> On Tue, Nov 29, 2016

Re: [PATCH v2 6/6] selftests: enable O and KBUILD_OUTPUT

2017-03-21 Thread Bamvor Zhang Jian
Hi, On 21 March 2017 at 16:35, Michael Ellerman wrote: > Andy Lutomirski writes: > >> On Tue, Nov 29, 2016 at 3:55 AM, wrote: >>> From: Bamvor Jian Zhang >>> >>> Enable O and KBUILD_OUTPUT for kselftest. User could compile kselftest >>> to another directory by passing O or KBUILD_OUTPUT. And

Re: [PATCH 01/12] gpio: mockup: use devm_irq_alloc_descs()

2017-03-08 Thread Bamvor Zhang Jian
On 4 March 2017 at 17:23, Bartosz Golaszewski wrote: > Use the resource managed variant of irq_alloc_descs(). This allows us > to remove gpio_mockup_remove(). > > Signed-off-by: Bartosz Golaszewski Reviewed-by: Bamvor Jian Zhang > --- > drivers/gpio/gpio-mockup.c | 16 +--- > 1 fil

Re: [PATCH 2/5] selftests: Fix the .c linking rule

2017-02-13 Thread Bamvor Zhang Jian
Tested-by: Bamvor Jian Zhang On 9 February 2017 at 16:56, Michael Ellerman wrote: > Currently we can't build some tests, for example: > > $ make -C tools/testing/selftests/ TARGETS=vm > ... > gcc -Wall -I ../../../../usr/include -lrt -lpthread > ../../../../usr/include/linux/kernel.h us

Re: [PATCH 3/5] selftests: Fix the .S and .S -> .o rules

2017-02-13 Thread Bamvor Zhang Jian
Tested-by: Bamvor Jian Zhang On 9 February 2017 at 16:56, Michael Ellerman wrote: > Both these rules incorrectly use $< (first prerequisite) rather than > $^ (all prerequisites), meaning they don't work if we're using more than > one .S file as input. Switch them to using $^. > > They also don't

Re: [PATCH 1/5] selftests: Fix selftests build to just build, not run tests

2017-02-13 Thread Bamvor Zhang Jian
Tested by: Bamvor Jian Zhang On 9 February 2017 at 16:56, Michael Ellerman wrote: > In commit 88baa78d1f31 ("selftests: remove duplicated all and clean > target"), the "all" target was removed from individual Makefiles and > added to lib.mk. > > However the "all" target was added to lib.mk *afte

Re: [PATCH v2 0/6] enable O and KBUILD_OUTPUT for kselftest

2016-11-30 Thread Bamvor Zhang Jian
Hi, Shuah, Michael On 30 November 2016 at 22:17, Shuah Khan wrote: > On 11/29/2016 04:55 AM, bamvor.zhangj...@huawei.com wrote: >> From: Bamvor Jian Zhang >> >> Here is my second version for enabling the KBUILD_OUTPUT for kselftest. >> The first version could be found here[1]. I fix and test all

Re: [PATCH RFC 6/6] selftests: enable O and KBUILD_OUTPUT

2016-10-21 Thread Bamvor Zhang Jian
Fix the wrong email address of kevin hilman to khil...@kernel.org. Sorry for inconvenience. On 21 October 2016 at 19:01, wrote: > From: Bamvor Jian Zhang > > Enable O and KBUILD_OUTPUT for kselftest. User could compile kselftest > to another directory by passing O or KBUILD_OUTPUT. And O is hig

Re: [PATCH RFC 5/6] selftests: add EXTRA_CLEAN for clean target

2016-10-21 Thread Bamvor Zhang Jian
Fix the wrong email address of kevin hilman to khil...@kernel.org. Sorry for inconvenience. On 21 October 2016 at 19:01, wrote: > From: Bamvor Jian Zhang > > Some testcases need the clean extra data after running. This patch > introduce the "EXTRA_CLEAN" variable to address this requirement. >

Re: [PATCH RFC 3/6] selftests: add default rules for c source file

2016-10-21 Thread Bamvor Zhang Jian
Fix the wrong email address of kevin hilman to khil...@kernel.org. Sorry for inconvenience. On 21 October 2016 at 19:01, wrote: > From: Bamvor Jian Zhang > > There are difference rules for compiling c source file in different > testcases. In order to enable KBUILD_OUTPUT support in later patch,

Re: [PATCH RFC 4/6] selftests: remove CROSS_COMPILE in dedicated Makefile

2016-10-21 Thread Bamvor Zhang Jian
Fix the wrong email address of kevin hilman to khil...@kernel.org. Sorry for inconvenience. On 21 October 2016 at 19:01, wrote: > From: Bamvor Jian Zhang > > After previous clean up patches, memfd and timers could get > CROSS_COMPILE from tools/testing/selftest/lib.mk. There is no need to > pre

Re: [PATCH RFC 2/6] selftests: remove useless TEST_DIRS

2016-10-21 Thread Bamvor Zhang Jian
Fix the wrong email address of kevin hilman to khil...@kernel.org. Sorry for inconvenience. On 21 October 2016 at 19:01, wrote: > From: Bamvor Jian Zhang > > The TEST_DIRS was introduced in Commit e8c1d7cdf137 ("selftests: copy > TEST_DIRS to INSTALL_PATH") for coping a whole directory in ftrac

Re: [PATCH RFC 1/6] selftests: remove duplicated all and clean target

2016-10-21 Thread Bamvor Zhang Jian
Fix the wrong email address of kevin hilman to khil...@kernel.org. Sorry for inconvenience. On 21 October 2016 at 19:01, wrote: > From: Bamvor Jian Zhang > > Currently, kselftest use TEST_PROGS, TEST_PROGS_EXTENDED, TEST_FILES to > indicate the default test program, extended test program and te

Re: [PATCH RFC 0/6] enable O and KBUILD_OUTPUT for kselftest

2016-10-21 Thread Bamvor Zhang Jian
Fix the wrong email address of kevin hilman to khil...@kernel.org. Sorry for inconvenience. On 21 October 2016 at 19:01, wrote: > From: Bamvor Jian Zhang > > Here is my first version for enabling the KBUILD_OUTPUT for kselftest. > I fix and test all the TARGET in tools/testing/selftest/Makefile

Re: [PATCH v3 0/2] Create specific kconfig for kselftest

2015-12-24 Thread Bamvor Zhang Jian
Hi, Michael On 12/18/2015 07:44 AM, Michael Ellerman wrote: > On Thu, 2015-12-17 at 17:57 +0800, Bamvor Jian Zhang wrote: > >> There is a discussion about improving the usability of kselftest by >> creating test-specific kconfig in recent kernel Summit. >> >> Patch 1 keep test-specific kconfig fra

Re: [PATCH 6/7] selftests: only compile userfaultfd for x86 and powperpc

2015-09-08 Thread Bamvor Zhang Jian
Hi, Michael On 09/08/2015 05:54 PM, Michael Ellerman wrote: > On Tue, 2015-09-08 at 17:15 +0800, Bamvor Zhang Jian wrote: >> Hi, Michael >> >> I thought I reply to you, but ... >> >> On 08/31/2015 11:26 AM, Michael Ellerman wrote: >>> On Fri, 2015-08-

Re: [PATCH v2 5/6] selftests: change install command to rsync

2015-09-08 Thread Bamvor Zhang Jian
Hi, Michael On 09/08/2015 05:39 PM, Michael Ellerman wrote: > On Tue, 2015-09-08 at 17:25 +0800, Bamvor Zhang Jian wrote: >> Hi, Michael >> >> On 09/08/2015 01:52 PM, Michael Ellerman wrote: >>> On Mon, 2015-09-07 at 22:04 +0800, Bamvor Jian Zhang wrote: >>

Re: [PATCH v2 5/6] selftests: change install command to rsync

2015-09-08 Thread Bamvor Zhang Jian
Hi, Michael On 09/08/2015 01:52 PM, Michael Ellerman wrote: > On Mon, 2015-09-07 at 22:04 +0800, Bamvor Jian Zhang wrote: >> The command of install could not handle the special files in exec >> testcases, change the default rule to rsync to fix this. >> The result of installation is unchanged afte

Re: [PATCH 6/7] selftests: only compile userfaultfd for x86 and powperpc

2015-09-08 Thread Bamvor Zhang Jian
Hi, Michael I thought I reply to you, but ... On 08/31/2015 11:26 AM, Michael Ellerman wrote: > On Fri, 2015-08-14 at 21:43 +0800, Bamvor Jian Zhang wrote: >> Signed-off-by: Bamvor Jian Zhang >> --- >> tools/testing/selftests/vm/Makefile | 12 >> 1 file changed, 12 insertions(+) >>

Re: [PATCH 5/7] selftests: disable seccomp for arm64

2015-08-25 Thread Bamvor Zhang Jian
Hi, Michael On 08/24/2015 11:48 AM, Michael Ellerman wrote: > On Fri, 2015-08-14 at 21:43 +0800, Bamvor Jian Zhang wrote: >> Currently, seccomp need the __NR_poll which is not supported >> by arm64(There is only __NR_ppoll). I am not sure we should >> skip this test testcase or update the seccomp

Re: [PATCH 2/7] selftests: add CFLAGS_EXTRA

2015-08-25 Thread Bamvor Zhang Jian
On 08/24/2015 11:48 AM, Michael Ellerman wrote: > On Fri, 2015-08-14 at 21:43 +0800, Bamvor Jian Zhang wrote: >> One may pass the "-I /path/to/headers -L /path/to/lib" through >> CFLAGS_EXTRA for cross compiling. mqueue could compile pass >> in this way when we provide the popt.h and libpopt.so.

Re: [RFC PATCH v2 1/4] y2038: add 64bit time_t support in timeval for 32bit architecture

2015-07-14 Thread Bamvor Zhang Jian
Hi, Arnd On 07/09/2015 06:26 PM, Arnd Bergmann wrote: On Thursday 09 July 2015 17:02:47 Bamvor Zhang Jian wrote: On 07/09/2015 04:09 AM, John Stultz wrote: On Mon, Jun 29, 2015 at 7:23 AM, Bamvor Zhang Jian wrote: +int get_timeval64(struct timeval64 *tv, + const struct

Re: [RFC PATCH v2 1/4] y2038: add 64bit time_t support in timeval for 32bit architecture

2015-07-09 Thread Bamvor Zhang Jian
Hi, John On 07/09/2015 04:09 AM, John Stultz wrote: On Mon, Jun 29, 2015 at 7:23 AM, Bamvor Zhang Jian wrote: +int get_timeval64(struct timeval64 *tv, + const struct __kernel_timeval __user *utv) +{ + struct __kernel_timeval ktv; + int ret; + + ret

[RFC PATCH v2 4/4] y2038: convert ppdev to 2038 safe

2015-06-29 Thread Bamvor Zhang Jian
__kernel_timeval to migrate to time64_t. Signed-off-by: Bamvor Zhang Jian --- drivers/char/ppdev.c | 32 +--- include/uapi/linux/ppdev.h | 14 -- 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/drivers/char/ppdev.c b/drivers/char

[RFC PATCH v2 3/4] ppdev: add compat ioctl

2015-06-29 Thread Bamvor Zhang Jian
Add compat ioctl in ppdev in order to solve the y2038 issue in later patch. This patch simply add pp_do_ioctl to compat_ioctl, because I found that all the ioctl access the arg as a pointer. Signed-off-by: Bamvor Zhang Jian --- drivers/char/ppdev.c | 9 + 1 file changed, 9 insertions

[RFC PATCH v2 1/4] y2038: add 64bit time_t support in timeval for 32bit architecture

2015-06-29 Thread Bamvor Zhang Jian
: introduce struct __kernel_timespec[1]. [1] http://git.kernel.org/cgit/linux/kernel/git/arnd/playground.git/commit/?h=y2038-syscalls&id=9005d4f4a44fc56bd0a1fe7c08e8e3f13eb75de7 Signed-off-by: Bamvor Zhang Jian --- include/linux/time64.h| 20 ++-- include/uapi/linux/time.h

[RFC PATCH v2 2/4] time64: add timeval64 helper for compat syscalls

2015-06-29 Thread Bamvor Zhang Jian
also define compat_get_timeval64, compat_put_timeval64 for converting between compat_timeval and timeval64. Signed-off-by: Bamvor Zhang Jian --- include/linux/compat.h| 3 +++ include/uapi/linux/time.h | 6 ++ kernel/compat.c | 17 + 3 files changed, 26

[RFC PATCH v2 0/4] Convert ppdev to y2038 safe

2015-06-29 Thread Bamvor Zhang Jian
CONFIG_COMPAT_TIME). Unfortunately, there is no parport device (printer) in my test environment. Hope others could help to test it. [1] https://lists.linaro.org/pipermail/y2038/2015-June/000522.html [2] http://git.kernel.org/cgit/linux/kernel/git/arnd/playground.git/log/?h=y2038-syscalls Bamvor Zhang Jian