* Running KUnit using the wrapper script
@ 2023-03-23 1:08 Mark Brown
2023-03-23 1:31 ` David Gow
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2023-03-23 1:08 UTC (permalink / raw)
To: David Gow, Brendan Higgins
Cc: kunit-dev, linux-kselftest, Richard Weinberger, Johannes Berg, linux-um
[-- Attachment #1.1: Type: text/plain, Size: 3550 bytes --]
I've been trying to do some stuff with KUnit but I can't seem to
find a current tree where KUnit builds. Running on Debian stable
starting from a clean -next tree and running:
./tools/testing/kunit/kunit.py config
./tools/testing/kunit/kunit.py build
based on Documentation/dev-tools/kunit/start.rst. However I get:
[00:42:59] Configuring KUnit Kernel ...
[00:42:59] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=8
ERROR:root:In file included from /usr/include/stdlib.h:1013,
from ../arch/x86/um/os-Linux/registers.c:8:
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: In function ‘atof’:
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:26:1: error: SSE register return with SSE disabled
26 | {
| ^
make[4]: *** [../scripts/Makefile.build:252: arch/x86/um/os-Linux/registers.o] Error 1
make[3]: *** [../scripts/Makefile.build:494: arch/x86/um/os-Linux] Error 2
make[3]: *** Waiting for unfinished jobs....
In file included from /usr/include/stdlib.h:1013,
from ../arch/um/drivers/fd.c:7:
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: In function ‘atof’:
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:26:1: error: SSE register return with SSE disabled
26 | {
| ^
make[3]: *** [../scripts/Makefile.build:252: arch/um/drivers/fd.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from /usr/include/stdlib.h:1013,
from ../arch/um/os-Linux/skas/process.c:7:
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: In function ‘atof’:
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:26:1: error: SSE register return with SSE disabled
26 | {
| ^
make[4]: *** [../scripts/Makefile.build:252: arch/um/os-Linux/skas/process.o] Error 1
make[3]: *** [../scripts/Makefile.build:494: arch/um/os-Linux/skas] Error 2
make[2]: *** [../scripts/Makefile.build:494: arch/um/os-Linux] Error 2
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [../scripts/Makefile.build:494: arch/x86/um] Error 2
make[2]: *** [../scripts/Makefile.build:494: arch/um/drivers] Error 2
In file included from /usr/include/stdlib.h:1013,
from arch/um/kernel/config.c:7:
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h: In function ‘atof’:
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:26:1: error: SSE register return with SSE disabled
26 | {
| ^
make[3]: *** [../scripts/Makefile.build:252: arch/um/kernel/config.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [../scripts/Makefile.build:494: arch/um/kernel] Error 2
make[1]: *** [/home/broonie/git/bisect/Makefile:2028: .] Error 2
make: *** [Makefile:226: __sub-make] Error 2
[00:43:20] Elapsed time: 20.233s
which isn't ideal. v6.2 is also broken, albeit differently:
ERROR:root:`.exit.text' referenced in section `.uml.exitcall.exit' of arch/um/drivers/virtio_uml.o: defined in discarded section `.exit.text' of arch/um/drivers/virtio_uml.o
collect2: error: ld returned 1 exit status
make[2]: *** [../scripts/Makefile.vmlinux:35: vmlinux] Error 1
make[1]: *** [/home/broonie/git/linux/Makefile:1264: vmlinux] Error 2
make: *** [Makefile:242: __sub-make] Error 2
which makes bisecting a bit of an issue. The kunit-fixes, kunit
and kunit-next trees in -next have the former error. Can anyone
point me at a tree/config/commands that's suitable for working on
KUnit at the minute?
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Running KUnit using the wrapper script
2023-03-23 1:08 Running KUnit using the wrapper script Mark Brown
@ 2023-03-23 1:31 ` David Gow
2023-03-25 12:39 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: David Gow @ 2023-03-23 1:31 UTC (permalink / raw)
To: David Gow, Brendan Higgins, kunit-dev, linux-kselftest,
Richard Weinberger, Johannes Berg, linux-um
[-- Attachment #1.1: Type: text/plain, Size: 4713 bytes --]
On Thu, 23 Mar 2023 at 09:08, Mark Brown <broonie@kernel.org> wrote:
>
> I've been trying to do some stuff with KUnit but I can't seem to
> find a current tree where KUnit builds. Running on Debian stable
> starting from a clean -next tree and running:
>
> ./tools/testing/kunit/kunit.py config
> ./tools/testing/kunit/kunit.py build
>
> based on Documentation/dev-tools/kunit/start.rst. However I get:
>
> [00:42:59] Configuring KUnit Kernel ...
> [00:42:59] Building KUnit Kernel ...
> Populating config with:
> $ make ARCH=um O=.kunit olddefconfig
> Building with:
> $ make ARCH=um O=.kunit --jobs=8
> ERROR:root:In file included from /usr/include/stdlib.h:1013,
> from ../arch/x86/um/os-Linux/registers.c:8:
> /usr/include/x86_64-linux-gnu/bits/stdlib-float.h: In function ‘atof’:
> /usr/include/x86_64-linux-gnu/bits/stdlib-float.h:26:1: error: SSE register return with SSE disabled
> 26 | {
> | ^
> make[4]: *** [../scripts/Makefile.build:252: arch/x86/um/os-Linux/registers.o] Error 1
> make[3]: *** [../scripts/Makefile.build:494: arch/x86/um/os-Linux] Error 2
> make[3]: *** Waiting for unfinished jobs....
> In file included from /usr/include/stdlib.h:1013,
> from ../arch/um/drivers/fd.c:7:
> /usr/include/x86_64-linux-gnu/bits/stdlib-float.h: In function ‘atof’:
> /usr/include/x86_64-linux-gnu/bits/stdlib-float.h:26:1: error: SSE register return with SSE disabled
> 26 | {
> | ^
> make[3]: *** [../scripts/Makefile.build:252: arch/um/drivers/fd.o] Error 1
> make[3]: *** Waiting for unfinished jobs....
> In file included from /usr/include/stdlib.h:1013,
> from ../arch/um/os-Linux/skas/process.c:7:
> /usr/include/x86_64-linux-gnu/bits/stdlib-float.h: In function ‘atof’:
> /usr/include/x86_64-linux-gnu/bits/stdlib-float.h:26:1: error: SSE register return with SSE disabled
> 26 | {
> | ^
> make[4]: *** [../scripts/Makefile.build:252: arch/um/os-Linux/skas/process.o] Error 1
> make[3]: *** [../scripts/Makefile.build:494: arch/um/os-Linux/skas] Error 2
> make[2]: *** [../scripts/Makefile.build:494: arch/um/os-Linux] Error 2
> make[2]: *** Waiting for unfinished jobs....
> make[2]: *** [../scripts/Makefile.build:494: arch/x86/um] Error 2
> make[2]: *** [../scripts/Makefile.build:494: arch/um/drivers] Error 2
> In file included from /usr/include/stdlib.h:1013,
> from arch/um/kernel/config.c:7:
> /usr/include/x86_64-linux-gnu/bits/stdlib-float.h: In function ‘atof’:
> /usr/include/x86_64-linux-gnu/bits/stdlib-float.h:26:1: error: SSE register return with SSE disabled
> 26 | {
> | ^
> make[3]: *** [../scripts/Makefile.build:252: arch/um/kernel/config.o] Error 1
> make[3]: *** Waiting for unfinished jobs....
> make[2]: *** [../scripts/Makefile.build:494: arch/um/kernel] Error 2
> make[1]: *** [/home/broonie/git/bisect/Makefile:2028: .] Error 2
> make: *** [Makefile:226: __sub-make] Error 2
>
> [00:43:20] Elapsed time: 20.233s
Hi Mark,
This one is my fault, I'm afraid. We're triggering a bug in older gcc
versions (<11) at the moment.
Patch to work around it is here, or it should be fine with gcc >= 11 or clang:
https://lore.kernel.org/linux-um/20230318041555.4192172-1-davidgow@google.com/
(The gcc bug is described here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99652 )
>
> which isn't ideal. v6.2 is also broken, albeit differently:
>
> ERROR:root:`.exit.text' referenced in section `.uml.exitcall.exit' of arch/um/drivers/virtio_uml.o: defined in discarded section `.exit.text' of arch/um/drivers/virtio_uml.o
> collect2: error: ld returned 1 exit status
> make[2]: *** [../scripts/Makefile.vmlinux:35: vmlinux] Error 1
> make[1]: *** [/home/broonie/git/linux/Makefile:1264: vmlinux] Error 2
> make: *** [Makefile:242: __sub-make] Error 2
>
Hmm... I haven't seen this one here: v6.2 builds and runs fine with
gcc 10, 11, and clang 14.
Looks like maybe it's an issue with older binutils. Maybe this patch
will fix it:
https://lore.kernel.org/all/20230207164156.537378-1-masahiroy@kernel.org/
> which makes bisecting a bit of an issue. The kunit-fixes, kunit
> and kunit-next trees in -next have the former error. Can anyone
> point me at a tree/config/commands that's suitable for working on
> KUnit at the minute?
The most convenient workarounds (other than having newer gcc /
binutils) are probably to either run against a different architecture
(e.g. --arch x86_64) or to build with clang (--make_options LLVM=1).
Those should be a bit more stable for bisections than UML on the older
gcc versions.
Sorry for the mess!
-- David
[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4003 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Running KUnit using the wrapper script
2023-03-23 1:31 ` David Gow
@ 2023-03-25 12:39 ` Mark Brown
0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2023-03-25 12:39 UTC (permalink / raw)
To: David Gow
Cc: Brendan Higgins, kunit-dev, linux-kselftest, Richard Weinberger,
Johannes Berg, linux-um
[-- Attachment #1.1: Type: text/plain, Size: 436 bytes --]
On Thu, Mar 23, 2023 at 09:31:10AM +0800, David Gow wrote:
> The most convenient workarounds (other than having newer gcc /
> binutils) are probably to either run against a different architecture
> (e.g. --arch x86_64) or to build with clang (--make_options LLVM=1).
> Those should be a bit more stable for bisections than UML on the older
> gcc versions.
Running with --arch x86_64 or arm64 seems to work around the
problem, thanks!
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-25 12:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23 1:08 Running KUnit using the wrapper script Mark Brown
2023-03-23 1:31 ` David Gow
2023-03-25 12:39 ` Mark Brown
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).