glmGamPoi icon indicating copy to clipboard operation
glmGamPoi copied to clipboard

Tests fail on i386 (really i686): ailure: qres.gampoi can handle other weird values (@test-residuals.R#112) `a` is not strictly more than `b`. Difference: 0

Open mr-c opened this issue 3 years ago • 3 comments

Hello,

While packaging glmgampoi for Debian we noticed that the tests fail on 32bit x86

BEGIN TEST testthat.R

R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: i686-pc-linux-gnu (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(testthat)
> library(glmGamPoi)
> 
> test_check("glmGamPoi")
── 1. Failure: qres.gampoi can handle other weird values (@test-residuals.R#112)
`a` is not strictly more than `b`. Difference: 0

══ testthat results  ═══════════════════════════════════════════════════════════
Error: testthat unit tests failed
[ OK: 262 | SKIPPED: 3 | WARNINGS: 20 | FAILED: 1 ]
1. Failure: qres.gampoi can handle other weird values (@test-residuals.R#112) 

Execution halted

https://ci.debian.net/data/autopkgtest/testing/i386/r/r-bioc-glmgampoi/9733914/log.gz

mr-c avatar Jan 16 '21 13:01 mr-c

Hi Michael,

thanks for the report. If I understand the report correctly, it looks like this processor behaves like windows (see here). Maybe the underlying issue is related to 32bit vs 64 bit?

Could you tell me what

Sys.info()

returns on that machine?

Best, Constantin

const-ae avatar Jan 16 '21 13:01 const-ae

Hey Constantin,

Here's the result of Sys.info() on a similar machine:

$ R

R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: i686-pc-linux-gnu (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> Sys.info()
                                sysname                                 release 
                                "Linux"                       "4.19.0-13-amd64" 
                                version                                nodename 
"#1 SMP Debian 4.19.160-2 (2020-11-28)"                              "barriere" 
                                machine                                   login 
                                 "i686"                                "crusoe" 
                                   user                          effective_user 
                               "crusoe"                                "crusoe" 

mr-c avatar Jan 16 '21 13:01 mr-c

Looking into this further, I think the test can safely be skipped on i686, at least for Debian, as it doesn't exhibit the weird behavior; therefore there is no reason to test the coping mechanism, which is the point of this test.

So I've applied the following patch to the Debian package:

From: Michael R. Crusoe <[email protected]>
Subject: i686 does not exhibit the tested issue
--- r-bioc-glmgampoi.orig/tests/testthat/test-residuals.R
+++ r-bioc-glmgampoi/tests/testthat/test-residuals.R
@@ -98,6 +98,9 @@


 test_that("qres.gampoi can handle other weird values", {
+  if(R.version$arch == "i686") {
+    skip("i686 does not exhibit this weird issue.")
+  }
   # This specific combination of parameters caused NA's
   Y <- matrix(27)
   Mu <- matrix(0.435023)

mr-c avatar Jan 28 '21 13:01 mr-c