Skip to content

Commit c2ee4e6

Browse files
committed
refactor: Move eBPF loader tests to the end of the file and clean up test module
1 parent 5857d02 commit c2ee4e6

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

agent/src/collector/lock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ impl LockCollector {
167167
#[cfg(test)]
168168
mod tests {
169169
use super::*;
170-
use aperture_shared::types::profile::{Frame, Stack};
170+
use aperture_shared::types::profile::Stack;
171171

172172
#[test]
173173
fn test_lock_collector() {

agent/src/ebpf/loader.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -217,19 +217,6 @@ pub fn cleanup(links: PerfEventLinks) {
217217
drop(links);
218218
}
219219

220-
#[cfg(test)]
221-
mod tests {
222-
use super::*;
223-
224-
#[test]
225-
#[ignore] // Requires eBPF build artifacts
226-
fn test_load_cpu_profiler() {
227-
// This test requires the eBPF program to be built
228-
let result = load_cpu_profiler();
229-
assert!(result.is_err()); // Expected to fail until implemented
230-
}
231-
}
232-
233220
use aya::programs::raw_trace_point::RawTracePointLinkId;
234221
use aya::programs::trace_point::TracePointLinkId;
235222
use aya::programs::{RawTracePoint, TracePoint};
@@ -449,3 +436,16 @@ pub fn attach_syscall_tracer(
449436

450437
Ok(links)
451438
}
439+
440+
#[cfg(test)]
441+
mod tests {
442+
use super::*;
443+
444+
#[test]
445+
#[ignore] // Requires eBPF build artifacts
446+
fn test_load_cpu_profiler() {
447+
// This test requires the eBPF program to be built
448+
let result = load_cpu_profiler();
449+
assert!(result.is_err()); // Expected to fail until implemented
450+
}
451+
}

0 commit comments

Comments
 (0)