Skip to content

Commit

Permalink
ARROW-15708: [R] [CI] skip snappy encoded parquets on clang sanitizer
Browse files Browse the repository at this point in the history
This adds a few skips for some new tests that involved snappy, which has a known sanitizer bug.

I also added a `ARROW_R_VERBOSE_TEST` env var to enable verbosity without relying on `ARROW_R_DEV` which helps show exactly where these kinds of issues are without needing to run locally.

Closes apache#12443 from jonkeane/ARROW-15708

Authored-by: Jonathan Keane <[email protected]>
Signed-off-by: Jonathan Keane <[email protected]>
  • Loading branch information
jonkeane committed Feb 19, 2022
1 parent 5bedee4 commit f9f2c08
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ci/scripts/r_sanitize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ ${R_BIN} CMD INSTALL ${INSTALL_ARGS} arrow*.tar.gz
# But unset the env var so that it doesn't cause us to run extra dev tests
unset ARROW_R_DEV

# Set the testthat output to be verbose for easier debugging
export ARROW_R_VERBOSE_TEST=TRUE

export UBSAN_OPTIONS="print_stacktrace=1,suppressions=/arrow/r/tools/ubsan.supp"

# run tests
Expand Down
5 changes: 4 additions & 1 deletion r/tests/testthat.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ library(testthat)
library(arrow)
library(tibble)

if (identical(tolower(Sys.getenv("ARROW_R_DEV", "false")), "true")) {
verbose_test_output <- identical(tolower(Sys.getenv("ARROW_R_DEV", "false")), "true") ||
identical(tolower(Sys.getenv("ARROW_R_VERBOSE_TEST", "false")), "true")

if (verbose_test_output) {
arrow_reporter <- MultiReporter$new(list(CheckReporter$new(), LocationReporter$new()))
} else {
arrow_reporter <- check_reporter()
Expand Down
5 changes: 4 additions & 1 deletion r/tests/testthat/test-dataset.R
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,10 @@ test_that("Assembling multiple DatasetFactories with DatasetFactory", {
expect_scan_result(ds, schm)
})

# By default, snappy encoding will be used, and
# Snappy has a UBSan issue: https://github.com/google/snappy/pull/148
skip_on_linux_devel()

# see https://issues.apache.org/jira/browse/ARROW-11328
test_that("Collecting zero columns from a dataset doesn't return entire dataset", {
tmp <- tempfile()
Expand All @@ -839,7 +843,6 @@ test_that("Collecting zero columns from a dataset doesn't return entire dataset"
)
})


test_that("dataset RecordBatchReader to C-interface to arrow_dplyr_query", {
ds <- open_dataset(hive_dir)

Expand Down
5 changes: 5 additions & 0 deletions r/tests/testthat/test-dplyr-join.R
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ test_that("arrow dplyr query correctly filters then joins", {

test_that("arrow dplyr query can join with tibble", {
# ARROW-14908

# By default, snappy encoding will be used, and
# Snappy has a UBSan issue: https://github.com/google/snappy/pull/148
skip_on_linux_devel()

dir_out <- tempdir()
write_dataset(iris, file.path(dir_out, "iris"))
species_codes <- data.frame(
Expand Down

0 comments on commit f9f2c08

Please sign in to comment.