Skip to content

Commit

Permalink
Exclude some tests from running with the compute sanitizer (#13872)
Browse files Browse the repository at this point in the history
Authors:
  - Liangcai Li (https://github.com/firestarman)

Approvers:
  - Robert (Bobby) Evans (https://github.com/revans2)
  - Jason Lowe (https://github.com/jlowe)

URL: #13872
  • Loading branch information
firestarman authored Aug 15, 2023
1 parent 8b72662 commit 1d58d5f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
2 changes: 2 additions & 0 deletions java/src/test/java/ai/rapids/cudf/CudaTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package ai.rapids.cudf;

import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
Expand All @@ -33,6 +34,7 @@ public void testGetCudaRuntimeInfo() {
assertEquals(Cuda.getNativeComputeMode(), Cuda.getComputeMode().nativeId);
}

@Tag("noSanitizer")
@Test
public void testCudaException() {
assertThrows(CudaException.class, () -> {
Expand Down
13 changes: 12 additions & 1 deletion java/src/test/java/ai/rapids/cudf/RmmTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2022, NVIDIA CORPORATION.
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,6 +18,7 @@

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
Expand Down Expand Up @@ -187,6 +188,7 @@ public void testScopedMaxOutstandingNegative(int rmmAllocMode) {
}
}

@Tag("noSanitizer")
@ParameterizedTest
@ValueSource(ints = {
RmmAllocationMode.CUDA_DEFAULT,
Expand Down Expand Up @@ -257,6 +259,7 @@ public void onDeallocated(long sizeDeallocated) {
assertEquals(1024, totalDeallocated.get());
}

@Tag("noSanitizer")
@Test
public void testSetEventHandlerTwice() {
Rmm.initialize(RmmAllocationMode.CUDA_DEFAULT, Rmm.logToStderr(), 0L);
Expand All @@ -278,6 +281,7 @@ public boolean onAllocFailure(long sizeRequested, int retryCount) {
assertThrows(RmmException.class, () -> Rmm.setEventHandler(otherHandler));
}

@Tag("noSanitizer")
@Test
public void testClearEventHandler() {
Rmm.initialize(RmmAllocationMode.CUDA_DEFAULT, Rmm.logToStderr(), 0L);
Expand All @@ -304,6 +308,7 @@ public boolean onAllocFailure(long sizeRequested, int retryCount) {
}
}

@Tag("noSanitizer")
@Test
public void testAllocOnlyThresholds() {
final AtomicInteger allocInvocations = new AtomicInteger(0);
Expand Down Expand Up @@ -367,6 +372,7 @@ public void onDeallocThreshold(long totalAllocSize) {
assertEquals(0, deallocInvocations.get());
}

@Tag("noSanitizer")
@Test
public void testThresholds() {
final AtomicInteger allocInvocations = new AtomicInteger(0);
Expand Down Expand Up @@ -451,6 +457,7 @@ public void onDeallocThreshold(long totalAllocSize) {
assertEquals(2, deallocInvocations.get());
}

@Tag("noSanitizer")
@Test
public void testExceptionHandling() {
Rmm.initialize(RmmAllocationMode.POOL, Rmm.logToStderr(), 1024 * 1024L);
Expand Down Expand Up @@ -511,6 +518,7 @@ public void testThreadAutoDeviceSetup() throws Exception {
}
}

@Tag("noSanitizer")
@ParameterizedTest
@ValueSource(ints = {
RmmAllocationMode.CUDA_DEFAULT,
Expand All @@ -523,6 +531,7 @@ public void testSetDeviceThrowsAfterRmmInit(int rmmAllocMode) {
Cuda.autoSetDevice();
}

@Tag("noSanitizer")
@Test
public void testPoolSize() {
Rmm.initialize(RmmAllocationMode.POOL, Rmm.logToStderr(), 1024);
Expand All @@ -535,6 +544,7 @@ public void testPoolSize() {
}
}

@Tag("noSanitizer")
@Test
public void testCudaAsyncMemoryResourceSize() {
try {
Expand All @@ -553,6 +563,7 @@ public void testCudaAsyncMemoryResourceSize() {
}
}

@Tag("noSanitizer")
@Test
public void testCudaAsyncIsIncompatibleWithManaged() {
assertThrows(IllegalArgumentException.class,
Expand Down
4 changes: 4 additions & 0 deletions java/src/test/java/ai/rapids/cudf/TableTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.apache.parquet.schema.GroupType;
import org.apache.parquet.schema.MessageType;
import org.apache.parquet.schema.OriginalType;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

import java.io.*;
Expand Down Expand Up @@ -8602,6 +8603,9 @@ void testORCWriteToFileWithColNames() throws IOException {
}
}

// https://github.com/NVIDIA/spark-rapids-jni/issues/1338
// Need to remove this tag if #1338 is fixed.
@Tag("noSanitizer")
@Test
void testORCReadAndWriteForDecimal128() throws IOException {
File tempFile = File.createTempFile("test", ".orc");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright (c) 2019, NVIDIA CORPORATION.
* Copyright (c) 2019-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,11 +18,13 @@

package ai.rapids.cudf;

import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;

@Tag("noSanitizer")
public class UnsafeMemoryAccessorTest {
@Test
public void testAllocate() {
Expand Down

0 comments on commit 1d58d5f

Please sign in to comment.