Skip to content

Commit

Permalink
Skip Atheris tests on Ubuntu 24.04
Browse files Browse the repository at this point in the history
Atheris fails to install on Ubuntu 24.04, see google/atheris#82
  • Loading branch information
SweetVishnya committed Jan 14, 2025
1 parent f5b92e0 commit 141ffba
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@ env:
jobs:
ubuntu-latest:

runs-on: ubuntu-22.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --all-features --verbose
- name: Run tests
run: |
sudo apt update && sudo apt install -y gdb pip curl python3.10-dev llvm \
sudo apt update && sudo apt install -y gdb pip curl python3-dev llvm \
openjdk-17-jdk ca-certificates gnupg
pip3 install atheris
# Atheris fails to install on Ubuntu 24.04, see https://github.com/google/atheris/issues/82
# pip3 install atheris
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
export NODE_MAJOR=20
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:
jobs:
ubuntu-latest:

# Atheris fails to install on Ubuntu 24.04, see https://github.com/google/atheris/issues/82
runs-on: ubuntu-22.04

steps:
Expand Down
1 change: 1 addition & 0 deletions casr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ required-features = ["dojo"]

[dev-dependencies]
lazy_static = "1.4"
lsb_release = "0.1"
16 changes: 16 additions & 0 deletions casr/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4159,6 +4159,10 @@ fn test_casr_libfuzzer() {
#[test]
#[cfg(target_arch = "x86_64")]
fn test_casr_libfuzzer_atheris() {
if lsb_release::info().unwrap().version == "24.04" {
// Atheris fails to install, see https://github.com/google/atheris/issues/82
return;
}
use std::collections::HashMap;

let paths = [
Expand Down Expand Up @@ -4439,6 +4443,10 @@ fn test_casr_java_native_lib() {
#[test]
#[cfg(target_arch = "x86_64")]
fn test_casr_python_atheris() {
if lsb_release::info().unwrap().version == "24.04" {
// Atheris fails to install, see https://github.com/google/atheris/issues/82
return;
}
// Division by zero atheris test
let paths = [
abs_path("tests/casr_tests/python/test_casr_python_atheris.py"),
Expand Down Expand Up @@ -4577,6 +4585,10 @@ fn test_casr_san_python_df() {
#[test]
#[cfg(target_arch = "x86_64")]
fn test_casr_san_atheris_df() {
if lsb_release::info().unwrap().version == "24.04" {
// Atheris fails to install, see https://github.com/google/atheris/issues/82
return;
}
// Double free python C extension test
// Copy files to tmp dir
let work_dir = abs_path("tests/casr_tests/python");
Expand Down Expand Up @@ -4678,6 +4690,10 @@ fn test_casr_san_atheris_df() {
#[test]
#[cfg(target_arch = "x86_64")]
fn test_casr_python_call_san_df() {
if lsb_release::info().unwrap().version == "24.04" {
// Atheris fails to install, see https://github.com/google/atheris/issues/82
return;
}
// Double free python C extension test
// Copy files to tmp dir
let work_dir = abs_path("tests/casr_tests/python");
Expand Down

0 comments on commit 141ffba

Please sign in to comment.