r-lib / later

Schedule an R function or formula to run after a specified period of time.
https://r-lib.github.io/later
Other
141 stars 28 forks source link

Failure ('test-cancel.R:197'): Canceling a callback from another a callback: `ran_2` is not FALSE #171

Open barracuda156 opened 1 year ago

barracuda156 commented 1 year ago

There is a failure in tests on PPC:

* checking tests ...
  Running ‘testthat.R’
 ERROR
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
  `expected`: TRUE 
  ── Failure ('test-cancel.R:197'): Canceling a callback from another a callback ──
  `ran_2` is not FALSE

  `actual`:   TRUE 
  `expected`: FALSE
  ── Failure ('test-cancel.R:198'): Canceling a callback from another a callback ──
  `ran_3` is not FALSE

  `actual`:   TRUE 
  `expected`: FALSE

  [ FAIL 21 | WARN 0 | SKIP 2 | PASS 100 ]
  Error: Test failures
  Execution halted

Log: later_tests_log.txt

P. S. malloc errors in the log are a known problem caused by a duplicate libstdc++; they are likely not the cause for the test failure in question.

barracuda156 commented 1 year ago

Error output:


R version 4.2.2 (2022-10-31) -- "Innocent and Trusting"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: powerpc-apple-darwin10.8.0 (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.

> # See https://github.com/r-lib/testthat/issues/86
> Sys.setenv("R_TESTS" = "")
> 
> library(testthat)
R(32960,0xa0dfb620) malloc: *** error for object 0xa0d51754: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
R(32960,0xa0dfb620) malloc: *** error for object 0xa0d517c4: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
R(32960,0xa0dfb620) malloc: *** error for object 0x34e52c0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
R(32960,0xa0dfb620) malloc: *** error for object 0x34e4928: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
R(32960,0xa0dfb620) malloc: *** error for object 0x34e4890: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
R(32960,0xa0dfb620) malloc: *** error for object 0x34e48dc: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
R(32960,0xa0dfb620) malloc: *** error for object 0x34e47c8: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
R(32960,0xa0dfb620) malloc: *** error for object 0x34e46a0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
R(32960,0xa0dfb620) malloc: *** error for object 0x34e45c0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
R(32960,0xa0dfb620) malloc: *** error for object 0x34e4630: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
R(32960,0xa0dfb620) malloc: *** error for object 0x34e44f8: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
R(32960,0xa0dfb620) malloc: *** error for object 0x34e5200: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
R(32960,0xa0dfb620) malloc: *** error for object 0x34e5380: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
R(32960,0xa0dfb620) malloc: *** error for object 0x34e538c: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
R(32960,0xa0dfb620) malloc: *** error for object 0x34e53a8: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
> library(later)
> 
> test_check("later")
foo
Error in (function (..., .x = ..1, .y = ..2, . = ..1)  : boom
Error in (function ()  : no function to return from, jumping to top level
Error in (function ()  : no function to return from, jumping to top level
[ FAIL 21 | WARN 0 | SKIP 2 | PASS 100 ]

══ Skipped tests ═══════════════════════════════════════════════════════════════
• On CRAN (2)

══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-cancel.R:8'): Cancelling callbacks ───────────────────────────
cancel() is not TRUE

`actual`:   FALSE
`expected`: TRUE 
── Failure ('test-cancel.R:10'): Cancelling callbacks ──────────────────────────
`x` not identical to 2.
1/1 mismatches
[1] 3 - 2 == 1
── Failure ('test-cancel.R:16'): Cancelling callbacks ──────────────────────────
cancel() is not TRUE

`actual`:   FALSE
`expected`: TRUE 
── Failure ('test-cancel.R:18'): Cancelling callbacks ──────────────────────────
`x` not identical to 0.
1/1 mismatches
[1] 1 - 0 == 1
── Failure ('test-cancel.R:25'): Cancelling callbacks ──────────────────────────
cancel() is not TRUE

`actual`:   FALSE
`expected`: TRUE 
── Failure ('test-cancel.R:27'): Cancelling callbacks ──────────────────────────
`x` not identical to 1.
1/1 mismatches
[1] 2 - 1 == 1
── Failure ('test-cancel.R:39'): Cancelled functions will be GC'd ──────────────
cancel() is not TRUE

`actual`:   FALSE
`expected`: TRUE 
── Failure ('test-cancel.R:41'): Cancelled functions will be GC'd ──────────────
`x` not identical to 1.
1/1 mismatches
[1] 0 - 1 == -1
── Failure ('test-cancel.R:57'): Cancelling executed or cancelled callbacks has no effect ──
cancel() is not TRUE

`actual`:   FALSE
`expected`: TRUE 
── Failure ('test-cancel.R:60'): Cancelling executed or cancelled callbacks has no effect ──
`x` not identical to 0.
1/1 mismatches
[1] 1 - 0 == 1
── Failure ('test-cancel.R:75'): Cancelling callbacks on temporary event loops ──
cancel() is not TRUE

`actual`:   FALSE
`expected`: TRUE 
Backtrace:
    ▆
 1. ├─later::with_temp_loop(...) at test-cancel.R:75:2
 2. │ └─later::with_loop(loop, expr)
 3. │   └─base::force(expr)
 4. └─testthat::expect_true(cancel()) at test-cancel.R:79:4
── Failure ('test-cancel.R:75'): Cancelling callbacks on temporary event loops ──
`x` not identical to 0.
1/1 mismatches
[1] 1 - 0 == 1
Backtrace:
    ▆
 1. ├─later::with_temp_loop(...) at test-cancel.R:75:2
 2. │ └─later::with_loop(loop, expr)
 3. │   └─base::force(expr)
 4. └─testthat::expect_identical(x, 0) at test-cancel.R:82:4
── Failure ('test-cancel.R:85'): Cancelling callbacks on temporary event loops ──
cancel() is not TRUE

`actual`:   FALSE
`expected`: TRUE 
Backtrace:
    ▆
 1. ├─later::with_temp_loop(...) at test-cancel.R:85:2
 2. │ └─later::with_loop(loop, expr)
 3. │   └─base::force(expr)
 4. └─testthat::expect_true(cancel()) at test-cancel.R:91:4
── Failure ('test-cancel.R:85'): Cancelling callbacks on temporary event loops ──
`x` not identical to 1.
1/1 mismatches
[1] 2 - 1 == 1
Backtrace:
    ▆
 1. ├─later::with_temp_loop(...) at test-cancel.R:85:2
 2. │ └─later::with_loop(loop, expr)
 3. │   └─base::force(expr)
 4. └─testthat::expect_identical(x, 1) at test-cancel.R:93:4
── Failure ('test-cancel.R:119'): Cancelling callbacks on persistent private loops without parent ──
cancel() is not TRUE

`actual`:   FALSE
`expected`: TRUE 
── Failure ('test-cancel.R:123'): Cancelling callbacks on persistent private loops without parent ──
`x` not identical to 0.
1/1 mismatches
[1] 1 - 0 == 1
── Failure ('test-cancel.R:134'): Cancelling callbacks on persistent private loops without parent ──
cancel() is not TRUE

`actual`:   FALSE
`expected`: TRUE 
── Failure ('test-cancel.R:138'): Cancelling callbacks on persistent private loops without parent ──
`x` not identical to 6.
1/1 mismatches
[1] 8 - 6 == 2
── Failure ('test-cancel.R:163'): Cancelling callbacks on persistent private loops with parent ──
cancel() is not TRUE

`actual`:   FALSE
`expected`: TRUE 
── Failure ('test-cancel.R:197'): Canceling a callback from another a callback ──
`ran_2` is not FALSE

`actual`:   TRUE 
`expected`: FALSE
── Failure ('test-cancel.R:198'): Canceling a callback from another a callback ──
`ran_3` is not FALSE

`actual`:   TRUE 
`expected`: FALSE

[ FAIL 21 | WARN 0 | SKIP 2 | PASS 100 ]
Error: Test failures
Execution halted