tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [uvm_hotplug] Fixing the build of tests



On Sat, Dec 15, 2018 at 11:15 AM Paul Goyette <paul%whooppee.com@localhost> wrote:
>
> On Sat, 15 Dec 2018, Santhosh Raju wrote:
>
> > Hello
> >
> > I noticed that the tests for uvm_hotplug(9) situated under
> > tests/sys/uvm/t_uvm_physseg.c was failing build.
> >
> > The reason for failure was the comparison between psize_t (which is
> > defined as unsigned log inside t_uvm_hotplug.c) and int resulting in a
> > sign compare error (-Werror=sign-compare). This was used to compare
> > the "npages"  variable inside uvmexp struct.
> >
> > I have fixed the build by doing a type cast of uvmexp.npages to
> > psize_t and the changes have been attached as diff along with this
> > mail. The rationale for this is that uvmexp.npages is not expected to
> > go below zero and hence the type cast does not result in negative
> > values being converted to unsigned long.
> >
> > Cherry and I initially worked on this part of the code. And I would
> > like the tests to be able to build again, so that I can further probe
> > why some tests are failing.
> >
> > The test is currently not hooked into the build system, so this does
> > not cause build failures when building the kernel.
>
> These tests should probably be migrated to use the atf framework.
>

They do use the ATF framework. The tests are written using the ATF framework.

You can do a atf-run | atf-report after applying the patch to get a report.

>
>
> +------------------+--------------------------+----------------------------+
> | Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
> | (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
> | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
> +------------------+--------------------------+----------------------------+

--
Santhosh


Home | Main Index | Thread Index | Old Index