Running ‘testthat.R’ [27s/27s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(sys)
  > 
  > test_check("sys")
  
   *** caught segfault ***
  address 0, cause 'memory not mapped'
  
  Traceback:
   1: doTryCatch(return(expr), name, parentenv, handler)
   2: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   3: tryCatchList(expr, classes, parentenv, handlers)
   4: tryCatch({    object    NULL}, error = function(e) {    e})
   5: expect_error(exec_wait("doesnotexist"), "Failed to execute")
   6: eval(expr, envir, enclos)
   7: eval(code, test_env)
   8: withCallingHandlers(eval(code, test_env), expectation = handle_expectation,     skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error)
   9: doTryCatch(return(expr), name, parentenv, handler)
  10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  12: doTryCatch(return(expr), name, parentenv, handler)
  13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  14: tryCatchList(expr, classes, parentenv, handlers)
  15: tryCatch(withCallingHandlers(eval(code, test_env), expectation = handle_expectation,     skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error), error = function(e) {}, skip = function(e) {})
  16: test_code(desc, code, env = parent.frame())
  17: test_that("error is raised for invalid executable", {    expect_error(exec_wait("doesnotexist"), "Failed to execute")    expect_error(exec_background("doesnotexist"), "Failed to execute")    expect_error(exec_wait("doesnotexist", std_out = FALSE, std_err = FALSE),         "Failed to execute")    expect_error(exec_background("doesnotexist", std_out = FALSE,         std_err = FALSE), "Failed to execute")})
  18: eval(expr, envir, enclos)
  19: eval(exprs, env)
  20: source_file(path, new.env(parent = env), chdir = TRUE)
  21: force(code)
  22: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE)        end_context()    })
  23: FUN(X[[i]], ...)
  24: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE)
  25: force(code)
  26: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE))
  27: test_files(paths, reporter = reporter, env = env, ...)
  28: test_dir(test_path, reporter = reporter, env = env, filter = filter,     ...)
  29: with_top_env(env, {    test_dir(test_path, reporter = reporter, env = env, filter = filter,         ...)})
  30: run_tests(package, test_path, filter, reporter, ...)
  31: test_check("sys")
  An irrecoverable exception occurred. R is aborting now ...
  1. Failure: error is raised for invalid executable (@test-error.R#15) ----------
  error$message does not match "Failed to execute".
  Actual value: "Program 'doesnotexist' terminated by SIGNAL (Segmentation Fault)"
  
  
  
   *** caught segfault ***
  address 0, cause 'memory not mapped'
  
  Traceback:
   1: doTryCatch(return(expr), name, parentenv, handler)
   2: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   3: tryCatchList(expr, classes, parentenv, handlers)
   4: tryCatch({    object    NULL}, error = function(e) {    e})
   5: expect_error(exec_background("doesnotexist"), "Failed to execute")
   6: eval(expr, envir, enclos)
   7: eval(code, test_env)
   8: withCallingHandlers(eval(code, test_env), expectation = handle_expectation,     skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error)
   9: doTryCatch(return(expr), name, parentenv, handler)
  10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  12: doTryCatch(return(expr), name, parentenv, handler)
  13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  14: tryCatchList(expr, classes, parentenv, handlers)
  15: tryCatch(withCallingHandlers(eval(code, test_env), expectation = handle_expectation,     skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error), error = function(e) {}, skip = function(e) {})
  16: test_code(desc, code, env = parent.frame())
  17: test_that("error is raised for invalid executable", {    expect_error(exec_wait("doesnotexist"), "Failed to execute")    expect_error(exec_background("doesnotexist"), "Failed to execute")    expect_error(exec_wait("doesnotexist", std_out = FALSE, std_err = FALSE),         "Failed to execute")    expect_error(exec_background("doesnotexist", std_out = FALSE,         std_err = FALSE), "Failed to execute")})
  18: eval(expr, envir, enclos)
  19: eval(exprs, env)
  20: source_file(path, new.env(parent = env), chdir = TRUE)
  21: force(code)
  22: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE)        end_context()    })
  23: FUN(X[[i]], ...)
  24: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE)
  25: force(code)
  26: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE))
  27: test_files(paths, reporter = reporter, env = env, ...)
  28: test_dir(test_path, reporter = reporter, env = env, filter = filter,     ...)
  29: with_top_env(env, {    test_dir(test_path, reporter = reporter, env = env, filter = filter,         ...)})
  30: run_tests(package, test_path, filter, reporter, ...)
  31: test_check("sys")
  An irrecoverable exception occurred. R is aborting now ...
  2. Failure: error is raised for invalid executable (@test-error.R#16) ----------
  exec_background("doesnotexist") did not throw an error.
  
  
  3. Failure: error is raised for invalid executable (@test-error.R#19) ----------
  error$message does not match "Failed to execute".
  Actual value: "Program 'doesnotexist' terminated by SIGNAL (Segmentation Fault)"
  
  
  4. Failure: error is raised for invalid executable (@test-error.R#20) ----------
  exec_background("doesnotexist", std_out = FALSE, std_err = FALSE) did not throw an error.
  
  
  testthat results ================================================================
  OK: 21 SKIPPED: 0 FAILED: 4
  1. Failure: error is raised for invalid executable (@test-error.R#15) 
  2. Failure: error is raised for invalid executable (@test-error.R#16) 
  3. Failure: error is raised for invalid executable (@test-error.R#19) 
  4. Failure: error is raised for invalid executable (@test-error.R#20) 
  
  Error: testthat unit tests failed
  Execution halted