Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(rcdf)
  > 
  > test_check("rcdf")
  duckdb is storing downloaded extensions and secrets under ~/.duckdb:
  i /data/localhost/ripley/.duckdb
  This persists across sessions and is shared with the DuckDB CLI and other clients.
  i Run duckdb(shared_home = FALSE) to use a temporary directory instead.
  i See ?duckdb_storage for details and alternatives.
  duckdb was built with libc++ (not libstdc++) on Linux, so DuckDB extensions are disabled:
  * Loading a prebuilt (libstdc++) extension could crash R (https://github.com/duckdb/duckdb-r/issues/1107).
  * INSTALL/LOAD of an extension will error, and automatic extension loading is off.
  i Pass duckdb(allow_extensions = FALSE) to accept this and silence this message.
  i Pass duckdb(allow_extensions = TRUE) to attempt loading anyway (may crash R).
  i See ?duckdb for details.
  duckdb is storing downloaded extensions and secrets under ~/.duckdb:
  i /data/localhost/ripley/.duckdb
  This persists across sessions and is shared with the DuckDB CLI and other clients.
  i Run duckdb(shared_home = FALSE) to use a temporary directory instead.
  i See ?duckdb_storage for details and alternatives.
  duckdb was built with libc++ (not libstdc++) on Linux, so DuckDB extensions are disabled:
  * Loading a prebuilt (libstdc++) extension could crash R (https://github.com/duckdb/duckdb-r/issues/1107).
  * INSTALL/LOAD of an extension will error, and automatic extension loading is off.
  i Pass duckdb(allow_extensions = FALSE) to accept this and silence this message.
  i Pass duckdb(allow_extensions = TRUE) to attempt loading anyway (may crash R).
  i See ?duckdb for details.
  duckdb is storing downloaded extensions and secrets under ~/.duckdb:
  i /data/localhost/ripley/.duckdb
  This persists across sessions and is shared with the DuckDB CLI and other clients.
  i Run duckdb(shared_home = FALSE) to use a temporary directory instead.
  i See ?duckdb_storage for details and alternatives.
  duckdb was built with libc++ (not libstdc++) on Linux, so DuckDB extensions are disabled:
  * Loading a prebuilt (libstdc++) extension could crash R (https://github.com/duckdb/duckdb-r/issues/1107).
  * INSTALL/LOAD of an extension will error, and automatic extension loading is off.
  i Pass duckdb(allow_extensions = FALSE) to accept this and silence this message.
  i Pass duckdb(allow_extensions = TRUE) to attempt loading anyway (may crash R).
  i See ?duckdb for details.
  duckdb is storing downloaded extensions and secrets under ~/.duckdb:
  i /data/localhost/ripley/.duckdb
  This persists across sessions and is shared with the DuckDB CLI and other clients.
  i Run duckdb(shared_home = FALSE) to use a temporary directory instead.
  i See ?duckdb_storage for details and alternatives.
  duckdb was built with libc++ (not libstdc++) on Linux, so DuckDB extensions are disabled:
  * Loading a prebuilt (libstdc++) extension could crash R (https://github.com/duckdb/duckdb-r/issues/1107).
  * INSTALL/LOAD of an extension will error, and automatic extension loading is off.
  i Pass duckdb(allow_extensions = FALSE) to accept this and silence this message.
  i Pass duckdb(allow_extensions = TRUE) to attempt loading anyway (may crash R).
  i See ?duckdb for details.
  
   *** caught segfault ***
  address (nil), cause 'unknown'
  
  Traceback:
   1: rapi_prepare(conn, query, env)
   2: withCallingHandlers(expr, condition = function(cnd) {    {        .__handler_frame__. <- TRUE        .__setup_frame__. <- frame        if (inherits(cnd, "message")) {            except <- c("warning", "error")        }        else if (inherits(cnd, "warning")) {            except <- "error"        }        else {            except <- ""        }    }    while (!is_null(cnd)) {        if (inherits(cnd, "error")) {            out <- handlers[[1L]](cnd)            if (!inherits(out, "rlang_zap"))                 throw(out)        }        inherit <- .subset2(.subset2(cnd, "rlang"), "inherit")        if (is_false(inherit)) {            return()        }        cnd <- .subset2(cnd, "parent")    }})
   3: doTryCatch(return(expr), name, parentenv, handler)
   4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   5: tryCatchList(expr, classes, parentenv, handlers)
   6: tryCatch(withCallingHandlers(expr, condition = function(cnd) {    {        .__handler_frame__. <- TRUE        .__setup_frame__. <- frame        if (inherits(cnd, "message")) {            except <- c("warning", "error")        }        else if (inherits(cnd, "warning")) {            except <- "error"        }        else {            except <- ""        }    }    while (!is_null(cnd)) {        if (inherits(cnd, "error")) {            out <- handlers[[1L]](cnd)            if (!inherits(out, "rlang_zap"))                 throw(out)        }        inherit <- .subset2(.subset2(cnd, "rlang"), "inherit")        if (is_false(inherit)) {            return()        }        cnd <- .subset2(cnd, "parent")    }}), stackOverflowError = handlers[[1L]])
   7: rlang::try_fetch(rapi_prepare(conn, query, env), error = function(e) {    rethrow_error_from_rapi(e, call)})
   8: rethrow_rapi_prepare(conn@conn_ref, statement, env)
   9: .local(conn, statement, ...)
  10: dbSendQuery(conn, statement, ...)
  11: dbSendQuery(conn, statement, ...)
  12: dbSendStatement(conn, statement, ...)
  13: dbSendStatement(conn, statement, ...)
  14: DBI::dbExecute(conn, sprintf("CREATE TABLE %s AS\n         SELECT * FROM read_parquet(%s,\n         encryption_config = { footer_key: %s });",     sql_ident(conn, record), sql_literal(conn, pq_file), sql_literal(conn,         secret$key)))
  15: DBI::dbExecute(conn, sprintf("CREATE TABLE %s AS\n         SELECT * FROM read_parquet(%s,\n         encryption_config = { footer_key: %s });",     sql_ident(conn, record), sql_literal(conn, pq_file), sql_literal(conn,         secret$key)))
  16: process_parquet_file(conn, pq_file, secret, pk, registered_keys)
  17: process_rcdf_file(conn = conn, rcdf_file = rcdf_files[i], key = creds$keys[i],     password = creds$passwords[i], metadata = metadata, ignore_duplicates = ignore_duplicates)
  18: read_rcdf(path = rcdf_files, decryption_key = decryption_keys,     password = passwords, return_meta = TRUE)
  19: merge_rcdf(rcdf_files = c(f1$path, f2$path), decryption_keys = c(f1$prv,     f2$prv), passwords = c(NULL, NULL), merged_file_path = merged_path,     pub_key = file.path(dir, "merge-pub.pem"))
  20: eval(code, test_env)
  21: eval(code, test_env)
  22: withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt)
  23: doTryCatch(return(expr), name, parentenv, handler)
  24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  25: tryCatchList(expr, classes, parentenv, handlers)
  26: tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
  27: doWithOneRestart(return(expr), restart)
  28: withOneRestart(expr, restarts[[1L]])
  29: withRestarts(tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal),     end_test = function() {    })
  30: test_code(code, parent.frame())
  31: test_that("merge_rcdf with explicit pub_key merges files and round-trips data",     {        dir <- withr::local_tempdir()        f1 <- create_rcdf_for_merge(dir, "f1", list(t1 = data.frame(a = 1:3)))        f2 <- create_rcdf_for_merge(dir, "f2", list(t2 = data.frame(b = 4:6)))        merge_pub_key <- openssl::rsa_keygen()        openssl::write_pem(merge_pub_key$pubkey, file.path(dir,             "merge-pub.pem"))        openssl::write_pem(merge_pub_key, file.path(dir, "merge-prv.pem"))        merged_path <- file.path(dir, "merged.rcdf")        merge_rcdf(rcdf_files = c(f1$path, f2$path), decryption_keys = c(f1$prv,             f2$prv), passwords = c(NULL, NULL), merged_file_path = merged_path,             pub_key = file.path(dir, "merge-pub.pem"))        expect_true(file.exists(merged_path))        result <- read_rcdf(merged_path, decryption_key = file.path(dir,             "merge-prv.pem"))        expect_s3_class(result, "rcdf")        expect_true("t1" %in% names(result))        expect_true("t2" %in% names(result))    })
  32: eval(code, test_env)
  33: eval(code, test_env)
  34: withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt)
  35: doTryCatch(return(expr), name, parentenv, handler)
  36: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  37: tryCatchList(expr, classes, parentenv, handlers)
  38: tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
  39: doWithOneRestart(return(expr), restart)
  40: withOneRestart(expr, restarts[[1L]])
  41: withRestarts(tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal),     end_test = function() {    })
  42: test_code(code = exprs, env = env, reporter = get_reporter() %||%     StopReporter$new())
  43: source_file(path, env = env(env), desc = desc, shuffle = shuffle,     error_call = error_call)
  44: FUN(X[[i]], ...)
  45: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,     error_call = error_call)
  46: doTryCatch(return(expr), name, parentenv, handler)
  47: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  48: tryCatchList(expr, classes, parentenv, handlers)
  49: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  50: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, desc = desc, shuffle = shuffle, error_call = error_call))
  51: test_files_serial(test_dir = test_dir, test_package = test_package,     test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,     env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     desc = desc, load_package = load_package, shuffle = shuffle,     error_call = error_call)
  52: test_files(test_dir = path, test_paths = test_paths, test_package = package,     reporter = reporter, load_helpers = load_helpers, env = env,     stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     load_package = load_package, parallel = parallel, shuffle = shuffle)
  53: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  54: test_check("rcdf")
  An irrecoverable exception occurred. R is aborting now ...