[Rd] make check fails due to NA / NaN mismatch

Korpela Mikko (MML) m|kko@korpe|@ @end|ng |rom m@@nm|tt@u@|@|to@@||
Mon Aug 31 10:46:55 CEST 2020


Thank you for the introduction to these recent changes, Martin.

I think this was the second time I ran "make check" on that platform (Raspberry Pi 32-bit), and the first time (some months ago) it worked fine. So, that makes it kind of "suddenly", although I must say that my use of "make check" is very irregular.

I compared code before and after the split you are referring to. The test in question changed in the process:

This is a snippet of "tests/d-p-q-r-tests.R" (lines 1030--1034) at revision 79079, just before the split:

if(!inherits(R$warning, "simpleWarning")) cat(" .. did *NOT* give a warning! ")
if(!(identical(R$value, expected))) { ## allow NA/NaN mismatch in these cases for now:
    if(!(dist %in% c("beta","f","t") && all(is.na(R$value))))
        cat(" .. not giving expected NA/NaN's ")
}

The corresponding piece of code in "tests/d-p-q-r-tst-2.R" (lines 588--591) after the split, at revision 79080, is:

if(!inherits(R$warning, "simpleWarning")) stop(" .. did *NOT* give a warning! ")
if(!(identical(R$value, expected))) { ## allow NA/NaN mismatch in these cases for now:
    stop(" .. not giving expected NA/NaN's ")
}

where the test is less forgiving, both with respect to the conditions and the type of "nag" (cat vs stop).

- Mikko

-----Alkuperäinen viesti-----
Lähettäjä: Martin Maechler <maechler using stat.math.ethz.ch> 
Lähetetty: maanantai 31. elokuuta 2020 10.44
Vastaanottaja: Korpela Mikko (MML) <mikko.korpela using maanmittauslaitos.fi>
Kopio: r-devel <r-devel using r-project.org>
Aihe: Re: [Rd] make check fails due to NA / NaN mismatch

>>>>> Korpela Mikko (MML) 
>>>>>     on Mon, 31 Aug 2020 06:23:59 +0000 writes:

    > It seems there is a problem in tests/d-p-q-r-tst-2.R (R-devel r79091): NA / NaN mismatch is not allowed by a test on lines 590--592, but the comment suggests otherwise. A run of "make check" fails there when tested on a Raspberry Pi with Raspberry Pi OS (based on Debian Buster): all 'NaN' is expected, but all 'NA' is returned when testing the function 'rf()' with 'ia == 1'.

Thank you, Mikko.

Note that I've recently split off the  tests/d-p-q-r-tst-2.R  file
from from the previously  longer       tests/d-p-q-r-tests.R  file,
mostly in order to drop the 'R CMD Rdiff .. *.Rout.save' testing from those parts.

However the *test* you mention has been in R's tests (in the tests//d-p-q-r-tests.R file)  for a very long time,  AFAICS.

So, I am a bit puzzled:  What you write seems to indicate that this is a new failure, but that is just one "between the lines"
interpretation, so let me ask to clarify:

Is it the first time you're running 'make check' on that platform and get that error?
or is it a platform you've been running 'make check' on R-devel for a while and only now you "suddenly" get that error?

Best,
Martin

    > Best regards,
    > Mikko Korpela
    > Maanmittauslaitos | National Land Survey of Finland
    > Opastinsilta 12 C, 00520 Helsinki, Finland



More information about the R-devel mailing list