From 3a8380df26d266e9b8292e985319c33096d53c0d Mon Sep 17 00:00:00 2001 From: Alessandro Decina Date: Wed, 12 Apr 2023 09:29:20 +1000 Subject: [PATCH] integration-test: expand full path for IntegrationTest --- test/integration-test-macros/src/lib.rs | 2 +- test/integration-test/src/tests/btf_relocations.rs | 2 +- test/integration-test/src/tests/elf.rs | 2 +- test/integration-test/src/tests/load.rs | 2 +- test/integration-test/src/tests/rbpf.rs | 2 +- test/integration-test/src/tests/smoke.rs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/integration-test-macros/src/lib.rs b/test/integration-test-macros/src/lib.rs index 6f69b486..297159ed 100644 --- a/test/integration-test-macros/src/lib.rs +++ b/test/integration-test-macros/src/lib.rs @@ -10,7 +10,7 @@ pub fn integration_test(_attr: TokenStream, item: TokenStream) -> TokenStream { let expanded = quote! { #item - inventory::submit!(IntegrationTest { + inventory::submit!(crate::IntegrationTest { name: concat!(module_path!(), "::", #name_str), test_fn: #name, }); diff --git a/test/integration-test/src/tests/btf_relocations.rs b/test/integration-test/src/tests/btf_relocations.rs index 53de8b5d..85291ef4 100644 --- a/test/integration-test/src/tests/btf_relocations.rs +++ b/test/integration-test/src/tests/btf_relocations.rs @@ -4,7 +4,7 @@ use tempfile::TempDir; use aya::{maps::Array, programs::TracePoint, BpfLoader, Btf, Endianness}; -use super::{integration_test, IntegrationTest}; +use super::integration_test; // In the tests below we often use values like 0xAAAAAAAA or -0x7AAAAAAA. Those values have no // special meaning, they just have "nice" bit patterns that can be helpful while debugging. diff --git a/test/integration-test/src/tests/elf.rs b/test/integration-test/src/tests/elf.rs index 32684459..623c9362 100644 --- a/test/integration-test/src/tests/elf.rs +++ b/test/integration-test/src/tests/elf.rs @@ -1,4 +1,4 @@ -use super::{integration_test, IntegrationTest}; +use super::integration_test; use aya::include_bytes_aligned; use object::{Object, ObjectSymbol}; diff --git a/test/integration-test/src/tests/load.rs b/test/integration-test/src/tests/load.rs index 50a3a2b6..9aa21bb5 100644 --- a/test/integration-test/src/tests/load.rs +++ b/test/integration-test/src/tests/load.rs @@ -13,7 +13,7 @@ use log::warn; use crate::tests::kernel_version; -use super::{integration_test, IntegrationTest}; +use super::integration_test; const MAX_RETRIES: u32 = 100; const RETRY_DURATION_MS: u64 = 10; diff --git a/test/integration-test/src/tests/rbpf.rs b/test/integration-test/src/tests/rbpf.rs index 3cdcedfb..e896d262 100644 --- a/test/integration-test/src/tests/rbpf.rs +++ b/test/integration-test/src/tests/rbpf.rs @@ -4,7 +4,7 @@ use std::collections::HashMap; use aya::include_bytes_aligned; use aya_obj::{generated::bpf_insn, Object, ProgramSection}; -use super::{integration_test, IntegrationTest}; +use super::integration_test; #[integration_test] fn run_with_rbpf() { diff --git a/test/integration-test/src/tests/smoke.rs b/test/integration-test/src/tests/smoke.rs index f5867bfe..17abd79b 100644 --- a/test/integration-test/src/tests/smoke.rs +++ b/test/integration-test/src/tests/smoke.rs @@ -5,7 +5,7 @@ use aya::{ }; use log::info; -use super::{integration_test, kernel_version, IntegrationTest}; +use super::{integration_test, kernel_version}; #[integration_test] fn xdp() {