linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [kselftests/powerpc] Primitives test build failure with linux-next
@ 2024-02-29 13:53 Sachin Sant
  2024-02-29 17:14 ` Andy Shevchenko
  2024-02-29 22:18 ` Michael Ellerman
  0 siblings, 2 replies; 5+ messages in thread
From: Sachin Sant @ 2024-02-29 13:53 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: tanzhasanwork, andy.shevchenko, linux-kselftest

Powerpc specific selftests (specifically powerpc/primitives) included in linux-next
tree fails to build with following error

gcc -std=gnu99 -O2 -Wall -Werror -DGIT_VERSION='"next-20240229-0-gf303a3e2bcfb-dirty"' -I/home/sachin/linux-next/tools/testing/selftests/powerpc/include  -I/home/sachin/linux-next/tools/testing/selftests/powerpc/primitives    load_unaligned_zeropad.c ../harness.c  -o /home/sachin/linux-next/tools/testing/selftests/powerpc/primitives/load_unaligned_zeropad
In file included from load_unaligned_zeropad.c:26:
word-at-a-time.h:7:10: fatal error: linux/bitops.h: No such file or directory
    7 | #include <linux/bitops.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.

The header file in question was last changed by following commit

commit 66a5c40f60f5d88ad8d47ba6a4ba05892853fa1f
    kernel.h: removed REPEAT_BYTE from kernel.h

Thanks
— Sachin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [kselftests/powerpc] Primitives test build failure with linux-next
  2024-02-29 13:53 [kselftests/powerpc] Primitives test build failure with linux-next Sachin Sant
@ 2024-02-29 17:14 ` Andy Shevchenko
  2024-02-29 22:57   ` Michael Ellerman
  2024-02-29 22:18 ` Michael Ellerman
  1 sibling, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2024-02-29 17:14 UTC (permalink / raw)
  To: Sachin Sant; +Cc: tanzhasanwork, linuxppc-dev, linux-kselftest

On Thu, Feb 29, 2024 at 3:53 PM Sachin Sant <sachinp@linux.ibm.com> wrote:
>
> Powerpc specific selftests (specifically powerpc/primitives) included in linux-next
> tree fails to build with following error
>
> gcc -std=gnu99 -O2 -Wall -Werror -DGIT_VERSION='"next-20240229-0-gf303a3e2bcfb-dirty"' -I/home/sachin/linux-next/tools/testing/selftests/powerpc/include  -I/home/sachin/linux-next/tools/testing/selftests/powerpc/primitives    load_unaligned_zeropad.c ../harness.c  -o /home/sachin/linux-next/tools/testing/selftests/powerpc/primitives/load_unaligned_zeropad
> In file included from load_unaligned_zeropad.c:26:
> word-at-a-time.h:7:10: fatal error: linux/bitops.h: No such file or directory
>     7 | #include <linux/bitops.h>
>       |          ^~~~~~~~~~~~~~~~
> compilation terminated.
>
> The header file in question was last changed by following commit
>
> commit 66a5c40f60f5d88ad8d47ba6a4ba05892853fa1f
>     kernel.h: removed REPEAT_BYTE from kernel.h

Thanks for the report.
What is missing here are the steps to reproduce it here. E.g., I have
an x86_64 machine, I can use QEMU if required.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [kselftests/powerpc] Primitives test build failure with linux-next
  2024-02-29 13:53 [kselftests/powerpc] Primitives test build failure with linux-next Sachin Sant
  2024-02-29 17:14 ` Andy Shevchenko
@ 2024-02-29 22:18 ` Michael Ellerman
  2024-03-01  3:57   ` Sachin Sant
  1 sibling, 1 reply; 5+ messages in thread
From: Michael Ellerman @ 2024-02-29 22:18 UTC (permalink / raw)
  To: Sachin Sant, linuxppc-dev; +Cc: tanzhasanwork, andy.shevchenko, linux-kselftest

Sachin Sant <sachinp@linux.ibm.com> writes:
> Powerpc specific selftests (specifically powerpc/primitives) included in linux-next
> tree fails to build with following error
>
> gcc -std=gnu99 -O2 -Wall -Werror -DGIT_VERSION='"next-20240229-0-gf303a3e2bcfb-dirty"' -I/home/sachin/linux-next/tools/testing/selftests/powerpc/include  -I/home/sachin/linux-next/tools/testing/selftests/powerpc/primitives    load_unaligned_zeropad.c ../harness.c  -o /home/sachin/linux-next/tools/testing/selftests/powerpc/primitives/load_unaligned_zeropad
> In file included from load_unaligned_zeropad.c:26:
> word-at-a-time.h:7:10: fatal error: linux/bitops.h: No such file or directory
>     7 | #include <linux/bitops.h>
>       |          ^~~~~~~~~~~~~~~~
> compilation terminated.
>
> The header file in question was last changed by following commit
>
> commit 66a5c40f60f5d88ad8d47ba6a4ba05892853fa1f
>     kernel.h: removed REPEAT_BYTE from kernel.h

Patch below should fix it, can you please confirm?

cheers


From f165de102de33704a54b892b689630bfa9a79132 Mon Sep 17 00:00:00 2001
From: Michael Ellerman <mpe@ellerman.id.au>
Date: Fri, 1 Mar 2024 09:16:31 +1100
Subject: [PATCH] Fix word-at-a-time test failure

---
 tools/testing/selftests/powerpc/primitives/linux/bitops.h   | 0
 tools/testing/selftests/powerpc/primitives/linux/wordpart.h | 1 +
 2 files changed, 1 insertion(+)
 create mode 100644 tools/testing/selftests/powerpc/primitives/linux/bitops.h
 create mode 120000 tools/testing/selftests/powerpc/primitives/linux/wordpart.h

diff --git a/tools/testing/selftests/powerpc/primitives/linux/bitops.h b/tools/testing/selftests/powerpc/primitives/linux/bitops.h
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/tools/testing/selftests/powerpc/primitives/linux/wordpart.h b/tools/testing/selftests/powerpc/primitives/linux/wordpart.h
new file mode 120000
index 000000000000..4a74d2cbbc9b
--- /dev/null
+++ b/tools/testing/selftests/powerpc/primitives/linux/wordpart.h
@@ -0,0 +1 @@
+../../../../../../include/linux/wordpart.h
\ No newline at end of file
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [kselftests/powerpc] Primitives test build failure with linux-next
  2024-02-29 17:14 ` Andy Shevchenko
@ 2024-02-29 22:57   ` Michael Ellerman
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2024-02-29 22:57 UTC (permalink / raw)
  To: Andy Shevchenko, Sachin Sant; +Cc: tanzhasanwork, linuxppc-dev, linux-kselftest

Andy Shevchenko <andy.shevchenko@gmail.com> writes:
> On Thu, Feb 29, 2024 at 3:53 PM Sachin Sant <sachinp@linux.ibm.com> wrote:
>>
>> Powerpc specific selftests (specifically powerpc/primitives) included in linux-next
>> tree fails to build with following error
>>
>> gcc -std=gnu99 -O2 -Wall -Werror -DGIT_VERSION='"next-20240229-0-gf303a3e2bcfb-dirty"' -I/home/sachin/linux-next/tools/testing/selftests/powerpc/include  -I/home/sachin/linux-next/tools/testing/selftests/powerpc/primitives    load_unaligned_zeropad.c ../harness.c  -o /home/sachin/linux-next/tools/testing/selftests/powerpc/primitives/load_unaligned_zeropad
>> In file included from load_unaligned_zeropad.c:26:
>> word-at-a-time.h:7:10: fatal error: linux/bitops.h: No such file or directory
>>     7 | #include <linux/bitops.h>
>>       |          ^~~~~~~~~~~~~~~~
>> compilation terminated.
>>
>> The header file in question was last changed by following commit
>>
>> commit 66a5c40f60f5d88ad8d47ba6a4ba05892853fa1f
>>     kernel.h: removed REPEAT_BYTE from kernel.h
>
> Thanks for the report.
> What is missing here are the steps to reproduce it here. E.g., I have
> an x86_64 machine, I can use QEMU if required.

The patch I just posted should fix it.

Cross building the selftests is not too hard, you need a cross toolchain
with libc. There's some instructions on our wiki[1], the tldr is:

  cd ~/tmp
  wget https://toolchains.bootlin.com/downloads/releases/toolchains/powerpc64le-power8/tarballs/powerpc64le-power8--glibc--stable-2023.11-1.tar.bz2
  tar -xf powerpc64le-power8--glibc--stable-2023.11-1.tar.bz2
  export CROSS_COMPILE=$PWD/powerpc64le-power8--glibc--stable-2023.11-1/bin/powerpc64le-linux-
  cd ~/src/linux
  export ARCH=powerpc
  make defconfig
  make headers
  make -C tools/testing/selftests/powerpc

cheers

1: https://github.com/linuxppc/wiki/wiki/Building-powerpc-kernels

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [kselftests/powerpc] Primitives test build failure with linux-next
  2024-02-29 22:18 ` Michael Ellerman
@ 2024-03-01  3:57   ` Sachin Sant
  0 siblings, 0 replies; 5+ messages in thread
From: Sachin Sant @ 2024-03-01  3:57 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: tanzhasanwork, andy.shevchenko, linuxppc-dev, linux-kselftest



> On 01-Mar-2024, at 3:48 AM, Michael Ellerman <mpe@ellerman.id.au> wrote:
> 
> Sachin Sant <sachinp@linux.ibm.com> writes:
>> Powerpc specific selftests (specifically powerpc/primitives) included in linux-next
>> tree fails to build with following error
>> 
>> gcc -std=gnu99 -O2 -Wall -Werror -DGIT_VERSION='"next-20240229-0-gf303a3e2bcfb-dirty"' -I/home/sachin/linux-next/tools/testing/selftests/powerpc/include  -I/home/sachin/linux-next/tools/testing/selftests/powerpc/primitives    load_unaligned_zeropad.c ../harness.c  -o /home/sachin/linux-next/tools/testing/selftests/powerpc/primitives/load_unaligned_zeropad
>> In file included from load_unaligned_zeropad.c:26:
>> word-at-a-time.h:7:10: fatal error: linux/bitops.h: No such file or directory
>>    7 | #include <linux/bitops.h>
>>      |          ^~~~~~~~~~~~~~~~
>> compilation terminated.
>> 
>> The header file in question was last changed by following commit
>> 
>> commit 66a5c40f60f5d88ad8d47ba6a4ba05892853fa1f
>>    kernel.h: removed REPEAT_BYTE from kernel.h
> 
> Patch below should fix it, can you please confirm?
> 
Thanks Michael. Yes, this fixes the reported problem.

Tested-by: Sachin Sant <sachinp@linux.ibm.com>


— Sachin

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-01  3:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-29 13:53 [kselftests/powerpc] Primitives test build failure with linux-next Sachin Sant
2024-02-29 17:14 ` Andy Shevchenko
2024-02-29 22:57   ` Michael Ellerman
2024-02-29 22:18 ` Michael Ellerman
2024-03-01  3:57   ` Sachin Sant

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).