2012-11-24 08:32:07

by Dave Young

[permalink] [raw]
Subject: [patch 6/8] kcmp selftests: build fix

For old glibc there's no the syscall number this tests will cause
make run_tests fail.
Add a macro to define the number. This should be ok because it will be
built in latest kernel source.

Signed-off-by: Dave Young <[email protected]>
---
tools/testing/selftests/kcmp/kcmp_test.c | 3 +++
1 file changed, 3 insertions(+)

--- linux-2.6.orig/tools/testing/selftests/kcmp/kcmp_test.c 2012-11-23 22:37:04.789058192 +0800
+++ linux-2.6/tools/testing/selftests/kcmp/kcmp_test.c 2012-11-23 22:38:43.195191747 +0800
@@ -17,6 +17,9 @@
#include <sys/stat.h>
#include <sys/wait.h>

+#ifndef __NR_kcmp
+#define __NR_kcmp 272
+#endif
static long sys_kcmp(int pid1, int pid2, int type, int fd1, int fd2)
{
return syscall(__NR_kcmp, pid1, pid2, type, fd1, fd2);


2012-11-24 09:41:27

by Pekka Enberg

[permalink] [raw]
Subject: Re: [patch 6/8] kcmp selftests: build fix

On Sat, Nov 24, 2012 at 10:29 AM, <[email protected]> wrote:
> For old glibc there's no the syscall number this tests will cause
> make run_tests fail.
> Add a macro to define the number. This should be ok because it will be
> built in latest kernel source.
>
> Signed-off-by: Dave Young <[email protected]>
> ---
> tools/testing/selftests/kcmp/kcmp_test.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> --- linux-2.6.orig/tools/testing/selftests/kcmp/kcmp_test.c 2012-11-23 22:37:04.789058192 +0800
> +++ linux-2.6/tools/testing/selftests/kcmp/kcmp_test.c 2012-11-23 22:38:43.195191747 +0800
> @@ -17,6 +17,9 @@
> #include <sys/stat.h>
> #include <sys/wait.h>
>
> +#ifndef __NR_kcmp
> +#define __NR_kcmp 272
> +#endif

Is the syscall number really going to be the same across all architectures?

> static long sys_kcmp(int pid1, int pid2, int type, int fd1, int fd2)
> {
> return syscall(__NR_kcmp, pid1, pid2, type, fd1, fd2);
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

2012-11-25 03:02:48

by Dave Young

[permalink] [raw]
Subject: Re: [patch 6/8] kcmp selftests: build fix

On Sat, Nov 24, 2012 at 11:41:23AM +0200, Pekka Enberg wrote:
> On Sat, Nov 24, 2012 at 10:29 AM, <[email protected]> wrote:
> > For old glibc there's no the syscall number this tests will cause
> > make run_tests fail.
> > Add a macro to define the number. This should be ok because it will be
> > built in latest kernel source.
> >
> > Signed-off-by: Dave Young <[email protected]>
> > ---
> > tools/testing/selftests/kcmp/kcmp_test.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > --- linux-2.6.orig/tools/testing/selftests/kcmp/kcmp_test.c 2012-11-23 22:37:04.789058192 +0800
> > +++ linux-2.6/tools/testing/selftests/kcmp/kcmp_test.c 2012-11-23 22:38:43.195191747 +0800
> > @@ -17,6 +17,9 @@
> > #include <sys/stat.h>
> > #include <sys/wait.h>
> >
> > +#ifndef __NR_kcmp
> > +#define __NR_kcmp 272
> > +#endif
>
> Is the syscall number really going to be the same across all architectures?

Oh, they are different. self NACK. Please ignore this patch.

>
> > static long sys_kcmp(int pid1, int pid2, int type, int fd1, int fd2)
> > {
> > return syscall(__NR_kcmp, pid1, pid2, type, fd1, fd2);
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to [email protected]
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/