eddelbuettel / digest

R package to create compact hash digests of R objects
https://eddelbuettel.github.io/digest
111 stars 47 forks source link

Some test errors on PowerPC: 15 out of 279 tests failed. Endianness is broken? #182

Closed barracuda156 closed 1 year ago

barracuda156 commented 1 year ago
R version 4.2.3 (2023-03-15) -- "Shortstop Beagle"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: powerpc-apple-darwin10.8.0 (32-bit)

> 
> if (requireNamespace("tinytest", quietly=TRUE)) {
+ 
+     ## Set a seed to make the test deterministic
+     set.seed(42)
+ 
+     ## there are several more granular ways to test files in a
+     ## tinytest directory, see its package vignette; tests can also
+     ## run once the package is installed using the same command
+ 
+     ## we need version 0.9.3 or later
+     if (packageVersion("tinytest") >= "0.9.3") {
+         tinytest::test_package("digest")
+     }
+ }

test_aes.R....................    0 tests    
test_aes.R....................    0 tests    
test_aes.R....................    0 tests    
test_aes.R....................    0 tests    
test_aes.R....................    0 tests    
test_aes.R....................    0 tests    
test_aes.R....................    0 tests    
test_aes.R....................    1 tests OK 
test_aes.R....................    2 tests OK 
test_aes.R....................    2 tests OK 
test_aes.R....................    2 tests OK 
test_aes.R....................    2 tests OK 
test_aes.R....................    2 tests OK 
test_aes.R....................    3 tests OK 
test_aes.R....................    4 tests OK 
test_aes.R....................    4 tests OK 
test_aes.R....................    4 tests OK 
test_aes.R....................    4 tests OK 
test_aes.R....................    4 tests OK 
test_aes.R....................    5 tests OK 
test_aes.R....................    6 tests OK 
test_aes.R....................    6 tests OK 
test_aes.R....................    6 tests OK 
test_aes.R....................    6 tests OK 
test_aes.R....................    6 tests OK 
test_aes.R....................    6 tests OK 
test_aes.R....................    7 tests OK 
test_aes.R....................    8 tests OK 
test_aes.R....................    8 tests OK 
test_aes.R....................    8 tests OK 
test_aes.R....................    8 tests OK 
test_aes.R....................    8 tests OK 
test_aes.R....................    9 tests OK 
test_aes.R....................    9 tests OK 
test_aes.R....................   10 tests OK 
test_aes.R....................   10 tests OK 
test_aes.R....................   10 tests OK 
test_aes.R....................   10 tests OK 
test_aes.R....................   10 tests OK 
test_aes.R....................   11 tests OK 
test_aes.R....................   11 tests OK 
test_aes.R....................   12 tests OK 
test_aes.R....................   12 tests OK 
test_aes.R....................   12 tests OK 
test_aes.R....................   12 tests OK 
test_aes.R....................   12 tests OK 
test_aes.R....................   12 tests OK 
test_aes.R....................   12 tests OK 
test_aes.R....................   12 tests OK 
test_aes.R....................   12 tests OK 
test_aes.R....................   13 tests OK 
test_aes.R....................   13 tests OK 
test_aes.R....................   14 tests OK 
test_aes.R....................   14 tests OK 
test_aes.R....................   14 tests OK 
test_aes.R....................   14 tests OK 
test_aes.R....................   15 tests OK 
test_aes.R....................   15 tests OK 
test_aes.R....................   16 tests OK 
test_aes.R....................   16 tests OK 
test_aes.R....................   17 tests OK 
test_aes.R....................   18 tests OK 
test_aes.R....................   18 tests OK 
test_aes.R....................   19 tests OK 
test_aes.R....................   20 tests OK 0.4s

test_blake3.R.................    0 tests    
test_blake3.R.................    0 tests    
test_blake3.R.................    0 tests    
test_blake3.R.................    0 tests    
test_blake3.R.................    1 tests OK 
test_blake3.R.................    1 tests OK 
test_blake3.R.................    2 tests OK 
test_blake3.R.................    2 tests OK 
test_blake3.R.................    2 tests OK 
test_blake3.R.................    5 tests OK 
test_blake3.R.................    5 tests OK 
test_blake3.R.................    5 tests OK 
test_blake3.R.................    5 tests OK 
test_blake3.R.................    5 tests OK 
test_blake3.R.................    5 tests OK 
test_blake3.R.................    6 tests OK 
test_blake3.R.................    6 tests OK 
test_blake3.R.................    6 tests OK 
test_blake3.R.................    6 tests OK 
test_blake3.R.................    6 tests OK 
test_blake3.R.................    6 tests OK 
test_blake3.R.................    7 tests 1 fails 62ms

test_crc32.R..................    0 tests    
test_crc32.R..................    0 tests    
test_crc32.R..................    0 tests    
test_crc32.R..................    0 tests    
test_crc32.R..................    0 tests    
test_crc32.R..................    1 tests OK 
test_crc32.R..................    1 tests OK 
test_crc32.R..................    2 tests OK 19ms

test_digest.R.................    0 tests    
test_digest.R.................    0 tests    
test_digest.R.................    0 tests    
test_digest.R.................    7 tests OK 
test_digest.R.................    7 tests OK 
test_digest.R.................    8 tests OK 
test_digest.R.................    9 tests OK 
test_digest.R.................   10 tests OK 
test_digest.R.................   11 tests OK 
test_digest.R.................   12 tests OK 
test_digest.R.................   13 tests OK 
test_digest.R.................   20 tests OK 
test_digest.R.................   20 tests OK 
test_digest.R.................   20 tests OK 
test_digest.R.................   22 tests OK 
test_digest.R.................   22 tests OK 
test_digest.R.................   23 tests OK 
test_digest.R.................   25 tests OK 
test_digest.R.................   25 tests OK 
test_digest.R.................   25 tests OK 
test_digest.R.................   27 tests OK 
test_digest.R.................   27 tests OK 
test_digest.R.................   28 tests OK 
test_digest.R.................   30 tests OK 
test_digest.R.................   30 tests OK 
test_digest.R.................   30 tests OK 
test_digest.R.................   32 tests OK 
test_digest.R.................   32 tests OK 
test_digest.R.................   33 tests OK 
test_digest.R.................   33 tests OK 
test_digest.R.................   34 tests OK 
test_digest.R.................   34 tests OK 
test_digest.R.................   34 tests OK 
test_digest.R.................   37 tests OK 
test_digest.R.................   37 tests OK 
test_digest.R.................   38 tests OK 
test_digest.R.................   38 tests OK 
test_digest.R.................   38 tests OK 
test_digest.R.................   41 tests OK 
test_digest.R.................   41 tests OK 
test_digest.R.................   42 tests OK 
test_digest.R.................   42 tests OK 
test_digest.R.................   42 tests OK 
test_digest.R.................   45 tests OK 
test_digest.R.................   45 tests OK 
test_digest.R.................   46 tests OK 
test_digest.R.................   47 tests OK 
test_digest.R.................   47 tests OK 
test_digest.R.................   47 tests OK 
test_digest.R.................   54 tests 7 fails 
test_digest.R.................   55 tests 8 fails 
test_digest.R.................   55 tests 8 fails 
test_digest.R.................   55 tests 8 fails 
test_digest.R.................   58 tests 11 fails 
test_digest.R.................   59 tests 12 fails 
test_digest.R.................   59 tests 12 fails 
test_digest.R.................   60 tests 13 fails 
test_digest.R.................   61 tests 14 fails 
test_digest.R.................   61 tests 14 fails 
test_digest.R.................   61 tests 14 fails 
test_digest.R.................   61 tests 14 fails 
test_digest.R.................   61 tests 14 fails 0.1s

test_digest2int.R.............    0 tests    
test_digest2int.R.............    0 tests    
test_digest2int.R.............    0 tests    
test_digest2int.R.............    1 tests OK 
test_digest2int.R.............    1 tests OK 
test_digest2int.R.............    2 tests OK 
test_digest2int.R.............    3 tests OK 
test_digest2int.R.............    4 tests OK 17ms

test_encoding.R...............    0 tests    
test_encoding.R...............    0 tests    10ms [Exited at #5: Skipping test on non-Windows platform]

test_hmac.R...................    0 tests    
test_hmac.R...................    0 tests    
test_hmac.R...................    0 tests    
test_hmac.R...................    1 tests OK 
test_hmac.R...................    1 tests OK 
test_hmac.R...................    1 tests OK 
test_hmac.R...................    2 tests OK 
test_hmac.R...................    2 tests OK 
test_hmac.R...................    2 tests OK 
test_hmac.R...................    3 tests OK 
test_hmac.R...................    3 tests OK 
test_hmac.R...................    3 tests OK 
test_hmac.R...................    4 tests OK 
test_hmac.R...................    4 tests OK 
test_hmac.R...................    4 tests OK 
test_hmac.R...................    5 tests OK 
test_hmac.R...................    5 tests OK 
test_hmac.R...................    5 tests OK 
test_hmac.R...................    6 tests OK 
test_hmac.R...................    6 tests OK 
test_hmac.R...................    6 tests OK 
test_hmac.R...................    7 tests OK 
test_hmac.R...................    7 tests OK 
test_hmac.R...................    7 tests OK 
test_hmac.R...................    8 tests OK 
test_hmac.R...................    8 tests OK 
test_hmac.R...................    8 tests OK 
test_hmac.R...................    9 tests OK 
test_hmac.R...................    9 tests OK 
test_hmac.R...................    9 tests OK 
test_hmac.R...................   10 tests OK 
test_hmac.R...................   10 tests OK 
test_hmac.R...................   10 tests OK 
test_hmac.R...................   11 tests OK 
test_hmac.R...................   11 tests OK 
test_hmac.R...................   11 tests OK 
test_hmac.R...................   12 tests OK 
test_hmac.R...................   12 tests OK 
test_hmac.R...................   13 tests OK 
test_hmac.R...................   13 tests OK 
test_hmac.R...................   13 tests OK 
test_hmac.R...................   14 tests OK 76ms

test_misc.R...................    0 tests    
test_misc.R...................    0 tests    
test_misc.R...................    0 tests    
test_misc.R...................    0 tests    
test_misc.R...................   56 tests OK 
test_misc.R...................   56 tests OK 
test_misc.R...................   56 tests OK 
test_misc.R...................   56 tests OK 
test_misc.R...................   56 tests OK 
test_misc.R...................   57 tests OK 
test_misc.R...................   57 tests OK 
test_misc.R...................   57 tests OK 
test_misc.R...................   57 tests OK 
test_misc.R...................   57 tests OK 0.2s

test_new_matrix_behaviour.R...    0 tests    19ms [Exited at #4: Skip tests for R 4.0.0 or later]

test_num2hex.R................    0 tests    
test_num2hex.R................    0 tests    
test_num2hex.R................    0 tests    
test_num2hex.R................    1 tests OK 
test_num2hex.R................    2 tests OK 
test_num2hex.R................    2 tests OK 
test_num2hex.R................    2 tests OK 
test_num2hex.R................    2 tests OK 
test_num2hex.R................    2 tests OK 
test_num2hex.R................    3 tests OK 
test_num2hex.R................    3 tests OK 
test_num2hex.R................    3 tests OK 
test_num2hex.R................    3 tests OK 
test_num2hex.R................    4 tests OK 
test_num2hex.R................    4 tests OK 
test_num2hex.R................    5 tests OK 
test_num2hex.R................    5 tests OK 
test_num2hex.R................    6 tests OK 
test_num2hex.R................    7 tests OK 
test_num2hex.R................    8 tests OK 
test_num2hex.R................    9 tests OK 60ms

test_raw.R....................    0 tests    
test_raw.R....................    0 tests    
test_raw.R....................    0 tests    
test_raw.R....................    1 tests OK 
test_raw.R....................    1 tests OK 
test_raw.R....................    1 tests OK 
test_raw.R....................    2 tests OK 
test_raw.R....................    3 tests OK 17ms

test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    1 tests OK 
test_sha1.R...................    2 tests OK 
test_sha1.R...................    3 tests OK 
test_sha1.R...................    4 tests OK 
test_sha1.R...................    5 tests OK 
test_sha1.R...................    6 tests OK 
test_sha1.R...................    6 tests OK 
test_sha1.R...................    7 tests OK 
test_sha1.R...................    7 tests OK 
test_sha1.R...................    8 tests OK 
test_sha1.R...................    9 tests OK 
test_sha1.R...................   10 tests OK 
test_sha1.R...................   11 tests OK 
test_sha1.R...................   12 tests OK 
test_sha1.R...................   12 tests OK 
test_sha1.R...................   13 tests OK 
test_sha1.R...................   13 tests OK 
test_sha1.R...................   13 tests OK 
test_sha1.R...................   13 tests OK 
test_sha1.R...................   13 tests OK 
test_sha1.R...................   13 tests OK 
test_sha1.R...................   14 tests OK 
test_sha1.R...................   15 tests OK 
test_sha1.R...................   16 tests OK 
test_sha1.R...................   17 tests OK 
test_sha1.R...................   18 tests OK 
test_sha1.R...................   19 tests OK 
test_sha1.R...................   19 tests OK 
test_sha1.R...................   19 tests OK 
test_sha1.R...................   19 tests OK 
test_sha1.R...................   20 tests OK 
test_sha1.R...................   21 tests OK 
test_sha1.R...................   67 tests OK 
test_sha1.R...................   67 tests OK 
test_sha1.R...................   67 tests OK 
test_sha1.R...................   68 tests OK 
test_sha1.R...................   69 tests OK 
test_sha1.R...................   70 tests OK 
test_sha1.R...................   71 tests OK 
test_sha1.R...................   72 tests OK 
test_sha1.R...................   73 tests OK 
test_sha1.R...................   74 tests OK 
test_sha1.R...................   75 tests OK 
test_sha1.R...................   76 tests OK 
test_sha1.R...................   76 tests OK 
test_sha1.R...................   76 tests OK 
test_sha1.R...................   76 tests OK 
test_sha1.R...................   77 tests OK 
test_sha1.R...................   77 tests OK 
test_sha1.R...................   77 tests OK 
test_sha1.R...................   77 tests OK 
test_sha1.R...................   78 tests OK 
test_sha1.R...................   79 tests OK 
test_sha1.R...................   80 tests OK 
test_sha1.R...................   81 tests OK 
test_sha1.R...................   81 tests OK 
test_sha1.R...................   89 tests OK 
test_sha1.R...................   90 tests OK 
test_sha1.R...................   90 tests OK 
test_sha1.R...................   90 tests OK 
test_sha1.R...................   90 tests OK 
test_sha1.R...................   90 tests OK 
test_sha1.R...................  100 tests OK 
test_sha1.R...................  100 tests OK 
test_sha1.R...................  100 tests OK 
test_sha1.R...................  100 tests OK 
test_sha1.R...................  100 tests OK 
test_sha1.R...................  101 tests OK 
test_sha1.R...................  102 tests OK 2.1s
----- FAILED[data]: test_blake3.R<60--63>
 call| expect_equal(res, "a84aef38d9a7ad55fa458d9d1857eb895832e358385e8b6466c6af54ea46eeaa")
 diff| Expected 'a84aef38d9a7ad55fa458d9d1857eb895832e358385e8b6466c6af54ea46eeaa', got '9ca1620b48264953d2a1314a8b4013cc0417de9e4a27e2de21dc2e93379f04c3'
----- FAILED[data]: test_digest.R<256--262>
 call| expect_true(identical(spooky, spookyOutputPython[i]))
 diff| Expected TRUE, got FALSE
----- FAILED[data]: test_digest.R<256--262>
 call| expect_true(identical(spooky, spookyOutputPython[i]))
 diff| Expected TRUE, got FALSE
----- FAILED[data]: test_digest.R<256--262>
 call| expect_true(identical(spooky, spookyOutputPython[i]))
 diff| Expected TRUE, got FALSE
----- FAILED[data]: test_digest.R<256--262>
 call| expect_true(identical(spooky, spookyOutputPython[i]))
 diff| Expected TRUE, got FALSE
----- FAILED[data]: test_digest.R<256--262>
 call| expect_true(identical(spooky, spookyOutputPython[i]))
 diff| Expected TRUE, got FALSE
----- FAILED[data]: test_digest.R<256--262>
 call| expect_true(identical(spooky, spookyOutputPython[i]))
 diff| Expected TRUE, got FALSE
----- FAILED[data]: test_digest.R<256--262>
 call| expect_true(identical(spooky, spookyOutputPython[i]))
 diff| Expected TRUE, got FALSE
----- FAILED[data]: test_digest.R<264--267>
 call| expect_identical(getVDigest(algo = "spookyhash")(spookyInput, 
 call| -->    skip = 30), spookyOutputPython)
 diff| 7 string mismatches
----- FAILED[data]: test_digest.R<277--281>
 call| expect_true(identical(spooky, spookyOutput[i]))
 diff| Expected TRUE, got FALSE
----- FAILED[data]: test_digest.R<277--281>
 call| expect_true(identical(spooky, spookyOutput[i]))
 diff| Expected TRUE, got FALSE
----- FAILED[data]: test_digest.R<277--281>
 call| expect_true(identical(spooky, spookyOutput[i]))
 diff| Expected TRUE, got FALSE
----- FAILED[data]: test_digest.R<283--286>
 call| expect_identical(getVDigest(algo = "spookyhash")(spookyInput), 
 call| -->    spookyOutput)
 diff| 3 string mismatches
----- FAILED[data]: test_digest.R<290--290>
 call| expect_true(identical(spooky, "af58add8b4f7044582b331083bc239ff"))
 diff| Expected TRUE, got FALSE
----- FAILED[data]: test_digest.R<291--292>
 call| expect_identical(getVDigest("spookyhash")(list(iris)), "af58add8b4f7044582b331083bc239ff")
 diff| Expected 'af58add8b4f7044582b331083bc239ff', got 'f3743d951bc557456f708798affa88ad'
Error: 15 out of 279 tests failed
Execution halted

There is also an error when running example:

R version 4.2.3 (2023-03-15) -- "Shortstop Beagle"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: powerpc-apple-darwin10.8.0 (32-bit)

> pkgname <- "digest"
> source(file.path(R.home("share"), "R", "examples-header.R"))
> options(warn = 1)
> library('digest')
> 
> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
> base::assign(".old_wd", base::getwd(), pos = 'CheckExEnv')
> cleanEx()
> nameEx("AES")
> ### * AES
> 
> flush(stderr()); flush(stdout())
> 
> ### Name: AES
> ### Title: Create AES block cipher object
> ### Aliases: AES
> 
> ### ** Examples
> 
> # First in ECB mode: the repeated block is coded the same way each time
> msg <- as.raw(c(1:16, 1:16))
> key <- as.raw(1:16)
> aes <- AES(key, mode="ECB")
> aes$encrypt(msg)
 [1] 34 c3 3b 7f 14 fd 53 dc ea 25 e0 1a 02 e1 67 27 34 c3 3b 7f 14 fd 53 dc ea
[26] 25 e0 1a 02 e1 67 27
> aes$decrypt(aes$encrypt(msg), raw=TRUE)
 [1] 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 01 02 03 04 05 06 07 08 09
[26] 0a 0b 0c 0d 0e 0f 10
> 
> # Now in CBC mode:  each encoding is different
> iv <- sample(0:255, 16, replace=TRUE)
> aes <- AES(key, mode="CBC", iv)
> code <- aes$encrypt(msg)
> code
 [1] c4 3c ff df d8 ce 5b d6 ca 18 70 1e 86 41 60 01 d9 1d c8 cd 51 2f 23 ec 82
[26] f5 5d 70 10 58 37 8e
> 
> # Need a new object for decryption in CBC mode
> aes <- AES(key, mode="CBC", iv)
> aes$decrypt(code, raw=TRUE)
 [1] 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 01 02 03 04 05 06 07 08 09
[26] 0a 0b 0c 0d 0e 0f 10
> 
> # CFB mode: IV must be the same length as the Block's block size
> # Two different instances of AES are required for encryption and decryption
> iv <- sample(0:255, 16, replace=TRUE)
> aes <- AES(key, mode="CFB", iv)
> code <- aes$encrypt(msg)
> code
 [1] 14 33 ff 11 20 f6 15 4a 41 d0 e4 40 10 1d ca c6 a2 03 64 78 4c 5e 55 60 9e
[26] 58 d7 35 3a 4a bf d6
> #decrypt
> aes <-  AES(key, mode="CFB", iv)
> aes$decrypt(code)
[1] "\001\002\003\004\005\006\a\b\t\n\v\f\r\016\017\020\001\002\003\004\005\006\a\b\t\n\v\f\r\016\017\020"
> 
> 
> # FIPS-197 examples
> 
> hextextToRaw <- function(text) {
+   vals <- matrix(as.integer(as.hexmode(strsplit(text, "")[[1]])), ncol=2, byrow=TRUE)
+   vals <- vals %*% c(16, 1)
+   as.raw(vals)
+ }
> 
> plaintext       <- hextextToRaw("00112233445566778899aabbccddeeff")
> 
> aes128key       <- hextextToRaw("000102030405060708090a0b0c0d0e0f")
> aes128output    <- hextextToRaw("69c4e0d86a7b0430d8cdb78070b4c55a")
> aes <- AES(aes128key)
> aes128 <- aes$encrypt(plaintext)
> stopifnot(identical(aes128, aes128output))
> stopifnot(identical(plaintext, aes$decrypt(aes128, raw=TRUE)))
> 
> aes192key       <- hextextToRaw("000102030405060708090a0b0c0d0e0f1011121314151617")
> aes192output    <- hextextToRaw("dda97ca4864cdfe06eaf70a0ec0d7191")
> aes <- AES(aes192key)
> aes192 <- aes$encrypt(plaintext)
> stopifnot(identical(aes192, aes192output))
> stopifnot(identical(plaintext, aes$decrypt(aes192, raw=TRUE)))
> 
> aes256key       <- hextextToRaw("000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f")
> aes256output     <- hextextToRaw("8ea2b7ca516745bfeafc49904b496089")
> aes <- AES(aes256key)
> aes256 <- aes$encrypt(plaintext)
> stopifnot(identical(aes256, aes256output))
> stopifnot(identical(plaintext, aes$decrypt(aes256, raw=TRUE)))
> 
> # SP800-38a examples
> 
> plaintext <- hextextToRaw(paste("6bc1bee22e409f96e93d7e117393172a",
+                                 "ae2d8a571e03ac9c9eb76fac45af8e51",
+                                 "30c81c46a35ce411e5fbc1191a0a52ef",
+                                 "f69f2445df4f9b17ad2b417be66c3710",sep=""))
> key <- hextextToRaw("2b7e151628aed2a6abf7158809cf4f3c")
> 
> ecb128output <- hextextToRaw(paste("3ad77bb40d7a3660a89ecaf32466ef97",
+                                    "f5d3d58503b9699de785895a96fdbaaf",
+                                    "43b1cd7f598ece23881b00e3ed030688",
+                                    "7b0c785e27e8ad3f8223207104725dd4",sep=""))
> aes <- AES(key)
> ecb128 <- aes$encrypt(plaintext)
> stopifnot(identical(ecb128, ecb128output))
> stopifnot(identical(plaintext, aes$decrypt(ecb128, raw=TRUE)))
> 
> cbc128output <- hextextToRaw(paste("7649abac8119b246cee98e9b12e9197d",
+                                    "5086cb9b507219ee95db113a917678b2",
+                                    "73bed6b8e3c1743b7116e69e22229516",
+                                    "3ff1caa1681fac09120eca307586e1a7",sep=""))
> iv <- hextextToRaw("000102030405060708090a0b0c0d0e0f")
> aes <- AES(key, mode="CBC", IV=iv)
> cbc128 <- aes$encrypt(plaintext)
> stopifnot(identical(cbc128, cbc128output))
> aes <- AES(key, mode="CBC", IV=iv)
> stopifnot(identical(plaintext, aes$decrypt(cbc128, raw=TRUE)))
> 
> 
> cfb128output <- hextextToRaw(paste("3b3fd92eb72dad20333449f8e83cfb4a",
+                                    "c8a64537a0b3a93fcde3cdad9f1ce58b",
+                                    "26751f67a3cbb140b1808cf187a4f4df",
+                                    "c04b05357c5d1c0eeac4c66f9ff7f2e6",sep=""))
> aes <- AES(key, mode="CFB", IV=iv)
> cfb128 <- aes$encrypt(plaintext)
> stopifnot(identical(cfb128, cfb128output))
> aes <- AES(key, mode="CFB", IV=iv)
> stopifnot(identical(plaintext, aes$decrypt(cfb128, raw=TRUE)))
> 
> 
> ctr128output <- hextextToRaw(paste("874d6191b620e3261bef6864990db6ce",
+                                    "9806f66b7970fdff8617187bb9fffdff",
+                                    "5ae4df3edbd5d35e5b4f09020db03eab",
+                                    "1e031dda2fbe03d1792170a0f3009cee",sep=""))
> iv <- hextextToRaw("f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff")
> aes <- AES(key, mode="CTR", IV=iv)
> ctr128 <- aes$encrypt(plaintext)
> stopifnot(identical(ctr128, ctr128output))
> aes <- AES(key, mode="CTR", IV=iv)
> stopifnot(identical(plaintext, aes$decrypt(ctr128, raw=TRUE)))
> 
> 
> 
> 
> cleanEx()
> nameEx("digest")
> ### * digest
> 
> flush(stderr()); flush(stdout())
> 
> ### Name: digest
> ### Title: Create hash function digests for arbitrary R objects or files
> ### Aliases: digest
> ### Keywords: misc
> 
> ### ** Examples
> 
> 
> ## Standard RFC 1321 test vectors
> md5Input <-
+   c("",
+     "a",
+     "abc",
+     "message digest",
+     "abcdefghijklmnopqrstuvwxyz",
+     "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
+     paste("12345678901234567890123456789012345678901234567890123456789012",
+           "345678901234567890", sep=""))
> md5Output <-
+   c("d41d8cd98f00b204e9800998ecf8427e",
+     "0cc175b9c0f1b6a831c399e269772661",
+     "900150983cd24fb0d6963f7d28e17f72",
+     "f96b697d7cb7938d525a2f31aaf161d0",
+     "c3fcd3d76192e4007dfb496cca67e13b",
+     "d174ab98d277d9f5a5611c2c9f419d9f",
+     "57edf4a22be3c955ac49da2e2107b67a")
> 
> for (i in seq(along=md5Input)) {
+   md5 <- digest(md5Input[i], serialize=FALSE)
+   stopifnot(identical(md5, md5Output[i]))
+ }
> 
> sha1Input <-
+   c("abc", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq")
> sha1Output <-
+   c("a9993e364706816aba3e25717850c26c9cd0d89d",
+     "84983e441c3bd26ebaae4aa1f95129e5e54670f1")
> 
> for (i in seq(along=sha1Input)) {
+   sha1 <- digest(sha1Input[i], algo="sha1", serialize=FALSE)
+   stopifnot(identical(sha1, sha1Output[i]))
+ }
> 
> crc32Input <-
+   c("abc",
+     "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq")
> crc32Output <-
+   c("352441c2",
+     "171a3f5f")
> 
> for (i in seq(along=crc32Input)) {
+   crc32 <- digest(crc32Input[i], algo="crc32", serialize=FALSE)
+   stopifnot(identical(crc32, crc32Output[i]))
+ }
> 
> 
> sha256Input <-
+   c("abc",
+     "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq")
> sha256Output <-
+   c("ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad",
+     "248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1")
> 
> for (i in seq(along=sha256Input)) {
+   sha256 <- digest(sha256Input[i], algo="sha256", serialize=FALSE)
+   stopifnot(identical(sha256, sha256Output[i]))
+ }
> 
> # SHA 512 example
> sha512Input <-
+   c("abc",
+     "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq")
> sha512Output <-
+   c(paste("ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a",
+           "2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f",
+           sep=""),
+     paste("204a8fc6dda82f0a0ced7beb8e08a41657c16ef468b228a8279be331a703c335",
+           "96fd15c13b1b07f9aa1d3bea57789ca031ad85c7a71dd70354ec631238ca3445",
+           sep=""))
> 
> for (i in seq(along=sha512Input)) {
+   sha512 <- digest(sha512Input[i], algo="sha512", serialize=FALSE)
+   stopifnot(identical(sha512, sha512Output[i]))
+ }
> 
> ## xxhash32 example
> xxhash32Input <-
+     c("abc",
+       "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
+       "")
> xxhash32Output <-
+     c("32d153ff",
+       "89ea60c3",
+       "02cc5d05")
> 
> for (i in seq(along=xxhash32Input)) {
+     xxhash32 <- digest(xxhash32Input[i], algo="xxhash32", serialize=FALSE)
+     cat(xxhash32, "\n")
+     stopifnot(identical(xxhash32, xxhash32Output[i]))
+ }
32d153ff 
89ea60c3 
02cc5d05 
> 
> ## xxhash64 example
> xxhash64Input <-
+     c("abc",
+       "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
+       "")
> xxhash64Output <-
+     c("44bc2cf5ad770999",
+       "f06103773e8585df",
+       "ef46db3751d8e999")
> 
> for (i in seq(along=xxhash64Input)) {
+     xxhash64 <- digest(xxhash64Input[i], algo="xxhash64", serialize=FALSE)
+     cat(xxhash64, "\n")
+     stopifnot(identical(xxhash64, xxhash64Output[i]))
+ }
44bc2cf5ad770999 
f06103773e8585df 
ef46db3751d8e999 
> 
> ## these outputs were calculated using mmh3 python package
> murmur32Input <-
+     c("abc",
+       "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
+       "")
> murmur32Output <-
+     c("b3dd93fa",
+       "ee925b90",
+       "00000000")
> 
> for (i in seq(along=murmur32Input)) {
+     murmur32 <- digest(murmur32Input[i], algo="murmur32", serialize=FALSE)
+     cat(murmur32, "\n")
+     stopifnot(identical(murmur32, murmur32Output[i]))
+ }
b3dd93fa 
ee925b90 
00000000 
> 
> ## these outputs were calculated using spooky python package
> spookyInput <-
+     c("a",
+       "abc",
+       "message digest")
> spookyOutput <-
+     c("bdc9bba09181101a922a4161f0584275",
+       "67c93775f715ab8ab01178caf86713c6",
+       "9630c2a55c0987a0db44434f9d67a192")
> 
> for (i in seq(along=spookyInput)) {
+     # skip = 30 skips the serialization header and just hashes the strings
+     spooky <- digest(spookyInput[i], algo="spookyhash", skip = 30)
+     cat(spooky, "\n")
+     stopifnot(identical(spooky, spookyOutput[i]))
+ }
1a108191a0bbc9bd754258f061412a92 
Error: identical(spooky, spookyOutput[i]) is not TRUE
Execution halted
eddelbuettel commented 1 year ago

The digest package is nearly twenty years old, and the core of its operations is solid. It was for many years tested under Solaris (when CRAN still had such a machine) which covered the other side of endianness.

You seem to have found that two of more-recently added algos (blake3, spooky) do not behave well on your platform. That can happen -- you have access to such a platform so maybe you want to provide a PR that either addresses it (that would be ideal), or skips the tests on that platform and documents the failure. Only you can do that: nobody else (and I mean literally nobody else) appears to use R on that platform.

Bigger picture, there is nothing much new here. You believe you provide a service by sending in long reports logging failures on the platform on which running R is your passion. We do not run on that platform, we do not have access. It's fine to report this here and note the shortcoming, but I doubt it really changes anything.

barracuda156 commented 1 year ago

@eddelbuettel Thank you. You cannot test on Solaris anymore, right? As usual, mostly this kind of issues are not specific to my platform, but either common to Big-endian or common to 32-bit, which makes sense to fix (several *BSD and Linux distros currently exist for both, AIX is there, QNX is/was there). (I may like macOS ppc personally, but I perfectly understand that very few people are using it presently.)

barracuda156 commented 2 months ago

blake3 fixed by https://github.com/eddelbuettel/digest/pull/205 (fix from upstream). Now only spooky ones fail:


R version 4.4.1 (2024-06-14) -- "Race for Your Life"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: powerpc-apple-darwin10.0.0d2 (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.

> 
> if (requireNamespace("tinytest", quietly=TRUE)) {
+ 
+     ## Set a seed to make the test deterministic
+     set.seed(42)
+ 
+     ## there are several more granular ways to test files in a
+     ## tinytest directory, see its package vignette; tests can also
+     ## run once the package is installed using the same command
+ 
+     ## we need version 0.9.3 or later
+     if (packageVersion("tinytest") >= "0.9.3") {
+         ## expect_length is in tinytest 1.4.1
+         if (!"expect_length" %in% getNamespaceExports("tinytest")) {
+             expect_length <- function(x, n) tinytest::expect_equal(length(x), n)
+         }
+         tinytest::test_package("digest")
+     }
+ }

test_aes.R....................    0 tests    
test_aes.R....................    0 tests    
test_aes.R....................    0 tests    
test_aes.R....................    0 tests    
test_aes.R....................    0 tests    
test_aes.R....................    0 tests    
test_aes.R....................    0 tests    
test_aes.R....................    1 tests OK 
test_aes.R....................    2 tests OK 
test_aes.R....................    2 tests OK 
test_aes.R....................    2 tests OK 
test_aes.R....................    2 tests OK 
test_aes.R....................    2 tests OK 
test_aes.R....................    3 tests OK 
test_aes.R....................    4 tests OK 
test_aes.R....................    4 tests OK 
test_aes.R....................    4 tests OK 
test_aes.R....................    4 tests OK 
test_aes.R....................    4 tests OK 
test_aes.R....................    5 tests OK 
test_aes.R....................    6 tests OK 
test_aes.R....................    6 tests OK 
test_aes.R....................    6 tests OK 
test_aes.R....................    6 tests OK 
test_aes.R....................    6 tests OK 
test_aes.R....................    6 tests OK 
test_aes.R....................    7 tests OK 
test_aes.R....................    8 tests OK 
test_aes.R....................    8 tests OK 
test_aes.R....................    8 tests OK 
test_aes.R....................    8 tests OK 
test_aes.R....................    8 tests OK 
test_aes.R....................    9 tests OK 
test_aes.R....................    9 tests OK 
test_aes.R....................   10 tests OK 
test_aes.R....................   10 tests OK 
test_aes.R....................   10 tests OK 
test_aes.R....................   10 tests OK 
test_aes.R....................   10 tests OK 
test_aes.R....................   11 tests OK 
test_aes.R....................   11 tests OK 
test_aes.R....................   12 tests OK 
test_aes.R....................   12 tests OK 
test_aes.R....................   12 tests OK 
test_aes.R....................   12 tests OK 
test_aes.R....................   12 tests OK 
test_aes.R....................   12 tests OK 
test_aes.R....................   12 tests OK 
test_aes.R....................   12 tests OK 
test_aes.R....................   12 tests OK 
test_aes.R....................   13 tests OK 
test_aes.R....................   13 tests OK 
test_aes.R....................   14 tests OK 
test_aes.R....................   14 tests OK 
test_aes.R....................   14 tests OK 
test_aes.R....................   14 tests OK 
test_aes.R....................   15 tests OK 
test_aes.R....................   15 tests OK 
test_aes.R....................   16 tests OK 
test_aes.R....................   16 tests OK 
test_aes.R....................   17 tests OK 
test_aes.R....................   18 tests OK 
test_aes.R....................   18 tests OK 
test_aes.R....................   19 tests OK 
test_aes.R....................   20 tests OK 
test_aes.R....................   20 tests OK 
test_aes.R....................   20 tests OK 
test_aes.R....................   21 tests OK 
test_aes.R....................   22 tests OK 
test_aes.R....................   23 tests OK 
test_aes.R....................   24 tests OK 
test_aes.R....................   25 tests OK 
test_aes.R....................   25 tests OK 
test_aes.R....................   26 tests OK 
test_aes.R....................   26 tests OK 
test_aes.R....................   27 tests OK 
test_aes.R....................   28 tests OK 
test_aes.R....................   29 tests OK 
test_aes.R....................   30 tests OK 
test_aes.R....................   31 tests OK 
test_aes.R....................   32 tests OK 
test_aes.R....................   33 tests OK 0.2s

test_blake3.R.................    0 tests    
test_blake3.R.................    0 tests    
test_blake3.R.................    0 tests    
test_blake3.R.................    0 tests    
test_blake3.R.................    1 tests OK 
test_blake3.R.................    1 tests OK 
test_blake3.R.................    2 tests OK 
test_blake3.R.................    2 tests OK 
test_blake3.R.................    2 tests OK 
test_blake3.R.................    5 tests OK 
test_blake3.R.................    5 tests OK 
test_blake3.R.................    5 tests OK 
test_blake3.R.................    5 tests OK 
test_blake3.R.................    5 tests OK 
test_blake3.R.................    5 tests OK 
test_blake3.R.................    6 tests OK 
test_blake3.R.................    6 tests OK 
test_blake3.R.................    6 tests OK 
test_blake3.R.................    6 tests OK 
test_blake3.R.................    6 tests OK 
test_blake3.R.................    6 tests OK 
test_blake3.R.................    7 tests OK 47ms

test_crc32.R..................    0 tests    
test_crc32.R..................    0 tests    
test_crc32.R..................    0 tests    
test_crc32.R..................    0 tests    
test_crc32.R..................    0 tests    
test_crc32.R..................    1 tests OK 
test_crc32.R..................    1 tests OK 
test_crc32.R..................    2 tests OK 9ms

test_digest.R.................    0 tests    
test_digest.R.................    0 tests    
test_digest.R.................    0 tests    
test_digest.R.................    7 tests OK 
test_digest.R.................    7 tests OK 
test_digest.R.................    8 tests OK 
test_digest.R.................    9 tests OK 
test_digest.R.................   10 tests OK 
test_digest.R.................   11 tests OK 
test_digest.R.................   12 tests OK 
test_digest.R.................   13 tests OK 
test_digest.R.................   20 tests OK 
test_digest.R.................   20 tests OK 
test_digest.R.................   20 tests OK 
test_digest.R.................   22 tests OK 
test_digest.R.................   22 tests OK 
test_digest.R.................   23 tests OK 
test_digest.R.................   25 tests OK 
test_digest.R.................   25 tests OK 
test_digest.R.................   25 tests OK 
test_digest.R.................   27 tests OK 
test_digest.R.................   27 tests OK 
test_digest.R.................   28 tests OK 
test_digest.R.................   30 tests OK 
test_digest.R.................   30 tests OK 
test_digest.R.................   30 tests OK 
test_digest.R.................   32 tests OK 
test_digest.R.................   32 tests OK 
test_digest.R.................   33 tests OK 
test_digest.R.................   33 tests OK 
test_digest.R.................   34 tests OK 
test_digest.R.................   34 tests OK 
test_digest.R.................   34 tests OK 
test_digest.R.................   37 tests OK 
test_digest.R.................   37 tests OK 
test_digest.R.................   38 tests OK 
test_digest.R.................   38 tests OK 
test_digest.R.................   38 tests OK 
test_digest.R.................   41 tests OK 
test_digest.R.................   41 tests OK 
test_digest.R.................   42 tests OK 
test_digest.R.................   42 tests OK 
test_digest.R.................   42 tests OK 
test_digest.R.................   45 tests OK 
test_digest.R.................   45 tests OK 
test_digest.R.................   46 tests OK 
test_digest.R.................   47 tests OK 
test_digest.R.................   47 tests OK 
test_digest.R.................   47 tests OK 
test_digest.R.................   54 tests 7 fails 
test_digest.R.................   55 tests 8 fails 
test_digest.R.................   55 tests 8 fails 
test_digest.R.................   55 tests 8 fails 
test_digest.R.................   58 tests 11 fails 
test_digest.R.................   59 tests 12 fails 
test_digest.R.................   59 tests 12 fails 
test_digest.R.................   60 tests 13 fails 
test_digest.R.................   61 tests 14 fails 
test_digest.R.................   61 tests 14 fails 
test_digest.R.................   61 tests 14 fails 
test_digest.R.................   61 tests 14 fails 
test_digest.R.................   61 tests 14 fails 
test_digest.R.................   61 tests 14 fails 
test_digest.R.................   61 tests 14 fails 
test_digest.R.................   64 tests 14 fails 
test_digest.R.................   64 tests 14 fails 
test_digest.R.................   65 tests 14 fails 
test_digest.R.................   65 tests 14 fails 
test_digest.R.................   65 tests 14 fails 
test_digest.R.................   68 tests 14 fails 
test_digest.R.................   68 tests 14 fails 
test_digest.R.................   69 tests 14 fails 69ms

test_digest2int.R.............    0 tests    
test_digest2int.R.............    0 tests    
test_digest2int.R.............    0 tests    
test_digest2int.R.............    1 tests OK 
test_digest2int.R.............    1 tests OK 
test_digest2int.R.............    2 tests OK 
test_digest2int.R.............    3 tests OK 
test_digest2int.R.............    4 tests OK 7ms

test_encoding.R...............    0 tests    
test_encoding.R...............    0 tests    5ms [Exited at #5: Skipping test on non-Windows platform]

test_hmac.R...................    0 tests    
test_hmac.R...................    0 tests    
test_hmac.R...................    0 tests    
test_hmac.R...................    1 tests OK 
test_hmac.R...................    1 tests OK 
test_hmac.R...................    1 tests OK 
test_hmac.R...................    2 tests OK 
test_hmac.R...................    2 tests OK 
test_hmac.R...................    2 tests OK 
test_hmac.R...................    3 tests OK 
test_hmac.R...................    3 tests OK 
test_hmac.R...................    3 tests OK 
test_hmac.R...................    4 tests OK 
test_hmac.R...................    4 tests OK 
test_hmac.R...................    4 tests OK 
test_hmac.R...................    5 tests OK 
test_hmac.R...................    5 tests OK 
test_hmac.R...................    5 tests OK 
test_hmac.R...................    6 tests OK 
test_hmac.R...................    6 tests OK 
test_hmac.R...................    6 tests OK 
test_hmac.R...................    7 tests OK 
test_hmac.R...................    7 tests OK 
test_hmac.R...................    7 tests OK 
test_hmac.R...................    8 tests OK 
test_hmac.R...................    8 tests OK 
test_hmac.R...................    8 tests OK 
test_hmac.R...................    9 tests OK 
test_hmac.R...................    9 tests OK 
test_hmac.R...................    9 tests OK 
test_hmac.R...................   10 tests OK 
test_hmac.R...................   10 tests OK 
test_hmac.R...................   10 tests OK 
test_hmac.R...................   11 tests OK 
test_hmac.R...................   11 tests OK 
test_hmac.R...................   11 tests OK 
test_hmac.R...................   12 tests OK 
test_hmac.R...................   12 tests OK 
test_hmac.R...................   13 tests OK 
test_hmac.R...................   13 tests OK 
test_hmac.R...................   13 tests OK 
test_hmac.R...................   14 tests OK 28ms

test_misc.R...................    0 tests    
test_misc.R...................    0 tests    
test_misc.R...................    0 tests    
test_misc.R...................    0 tests    
test_misc.R...................   56 tests OK 
test_misc.R...................   56 tests OK 
test_misc.R...................   56 tests OK 
test_misc.R...................   56 tests OK 
test_misc.R...................   56 tests OK 
test_misc.R...................   57 tests OK 
test_misc.R...................   57 tests OK 
test_misc.R...................   57 tests OK 
test_misc.R...................   57 tests OK 
test_misc.R...................   57 tests OK 0.1s

test_new_matrix_behaviour.R...    0 tests    6ms [Exited at #4: Skip tests for R 4.0.0 or later]

test_num2hex.R................    0 tests    
test_num2hex.R................    0 tests    
test_num2hex.R................    0 tests    
test_num2hex.R................    1 tests OK 
test_num2hex.R................    2 tests OK 
test_num2hex.R................    2 tests OK 
test_num2hex.R................    2 tests OK 
test_num2hex.R................    2 tests OK 
test_num2hex.R................    2 tests OK 
test_num2hex.R................    3 tests OK 
test_num2hex.R................    3 tests OK 
test_num2hex.R................    3 tests OK 
test_num2hex.R................    3 tests OK 
test_num2hex.R................    4 tests OK 
test_num2hex.R................    4 tests OK 
test_num2hex.R................    5 tests OK 
test_num2hex.R................    5 tests OK 
test_num2hex.R................    6 tests OK 
test_num2hex.R................    7 tests OK 
test_num2hex.R................    8 tests OK 
test_num2hex.R................    9 tests OK 23ms

test_raw.R....................    0 tests    
test_raw.R....................    0 tests    
test_raw.R....................    0 tests    
test_raw.R....................    1 tests OK 
test_raw.R....................    1 tests OK 
test_raw.R....................    1 tests OK 
test_raw.R....................    2 tests OK 
test_raw.R....................    3 tests OK 8ms

test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    0 tests    
test_sha1.R...................    1 tests OK 
test_sha1.R...................    2 tests OK 
test_sha1.R...................    3 tests OK 
test_sha1.R...................    4 tests OK 
test_sha1.R...................    5 tests OK 
test_sha1.R...................    6 tests OK 
test_sha1.R...................    6 tests OK 
test_sha1.R...................    7 tests OK 
test_sha1.R...................    7 tests OK 
test_sha1.R...................    8 tests OK 
test_sha1.R...................    9 tests OK 
test_sha1.R...................   10 tests OK 
test_sha1.R...................   11 tests OK 
test_sha1.R...................   12 tests OK 
test_sha1.R...................   12 tests OK 
test_sha1.R...................   13 tests OK 
test_sha1.R...................   13 tests OK 
test_sha1.R...................   13 tests OK 
test_sha1.R...................   13 tests OK 
test_sha1.R...................   13 tests OK 
test_sha1.R...................   13 tests OK 
test_sha1.R...................   14 tests OK 
test_sha1.R...................   15 tests OK 
test_sha1.R...................   16 tests OK 
test_sha1.R...................   17 tests OK 
test_sha1.R...................   18 tests OK 
test_sha1.R...................   19 tests OK 
test_sha1.R...................   19 tests OK 
test_sha1.R...................   19 tests OK 
test_sha1.R...................   19 tests OK 
test_sha1.R...................   20 tests OK 
test_sha1.R...................   21 tests OK 
test_sha1.R...................   67 tests OK 
test_sha1.R...................   67 tests OK 
test_sha1.R...................   67 tests OK 
test_sha1.R...................   68 tests OK 
test_sha1.R...................   69 tests OK 
test_sha1.R...................   70 tests OK 
test_sha1.R...................   71 tests OK 
test_sha1.R...................   72 tests OK 
test_sha1.R...................   73 tests OK 
test_sha1.R...................   74 tests OK 
test_sha1.R...................   75 tests OK 
test_sha1.R...................   76 tests OK 
test_sha1.R...................   76 tests OK 
test_sha1.R...................   76 tests OK 
test_sha1.R...................   76 tests OK 
test_sha1.R...................   77 tests OK 
test_sha1.R...................   77 tests OK 
test_sha1.R...................   77 tests OK 
test_sha1.R...................   77 tests OK 
test_sha1.R...................   78 tests OK 
test_sha1.R...................   79 tests OK 
test_sha1.R...................   80 tests OK 
test_sha1.R...................   81 tests OK 
test_sha1.R...................   81 tests OK 
test_sha1.R...................   89 tests OK 
test_sha1.R...................   90 tests OK 
test_sha1.R...................   90 tests OK 
test_sha1.R...................   90 tests OK 
test_sha1.R...................   90 tests OK 
test_sha1.R...................   90 tests OK 
test_sha1.R...................  100 tests OK 
test_sha1.R...................  100 tests OK 
test_sha1.R...................  100 tests OK 
test_sha1.R...................  100 tests OK 
test_sha1.R...................  100 tests OK 
test_sha1.R...................  101 tests OK 
test_sha1.R...................  102 tests OK 1.1s
----- FAILED[data]: test_digest.R<260--266>
 call| expect_true(identical(spooky, spookyOutputPython[i]))
 diff| Expected TRUE, got FALSE
----- FAILED[data]: test_digest.R<260--266>
 call| expect_true(identical(spooky, spookyOutputPython[i]))
 diff| Expected TRUE, got FALSE
----- FAILED[data]: test_digest.R<260--266>
 call| expect_true(identical(spooky, spookyOutputPython[i]))
 diff| Expected TRUE, got FALSE
----- FAILED[data]: test_digest.R<260--266>
 call| expect_true(identical(spooky, spookyOutputPython[i]))
 diff| Expected TRUE, got FALSE
----- FAILED[data]: test_digest.R<260--266>
 call| expect_true(identical(spooky, spookyOutputPython[i]))
 diff| Expected TRUE, got FALSE
----- FAILED[data]: test_digest.R<260--266>
 call| expect_true(identical(spooky, spookyOutputPython[i]))
 diff| Expected TRUE, got FALSE
----- FAILED[data]: test_digest.R<260--266>
 call| expect_true(identical(spooky, spookyOutputPython[i]))
 diff| Expected TRUE, got FALSE
----- FAILED[data]: test_digest.R<268--271>
 call| expect_identical(getVDigest(algo = "spookyhash")(spookyInput, 
 call| -->    skip = 30), spookyOutputPython)
 diff| 7 string mismatches
----- FAILED[data]: test_digest.R<281--285>
 call| expect_true(identical(spooky, spookyOutput[i]))
 diff| Expected TRUE, got FALSE
----- FAILED[data]: test_digest.R<281--285>
 call| expect_true(identical(spooky, spookyOutput[i]))
 diff| Expected TRUE, got FALSE
----- FAILED[data]: test_digest.R<281--285>
 call| expect_true(identical(spooky, spookyOutput[i]))
 diff| Expected TRUE, got FALSE
----- FAILED[data]: test_digest.R<287--290>
 call| expect_identical(getVDigest(algo = "spookyhash")(spookyInput), 
 call| -->    spookyOutput)
 diff| 3 string mismatches
----- FAILED[data]: test_digest.R<294--294>
 call| expect_true(identical(spooky, "af58add8b4f7044582b331083bc239ff"))
 diff| Expected TRUE, got FALSE
----- FAILED[data]: test_digest.R<295--296>
 call| expect_identical(getVDigest("spookyhash")(list(iris)), "af58add8b4f7044582b331083bc239ff")
 diff| Expected 'af58add8b4f7044582b331083bc239ff', got 'f3743d951bc557456f708798affa88ad'
Error: 14 out of 300 tests failed
Execution halted
eddelbuettel commented 2 months ago

There are recurrent issues with spooky which had made think already I may have to remove it. To be seen.

eddelbuettel commented 2 months ago

Now only spooky ones fail:

So the narrowest check then may be

PS I also had forgotten that I already fixed the spooky remap issues three months ago. So it is really just a matter of not calling it under big endian systems which I can add easily enough.