* [PATCH 1/3] kcmp: Move kcmp.h into uapi
@ 2014-10-23 5:07 Michael Ellerman
2014-10-23 5:07 ` [PATCH 2/3] selftests/kcmp: Don't include kernel headers Michael Ellerman
` (4 more replies)
0 siblings, 5 replies; 18+ messages in thread
From: Michael Ellerman @ 2014-10-23 5:07 UTC (permalink / raw)
To: linux-kernel; +Cc: shuahkh, linux-api, Andrew Morton, gorcunov
kcmp.h appears to be part of the API, it's documented in kcmp(2), and
the selftests/kcmp code uses it. So move it to uapi so it's actually
exported.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
include/linux/kcmp.h | 13 +------------
include/uapi/linux/Kbuild | 1 +
include/uapi/linux/kcmp.h | 17 +++++++++++++++++
3 files changed, 19 insertions(+), 12 deletions(-)
create mode 100644 include/uapi/linux/kcmp.h
diff --git a/include/linux/kcmp.h b/include/linux/kcmp.h
index 2dcd1b3aafc8..9dfb23e1771b 100644
--- a/include/linux/kcmp.h
+++ b/include/linux/kcmp.h
@@ -1,17 +1,6 @@
#ifndef _LINUX_KCMP_H
#define _LINUX_KCMP_H
-/* Comparison type */
-enum kcmp_type {
- KCMP_FILE,
- KCMP_VM,
- KCMP_FILES,
- KCMP_FS,
- KCMP_SIGHAND,
- KCMP_IO,
- KCMP_SYSVSEM,
-
- KCMP_TYPES,
-};
+#include <uapi/linux/kcmp.h>
#endif /* _LINUX_KCMP_H */
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index b70237e8bc37..1cf50d682dbf 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -209,6 +209,7 @@ header-y += ivtvfb.h
header-y += ixjuser.h
header-y += jffs2.h
header-y += joystick.h
+header-y += kcmp.h
header-y += kd.h
header-y += kdev_t.h
header-y += kernel-page-flags.h
diff --git a/include/uapi/linux/kcmp.h b/include/uapi/linux/kcmp.h
new file mode 100644
index 000000000000..84df14b37360
--- /dev/null
+++ b/include/uapi/linux/kcmp.h
@@ -0,0 +1,17 @@
+#ifndef _UAPI_LINUX_KCMP_H
+#define _UAPI_LINUX_KCMP_H
+
+/* Comparison type */
+enum kcmp_type {
+ KCMP_FILE,
+ KCMP_VM,
+ KCMP_FILES,
+ KCMP_FS,
+ KCMP_SIGHAND,
+ KCMP_IO,
+ KCMP_SYSVSEM,
+
+ KCMP_TYPES,
+};
+
+#endif /* _UAPI_LINUX_KCMP_H */
--
1.9.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/3] selftests/kcmp: Don't include kernel headers
2014-10-23 5:07 [PATCH 1/3] kcmp: Move kcmp.h into uapi Michael Ellerman
@ 2014-10-23 5:07 ` Michael Ellerman
2014-10-23 6:05 ` Cyrill Gorcunov
2014-10-23 5:07 ` [PATCH 3/3] selftests/kcmp: Always try to build the test Michael Ellerman
` (3 subsequent siblings)
4 siblings, 1 reply; 18+ messages in thread
From: Michael Ellerman @ 2014-10-23 5:07 UTC (permalink / raw)
To: linux-kernel; +Cc: shuahkh, linux-api, Andrew Morton, gorcunov
The kcmp test mucks with the include path to bring in the kernel
headers, and x86 headers too for reasons that are not clear.
Now that kcmp.h is exported none of that should be necessary.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
tools/testing/selftests/kcmp/Makefile | 4 ----
1 file changed, 4 deletions(-)
diff --git a/tools/testing/selftests/kcmp/Makefile b/tools/testing/selftests/kcmp/Makefile
index 8aabd82db9e4..4f00c0524501 100644
--- a/tools/testing/selftests/kcmp/Makefile
+++ b/tools/testing/selftests/kcmp/Makefile
@@ -8,11 +8,7 @@ ifeq ($(ARCH),x86_64)
ARCH := x86
CFLAGS := -DCONFIG_X86_64 -D__x86_64__
endif
-
-CFLAGS += -I../../../../arch/x86/include/generated/
-CFLAGS += -I../../../../include/
CFLAGS += -I../../../../usr/include/
-CFLAGS += -I../../../../arch/x86/include/
all:
ifeq ($(ARCH),x86)
--
1.9.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 3/3] selftests/kcmp: Always try to build the test
2014-10-23 5:07 [PATCH 1/3] kcmp: Move kcmp.h into uapi Michael Ellerman
2014-10-23 5:07 ` [PATCH 2/3] selftests/kcmp: Don't include kernel headers Michael Ellerman
@ 2014-10-23 5:07 ` Michael Ellerman
2014-10-23 6:09 ` Cyrill Gorcunov
2014-10-23 13:06 ` Christopher Covington
2014-10-23 6:04 ` [PATCH 1/3] kcmp: Move kcmp.h into uapi Cyrill Gorcunov
` (2 subsequent siblings)
4 siblings, 2 replies; 18+ messages in thread
From: Michael Ellerman @ 2014-10-23 5:07 UTC (permalink / raw)
To: linux-kernel; +Cc: shuahkh, linux-api, Andrew Morton, gorcunov
Don't prevent the test building on non-x86. Just try and build it and
let the chips fall where they may.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
tools/testing/selftests/kcmp/Makefile | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/tools/testing/selftests/kcmp/Makefile b/tools/testing/selftests/kcmp/Makefile
index 4f00c0524501..cda9cc4004c9 100644
--- a/tools/testing/selftests/kcmp/Makefile
+++ b/tools/testing/selftests/kcmp/Makefile
@@ -1,21 +1,7 @@
-uname_M := $(shell uname -m 2>/dev/null || echo not)
-ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/)
-ifeq ($(ARCH),i386)
- ARCH := x86
- CFLAGS := -DCONFIG_X86_32 -D__i386__
-endif
-ifeq ($(ARCH),x86_64)
- ARCH := x86
- CFLAGS := -DCONFIG_X86_64 -D__x86_64__
-endif
CFLAGS += -I../../../../usr/include/
all:
-ifeq ($(ARCH),x86)
gcc $(CFLAGS) kcmp_test.c -o kcmp_test
-else
- echo "Not an x86 target, can't build kcmp selftest"
-endif
run_tests: all
@./kcmp_test || echo "kcmp_test: [FAIL]"
--
1.9.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 1/3] kcmp: Move kcmp.h into uapi
2014-10-23 5:07 [PATCH 1/3] kcmp: Move kcmp.h into uapi Michael Ellerman
2014-10-23 5:07 ` [PATCH 2/3] selftests/kcmp: Don't include kernel headers Michael Ellerman
2014-10-23 5:07 ` [PATCH 3/3] selftests/kcmp: Always try to build the test Michael Ellerman
@ 2014-10-23 6:04 ` Cyrill Gorcunov
2014-10-23 7:49 ` Arnd Bergmann
2014-11-28 2:18 ` Michael Ellerman
4 siblings, 0 replies; 18+ messages in thread
From: Cyrill Gorcunov @ 2014-10-23 6:04 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linux-kernel, shuahkh, linux-api, Andrew Morton
On Thu, Oct 23, 2014 at 04:07:12PM +1100, Michael Ellerman wrote:
> kcmp.h appears to be part of the API, it's documented in kcmp(2), and
> the selftests/kcmp code uses it. So move it to uapi so it's actually
> exported.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/3] selftests/kcmp: Don't include kernel headers
2014-10-23 5:07 ` [PATCH 2/3] selftests/kcmp: Don't include kernel headers Michael Ellerman
@ 2014-10-23 6:05 ` Cyrill Gorcunov
0 siblings, 0 replies; 18+ messages in thread
From: Cyrill Gorcunov @ 2014-10-23 6:05 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linux-kernel, shuahkh, linux-api, Andrew Morton
On Thu, Oct 23, 2014 at 04:07:13PM +1100, Michael Ellerman wrote:
> The kcmp test mucks with the include path to bring in the kernel
> headers, and x86 headers too for reasons that are not clear.
>
> Now that kcmp.h is exported none of that should be necessary.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
The reason was to be able to run test without userspace headers generated.
Still this one is better I think.
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/3] selftests/kcmp: Always try to build the test
2014-10-23 5:07 ` [PATCH 3/3] selftests/kcmp: Always try to build the test Michael Ellerman
@ 2014-10-23 6:09 ` Cyrill Gorcunov
2014-12-02 5:53 ` Michael Ellerman
2014-10-23 13:06 ` Christopher Covington
1 sibling, 1 reply; 18+ messages in thread
From: Cyrill Gorcunov @ 2014-10-23 6:09 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linux-kernel, shuahkh, linux-api, Andrew Morton
On Thu, Oct 23, 2014 at 04:07:14PM +1100, Michael Ellerman wrote:
> Don't prevent the test building on non-x86. Just try and build it and
> let the chips fall where they may.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
kcmp depends on checkpoint/restore config symbol which is known
to work on x86 and (iirc) on arm, that's why x86 was only allowed.
I don't mind to such change but not sure.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/3] kcmp: Move kcmp.h into uapi
2014-10-23 5:07 [PATCH 1/3] kcmp: Move kcmp.h into uapi Michael Ellerman
` (2 preceding siblings ...)
2014-10-23 6:04 ` [PATCH 1/3] kcmp: Move kcmp.h into uapi Cyrill Gorcunov
@ 2014-10-23 7:49 ` Arnd Bergmann
2014-10-23 8:14 ` Cyrill Gorcunov
2014-11-28 2:18 ` Michael Ellerman
4 siblings, 1 reply; 18+ messages in thread
From: Arnd Bergmann @ 2014-10-23 7:49 UTC (permalink / raw)
To: Michael Ellerman
Cc: linux-kernel, shuahkh, linux-api, Andrew Morton, gorcunov
On Thursday 23 October 2014 16:07:12 Michael Ellerman wrote:
> --- a/include/linux/kcmp.h
> +++ b/include/linux/kcmp.h
> @@ -1,17 +1,6 @@
> #ifndef _LINUX_KCMP_H
> #define _LINUX_KCMP_H
>
> -/* Comparison type */
> -enum kcmp_type {
> - KCMP_FILE,
> - KCMP_VM,
> - KCMP_FILES,
> - KCMP_FS,
> - KCMP_SIGHAND,
> - KCMP_IO,
> - KCMP_SYSVSEM,
> -
> - KCMP_TYPES,
> -};
> +#include <uapi/linux/kcmp.h>
>
> #endif /* _LINUX_KCMP_H */
>
If the file is empty except for the uapi include, I think it's better to
delete it completely. The include path logic should ensure we pick the
other one up.
Arnd
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/3] kcmp: Move kcmp.h into uapi
2014-10-23 7:49 ` Arnd Bergmann
@ 2014-10-23 8:14 ` Cyrill Gorcunov
2014-12-01 16:57 ` Shuah Khan
0 siblings, 1 reply; 18+ messages in thread
From: Cyrill Gorcunov @ 2014-10-23 8:14 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Michael Ellerman, linux-kernel, shuahkh, linux-api, Andrew Morton
On Thu, Oct 23, 2014 at 09:49:14AM +0200, Arnd Bergmann wrote:
> On Thursday 23 October 2014 16:07:12 Michael Ellerman wrote:
> > --- a/include/linux/kcmp.h
> > +++ b/include/linux/kcmp.h
> > @@ -1,17 +1,6 @@
> > #ifndef _LINUX_KCMP_H
> > #define _LINUX_KCMP_H
> >
> > -/* Comparison type */
> > -enum kcmp_type {
> > - KCMP_FILE,
> > - KCMP_VM,
> > - KCMP_FILES,
> > - KCMP_FS,
> > - KCMP_SIGHAND,
> > - KCMP_IO,
> > - KCMP_SYSVSEM,
> > -
> > - KCMP_TYPES,
> > -};
> > +#include <uapi/linux/kcmp.h>
> >
> > #endif /* _LINUX_KCMP_H */
> >
>
> If the file is empty except for the uapi include, I think it's better to
> delete it completely. The include path logic should ensure we pick the
> other one up.
Good point, somehow managed to miss this.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/3] selftests/kcmp: Always try to build the test
2014-10-23 5:07 ` [PATCH 3/3] selftests/kcmp: Always try to build the test Michael Ellerman
2014-10-23 6:09 ` Cyrill Gorcunov
@ 2014-10-23 13:06 ` Christopher Covington
2014-10-23 13:52 ` Shuah Khan
2014-12-02 5:44 ` Michael Ellerman
1 sibling, 2 replies; 18+ messages in thread
From: Christopher Covington @ 2014-10-23 13:06 UTC (permalink / raw)
To: Michael Ellerman
Cc: linux-kernel, shuahkh, linux-api, Andrew Morton, gorcunov
Hi Michael,
On 10/23/2014 01:07 AM, Michael Ellerman wrote:
> Don't prevent the test building on non-x86. Just try and build it and
> let the chips fall where they may.
As a user of kcmp via CRIU on arm and arm64, thanks!
> diff --git a/tools/testing/selftests/kcmp/Makefile b/tools/testing/selftests/kcmp/Makefile
> index 4f00c0524501..cda9cc4004c9 100644
> --- a/tools/testing/selftests/kcmp/Makefile
> +++ b/tools/testing/selftests/kcmp/Makefile
> @@ -1,21 +1,7 @@
> -uname_M := $(shell uname -m 2>/dev/null || echo not)
> -ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/)
> -ifeq ($(ARCH),i386)
> - ARCH := x86
> - CFLAGS := -DCONFIG_X86_32 -D__i386__
> -endif
> -ifeq ($(ARCH),x86_64)
> - ARCH := x86
> - CFLAGS := -DCONFIG_X86_64 -D__x86_64__
> -endif
> CFLAGS += -I../../../../usr/include/
>
> all:
> -ifeq ($(ARCH),x86)
> gcc $(CFLAGS) kcmp_test.c -o kcmp_test
Not that this needs to be addressed in this patch, but this looks broken for
cross compilation. It looks like some of the other selftests use:
CC = $(CROSS_COMPILE)gcc
But perhaps this should be set (and perhaps with ':=') once at the top level.
Chris
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/3] selftests/kcmp: Always try to build the test
2014-10-23 13:06 ` Christopher Covington
@ 2014-10-23 13:52 ` Shuah Khan
2014-12-01 16:58 ` Shuah Khan
2014-12-02 5:44 ` Michael Ellerman
1 sibling, 1 reply; 18+ messages in thread
From: Shuah Khan @ 2014-10-23 13:52 UTC (permalink / raw)
To: Christopher Covington, Michael Ellerman
Cc: linux-kernel, linux-api, Andrew Morton, gorcunov
On 10/23/2014 07:06 AM, Christopher Covington wrote:
> Hi Michael,
>
> On 10/23/2014 01:07 AM, Michael Ellerman wrote:
>> Don't prevent the test building on non-x86. Just try and build it and
>> let the chips fall where they may.
>
> As a user of kcmp via CRIU on arm and arm64, thanks!
>
>> diff --git a/tools/testing/selftests/kcmp/Makefile b/tools/testing/selftests/kcmp/Makefile
>> index 4f00c0524501..cda9cc4004c9 100644
>> --- a/tools/testing/selftests/kcmp/Makefile
>> +++ b/tools/testing/selftests/kcmp/Makefile
>> @@ -1,21 +1,7 @@
>> -uname_M := $(shell uname -m 2>/dev/null || echo not)
>> -ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/)
>> -ifeq ($(ARCH),i386)
>> - ARCH := x86
>> - CFLAGS := -DCONFIG_X86_32 -D__i386__
>> -endif
>> -ifeq ($(ARCH),x86_64)
>> - ARCH := x86
>> - CFLAGS := -DCONFIG_X86_64 -D__x86_64__
>> -endif
>> CFLAGS += -I../../../../usr/include/
>>
>> all:
>> -ifeq ($(ARCH),x86)
>> gcc $(CFLAGS) kcmp_test.c -o kcmp_test
>
> Not that this needs to be addressed in this patch, but this looks broken for
> cross compilation. It looks like some of the other selftests use:
>
> CC = $(CROSS_COMPILE)gcc
>
It makes sense to fix the cross-compile problem now, since
this patch is extending the support to other archs.
thanks,
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/3] kcmp: Move kcmp.h into uapi
2014-10-23 5:07 [PATCH 1/3] kcmp: Move kcmp.h into uapi Michael Ellerman
` (3 preceding siblings ...)
2014-10-23 7:49 ` Arnd Bergmann
@ 2014-11-28 2:18 ` Michael Ellerman
2014-12-01 17:00 ` Shuah Khan
4 siblings, 1 reply; 18+ messages in thread
From: Michael Ellerman @ 2014-11-28 2:18 UTC (permalink / raw)
To: linux-kernel; +Cc: shuahkh, linux-api, Andrew Morton, gorcunov
On Thu, 2014-10-23 at 16:07 +1100, Michael Ellerman wrote:
> kcmp.h appears to be part of the API, it's documented in kcmp(2), and
> the selftests/kcmp code uses it. So move it to uapi so it's actually
> exported.
Looks like this series fell through the cracks?
It still applies on rc6. Should I resend?
cheers
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
> include/linux/kcmp.h | 13 +------------
> include/uapi/linux/Kbuild | 1 +
> include/uapi/linux/kcmp.h | 17 +++++++++++++++++
> 3 files changed, 19 insertions(+), 12 deletions(-)
> create mode 100644 include/uapi/linux/kcmp.h
>
> diff --git a/include/linux/kcmp.h b/include/linux/kcmp.h
> index 2dcd1b3aafc8..9dfb23e1771b 100644
> --- a/include/linux/kcmp.h
> +++ b/include/linux/kcmp.h
> @@ -1,17 +1,6 @@
> #ifndef _LINUX_KCMP_H
> #define _LINUX_KCMP_H
>
> -/* Comparison type */
> -enum kcmp_type {
> - KCMP_FILE,
> - KCMP_VM,
> - KCMP_FILES,
> - KCMP_FS,
> - KCMP_SIGHAND,
> - KCMP_IO,
> - KCMP_SYSVSEM,
> -
> - KCMP_TYPES,
> -};
> +#include <uapi/linux/kcmp.h>
>
> #endif /* _LINUX_KCMP_H */
> diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
> index b70237e8bc37..1cf50d682dbf 100644
> --- a/include/uapi/linux/Kbuild
> +++ b/include/uapi/linux/Kbuild
> @@ -209,6 +209,7 @@ header-y += ivtvfb.h
> header-y += ixjuser.h
> header-y += jffs2.h
> header-y += joystick.h
> +header-y += kcmp.h
> header-y += kd.h
> header-y += kdev_t.h
> header-y += kernel-page-flags.h
> diff --git a/include/uapi/linux/kcmp.h b/include/uapi/linux/kcmp.h
> new file mode 100644
> index 000000000000..84df14b37360
> --- /dev/null
> +++ b/include/uapi/linux/kcmp.h
> @@ -0,0 +1,17 @@
> +#ifndef _UAPI_LINUX_KCMP_H
> +#define _UAPI_LINUX_KCMP_H
> +
> +/* Comparison type */
> +enum kcmp_type {
> + KCMP_FILE,
> + KCMP_VM,
> + KCMP_FILES,
> + KCMP_FS,
> + KCMP_SIGHAND,
> + KCMP_IO,
> + KCMP_SYSVSEM,
> +
> + KCMP_TYPES,
> +};
> +
> +#endif /* _UAPI_LINUX_KCMP_H */
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/3] kcmp: Move kcmp.h into uapi
2014-10-23 8:14 ` Cyrill Gorcunov
@ 2014-12-01 16:57 ` Shuah Khan
0 siblings, 0 replies; 18+ messages in thread
From: Shuah Khan @ 2014-12-01 16:57 UTC (permalink / raw)
To: Cyrill Gorcunov, Arnd Bergmann
Cc: Michael Ellerman, linux-kernel, linux-api, Andrew Morton, Shuah Khan
On 10/23/2014 02:14 AM, Cyrill Gorcunov wrote:
> On Thu, Oct 23, 2014 at 09:49:14AM +0200, Arnd Bergmann wrote:
>> On Thursday 23 October 2014 16:07:12 Michael Ellerman wrote:
>>> --- a/include/linux/kcmp.h
>>> +++ b/include/linux/kcmp.h
>>> @@ -1,17 +1,6 @@
>>> #ifndef _LINUX_KCMP_H
>>> #define _LINUX_KCMP_H
>>>
>>> -/* Comparison type */
>>> -enum kcmp_type {
>>> - KCMP_FILE,
>>> - KCMP_VM,
>>> - KCMP_FILES,
>>> - KCMP_FS,
>>> - KCMP_SIGHAND,
>>> - KCMP_IO,
>>> - KCMP_SYSVSEM,
>>> -
>>> - KCMP_TYPES,
>>> -};
>>> +#include <uapi/linux/kcmp.h>
>>>
>>> #endif /* _LINUX_KCMP_H */
>>>
>>
>> If the file is empty except for the uapi include, I think it's better to
>> delete it completely. The include path logic should ensure we pick the
>> other one up.
>
> Good point, somehow managed to miss this.
>
Michael,
Are you planning to send v2 to address the comments?
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/3] selftests/kcmp: Always try to build the test
2014-10-23 13:52 ` Shuah Khan
@ 2014-12-01 16:58 ` Shuah Khan
0 siblings, 0 replies; 18+ messages in thread
From: Shuah Khan @ 2014-12-01 16:58 UTC (permalink / raw)
To: Christopher Covington, Michael Ellerman
Cc: linux-kernel, linux-api, Andrew Morton, gorcunov, Shuah Khan
On 10/23/2014 07:52 AM, Shuah Khan wrote:
> On 10/23/2014 07:06 AM, Christopher Covington wrote:
>> Hi Michael,
>>
>> On 10/23/2014 01:07 AM, Michael Ellerman wrote:
>>> Don't prevent the test building on non-x86. Just try and build it and
>>> let the chips fall where they may.
>>
>> As a user of kcmp via CRIU on arm and arm64, thanks!
>>
>>> diff --git a/tools/testing/selftests/kcmp/Makefile b/tools/testing/selftests/kcmp/Makefile
>>> index 4f00c0524501..cda9cc4004c9 100644
>>> --- a/tools/testing/selftests/kcmp/Makefile
>>> +++ b/tools/testing/selftests/kcmp/Makefile
>>> @@ -1,21 +1,7 @@
>>> -uname_M := $(shell uname -m 2>/dev/null || echo not)
>>> -ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/)
>>> -ifeq ($(ARCH),i386)
>>> - ARCH := x86
>>> - CFLAGS := -DCONFIG_X86_32 -D__i386__
>>> -endif
>>> -ifeq ($(ARCH),x86_64)
>>> - ARCH := x86
>>> - CFLAGS := -DCONFIG_X86_64 -D__x86_64__
>>> -endif
>>> CFLAGS += -I../../../../usr/include/
>>>
>>> all:
>>> -ifeq ($(ARCH),x86)
>>> gcc $(CFLAGS) kcmp_test.c -o kcmp_test
>>
>> Not that this needs to be addressed in this patch, but this looks broken for
>> cross compilation. It looks like some of the other selftests use:
>>
>> CC = $(CROSS_COMPILE)gcc
>>
>
> It makes sense to fix the cross-compile problem now, since
> this patch is extending the support to other archs.
>
> thanks,
> -- Shuah
>
>
Please address the cross-compile problems in your next patch version.
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/3] kcmp: Move kcmp.h into uapi
2014-11-28 2:18 ` Michael Ellerman
@ 2014-12-01 17:00 ` Shuah Khan
2014-12-02 5:36 ` Michael Ellerman
0 siblings, 1 reply; 18+ messages in thread
From: Shuah Khan @ 2014-12-01 17:00 UTC (permalink / raw)
To: Michael Ellerman, linux-kernel
Cc: linux-api, Andrew Morton, gorcunov, Shuah Khan
On 11/27/2014 07:18 PM, Michael Ellerman wrote:
> On Thu, 2014-10-23 at 16:07 +1100, Michael Ellerman wrote:
>> kcmp.h appears to be part of the API, it's documented in kcmp(2), and
>> the selftests/kcmp code uses it. So move it to uapi so it's actually
>> exported.
>
> Looks like this series fell through the cracks?
>
> It still applies on rc6. Should I resend?
>
> cheers
>
>> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
I am expecting a patch v2 for the series based on the comments
on the series. Please see my responses to the individual patch
threads.
thanks,
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/3] kcmp: Move kcmp.h into uapi
2014-12-01 17:00 ` Shuah Khan
@ 2014-12-02 5:36 ` Michael Ellerman
0 siblings, 0 replies; 18+ messages in thread
From: Michael Ellerman @ 2014-12-02 5:36 UTC (permalink / raw)
To: Shuah Khan; +Cc: linux-kernel, linux-api, Andrew Morton, gorcunov
On Mon, 2014-12-01 at 10:00 -0700, Shuah Khan wrote:
> On 11/27/2014 07:18 PM, Michael Ellerman wrote:
> > On Thu, 2014-10-23 at 16:07 +1100, Michael Ellerman wrote:
> >> kcmp.h appears to be part of the API, it's documented in kcmp(2), and
> >> the selftests/kcmp code uses it. So move it to uapi so it's actually
> >> exported.
> >
> > Looks like this series fell through the cracks?
> >
> > It still applies on rc6. Should I resend?
> >
> > cheers
> >
> >> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>
> I am expecting a patch v2 for the series based on the comments
> on the series. Please see my responses to the individual patch
> threads.
Sure, will repost.
cheers
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/3] selftests/kcmp: Always try to build the test
2014-10-23 13:06 ` Christopher Covington
2014-10-23 13:52 ` Shuah Khan
@ 2014-12-02 5:44 ` Michael Ellerman
1 sibling, 0 replies; 18+ messages in thread
From: Michael Ellerman @ 2014-12-02 5:44 UTC (permalink / raw)
To: Christopher Covington
Cc: linux-kernel, shuahkh, linux-api, Andrew Morton, gorcunov
On Thu, 2014-10-23 at 09:06 -0400, Christopher Covington wrote:
> Hi Michael,
>
> On 10/23/2014 01:07 AM, Michael Ellerman wrote:
> > Don't prevent the test building on non-x86. Just try and build it and
> > let the chips fall where they may.
>
> As a user of kcmp via CRIU on arm and arm64, thanks!
>
> > diff --git a/tools/testing/selftests/kcmp/Makefile b/tools/testing/selftests/kcmp/Makefile
> > index 4f00c0524501..cda9cc4004c9 100644
> > --- a/tools/testing/selftests/kcmp/Makefile
> > +++ b/tools/testing/selftests/kcmp/Makefile
> > @@ -1,21 +1,7 @@
> > -uname_M := $(shell uname -m 2>/dev/null || echo not)
> > -ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/)
> > -ifeq ($(ARCH),i386)
> > - ARCH := x86
> > - CFLAGS := -DCONFIG_X86_32 -D__i386__
> > -endif
> > -ifeq ($(ARCH),x86_64)
> > - ARCH := x86
> > - CFLAGS := -DCONFIG_X86_64 -D__x86_64__
> > -endif
> > CFLAGS += -I../../../../usr/include/
> >
> > all:
> > -ifeq ($(ARCH),x86)
> > gcc $(CFLAGS) kcmp_test.c -o kcmp_test
>
> Not that this needs to be addressed in this patch, but this looks broken for
> cross compilation. It looks like some of the other selftests use:
>
> CC = $(CROSS_COMPILE)gcc
>
> But perhaps this should be set (and perhaps with ':=') once at the top level.
The best solution IMHO is:
CC := $(CROSS_COMPILE)$(CC)
Because it allows cross compiling, but also allows overriding of CC.
Will resend with that change.
cheers
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/3] selftests/kcmp: Always try to build the test
2014-10-23 6:09 ` Cyrill Gorcunov
@ 2014-12-02 5:53 ` Michael Ellerman
0 siblings, 0 replies; 18+ messages in thread
From: Michael Ellerman @ 2014-12-02 5:53 UTC (permalink / raw)
To: Cyrill Gorcunov; +Cc: linux-kernel, shuahkh, linux-api, Andrew Morton
On Thu, 2014-10-23 at 10:09 +0400, Cyrill Gorcunov wrote:
> On Thu, Oct 23, 2014 at 04:07:14PM +1100, Michael Ellerman wrote:
> > Don't prevent the test building on non-x86. Just try and build it and
> > let the chips fall where they may.
> >
> > Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>
> kcmp depends on checkpoint/restore config symbol which is known
> to work on x86 and (iirc) on arm, that's why x86 was only allowed.
> I don't mind to such change but not sure.
Yeah I understand. It's helpful for the other architectures to be able to build
the test, that way we at least know that it's something we should think about
implementing/fixing. If the test doesn't build at all then we just ignore it :)
cheers
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 1/3] kcmp: Move kcmp.h into uapi
@ 2014-12-02 5:52 Michael Ellerman
0 siblings, 0 replies; 18+ messages in thread
From: Michael Ellerman @ 2014-12-02 5:52 UTC (permalink / raw)
To: linux-kernel; +Cc: shuahkh, Andrew Morton, gorcunov, Arnd Bergmann, cov
kcmp.h appears to be part of the API, it's documented in kcmp(2), and
the selftests/kcmp code uses it. So move it to uapi so it's actually
exported.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
include/linux/kcmp.h | 17 -----------------
include/uapi/linux/Kbuild | 1 +
include/uapi/linux/kcmp.h | 17 +++++++++++++++++
3 files changed, 18 insertions(+), 17 deletions(-)
delete mode 100644 include/linux/kcmp.h
create mode 100644 include/uapi/linux/kcmp.h
diff --git a/include/linux/kcmp.h b/include/linux/kcmp.h
deleted file mode 100644
index 2dcd1b3aafc8..000000000000
--- a/include/linux/kcmp.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef _LINUX_KCMP_H
-#define _LINUX_KCMP_H
-
-/* Comparison type */
-enum kcmp_type {
- KCMP_FILE,
- KCMP_VM,
- KCMP_FILES,
- KCMP_FS,
- KCMP_SIGHAND,
- KCMP_IO,
- KCMP_SYSVSEM,
-
- KCMP_TYPES,
-};
-
-#endif /* _LINUX_KCMP_H */
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index 4c94f31a8c99..a7b3071c03f2 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -211,6 +211,7 @@ header-y += ivtvfb.h
header-y += ixjuser.h
header-y += jffs2.h
header-y += joystick.h
+header-y += kcmp.h
header-y += kd.h
header-y += kdev_t.h
header-y += kernel-page-flags.h
diff --git a/include/uapi/linux/kcmp.h b/include/uapi/linux/kcmp.h
new file mode 100644
index 000000000000..84df14b37360
--- /dev/null
+++ b/include/uapi/linux/kcmp.h
@@ -0,0 +1,17 @@
+#ifndef _UAPI_LINUX_KCMP_H
+#define _UAPI_LINUX_KCMP_H
+
+/* Comparison type */
+enum kcmp_type {
+ KCMP_FILE,
+ KCMP_VM,
+ KCMP_FILES,
+ KCMP_FS,
+ KCMP_SIGHAND,
+ KCMP_IO,
+ KCMP_SYSVSEM,
+
+ KCMP_TYPES,
+};
+
+#endif /* _UAPI_LINUX_KCMP_H */
--
1.9.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
end of thread, other threads:[~2014-12-02 5:53 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-23 5:07 [PATCH 1/3] kcmp: Move kcmp.h into uapi Michael Ellerman
2014-10-23 5:07 ` [PATCH 2/3] selftests/kcmp: Don't include kernel headers Michael Ellerman
2014-10-23 6:05 ` Cyrill Gorcunov
2014-10-23 5:07 ` [PATCH 3/3] selftests/kcmp: Always try to build the test Michael Ellerman
2014-10-23 6:09 ` Cyrill Gorcunov
2014-12-02 5:53 ` Michael Ellerman
2014-10-23 13:06 ` Christopher Covington
2014-10-23 13:52 ` Shuah Khan
2014-12-01 16:58 ` Shuah Khan
2014-12-02 5:44 ` Michael Ellerman
2014-10-23 6:04 ` [PATCH 1/3] kcmp: Move kcmp.h into uapi Cyrill Gorcunov
2014-10-23 7:49 ` Arnd Bergmann
2014-10-23 8:14 ` Cyrill Gorcunov
2014-12-01 16:57 ` Shuah Khan
2014-11-28 2:18 ` Michael Ellerman
2014-12-01 17:00 ` Shuah Khan
2014-12-02 5:36 ` Michael Ellerman
2014-12-02 5:52 Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).