2020-07-27 10:03:39

by Cixi Geng

[permalink] [raw]
Subject: kunit compile failed on um

Hi Brendan:
When I run kunit test in um , it failed on kernel 5.8-rc* while
succeeded in v5.7 with same configuration. is this a bug?

Here is my operation:
gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)

the kunitconfig:
Cixi.Geng:~/git-projects/torvals-linux$ cat .kunitconfig
CONFIG_KUNIT=y
CONFIG_KUNIT_TEST=y
CONFIG_KUNIT_EXAMPLE_TEST=y

command:
Cixi.Geng:~/git-projects/torvals-linux$ ./tools/testing/kunit/kunit.py run

the Error log:
[17:51:14] Configuring KUnit Kernel ...
[17:51:14] Building KUnit Kernel ...
ERROR:root:b"make[1]:
\xe8\xbf\x9b\xe5\x85\xa5\xe7\x9b\xae\xe5\xbd\x95\xe2\x80\x9c/home/cixi.geng1/git-projects/torvals-linux/.kunit\xe2\x80\x9d\n/home/cixi.geng1/git-projects/torvals-linux/Makefile:551:
recipe for target 'outputmakefile' failed\nmake[1]:
\xe7\xa6\xbb\xe5\xbc\x80\xe7\x9b\xae\xe5\xbd\x95\xe2\x80\x9c/home/cixi.geng1/git-projects/torvals-linux/.kunit\xe2\x80\x9d\nMakefile:185:
recipe for target '__sub-make' failed\n"


2020-07-27 21:30:02

by Brendan Higgins

[permalink] [raw]
Subject: Re: kunit compile failed on um

On Mon, Jul 27, 2020 at 3:01 AM Cixi Geng <[email protected]> wrote:
>
> Hi Brendan:
> When I run kunit test in um , it failed on kernel 5.8-rc* while
> succeeded in v5.7 with same configuration. is this a bug?
>
> Here is my operation:
> gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
>
> the kunitconfig:
> Cixi.Geng:~/git-projects/torvals-linux$ cat .kunitconfig
> CONFIG_KUNIT=y
> CONFIG_KUNIT_TEST=y
> CONFIG_KUNIT_EXAMPLE_TEST=y
>
> command:
> Cixi.Geng:~/git-projects/torvals-linux$ ./tools/testing/kunit/kunit.py run
>
> the Error log:
> [17:51:14] Configuring KUnit Kernel ...
> [17:51:14] Building KUnit Kernel ...
> ERROR:root:b"make[1]:
> \xe8\xbf\x9b\xe5\x85\xa5\xe7\x9b\xae\xe5\xbd\x95\xe2\x80\x9c/home/cixi.geng1/git-projects/torvals-linux/.kunit\xe2\x80\x9d\n/home/cixi.geng1/git-projects/torvals-linux/Makefile:551:
> recipe for target 'outputmakefile' failed\nmake[1]:
> \xe7\xa6\xbb\xe5\xbc\x80\xe7\x9b\xae\xe5\xbd\x95\xe2\x80\x9c/home/cixi.geng1/git-projects/torvals-linux/.kunit\xe2\x80\x9d\nMakefile:185:
> recipe for target '__sub-make' failed\n"

So we have a fix out for the cryptic error messages:

https://patchwork.kernel.org/patch/11652711/

But I believe it has not been picked up yet.

In the meantime, you should get more information by running

ls .kunit
make ARCH=um O=.kunit

Let us know if you have any additional questions.

2020-07-28 03:54:59

by Cixi Geng

[permalink] [raw]
Subject: Re: kunit compile failed on um

Here I found my error rootcause:

My Makefile add a Werror flag, So it wil build waring as error as the
follow code

../arch/um/os-Linux/signal.c: In function
\xe2\x80\x98sig_handler_common\xe2\x80\x99:
../arch/um/os-Linux/signal.c:51:1: error: the frame size of 2960 bytes
is larger than 2048 bytes [-Werror=frame-larger-than=]
}
^
../arch/um/os-Linux/signal.c: In function
\xe2\x80\x98timer_real_alarm_handler\xe2\x80\x99:
../arch/um/os-Linux/signal.c:95:1: error: the frame size of 2960 bytes
is larger than 2048 bytes [-Werror=frame-larger-than=]
}

and I add the CONFIG_FRAME_WARN=4096 in arch/um/x86_64_defconfig so
there was no error when I use make ARCH=um defconfig && make ARCH=um
BUT I found the commit ff7b437f36b026dcd7351f86a90a0424c891dc06 has
changed use make ARCH=um kunit_defconfig in kunit.py. So the error
happened.

Further More, I compare the different between use x86_64_defconfig and
kunit_defconfig, there is a big difference.
Can We use kunit_defconfig on the basis of the x86_64_defconfig ?
If the answer is ok, I would like to help add this functions

Brendan Higgins <[email protected]> 于2020年7月28日周二 上午5:29写道:
>
> On Mon, Jul 27, 2020 at 3:01 AM Cixi Geng <[email protected]> wrote:
> >
> > Hi Brendan:
> > When I run kunit test in um , it failed on kernel 5.8-rc* while
> > succeeded in v5.7 with same configuration. is this a bug?
> >
> > Here is my operation:
> > gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
> >
> > the kunitconfig:
> > Cixi.Geng:~/git-projects/torvals-linux$ cat .kunitconfig
> > CONFIG_KUNIT=y
> > CONFIG_KUNIT_TEST=y
> > CONFIG_KUNIT_EXAMPLE_TEST=y
> >
> > command:
> > Cixi.Geng:~/git-projects/torvals-linux$ ./tools/testing/kunit/kunit.py run
> >
> > the Error log:
> > [17:51:14] Configuring KUnit Kernel ...
> > [17:51:14] Building KUnit Kernel ...
> > ERROR:root:b"make[1]:
> > \xe8\xbf\x9b\xe5\x85\xa5\xe7\x9b\xae\xe5\xbd\x95\xe2\x80\x9c/home/cixi.geng1/git-projects/torvals-linux/.kunit\xe2\x80\x9d\n/home/cixi.geng1/git-projects/torvals-linux/Makefile:551:
> > recipe for target 'outputmakefile' failed\nmake[1]:
> > \xe7\xa6\xbb\xe5\xbc\x80\xe7\x9b\xae\xe5\xbd\x95\xe2\x80\x9c/home/cixi.geng1/git-projects/torvals-linux/.kunit\xe2\x80\x9d\nMakefile:185:
> > recipe for target '__sub-make' failed\n"
>
> So we have a fix out for the cryptic error messages:
>
> https://patchwork.kernel.org/patch/11652711/
>
> But I believe it has not been picked up yet.
>
> In the meantime, you should get more information by running
>
> ls .kunit
> make ARCH=um O=.kunit
>
> Let us know if you have any additional questions.