Skip to content

Commit a58dcf5

Browse files
committed
integration-tests: cosmetic changes
1 parent 9763490 commit a58dcf5

File tree

4 files changed

+3
-13
lines changed

4 files changed

+3
-13
lines changed

integration-tests/tests/cases/intercept.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use crate::fixtures::constants::*;
99
use crate::fixtures::infrastructure::*;
1010
use anyhow::Result;
11+
#[allow(unused_imports)]
1112
use encoding_rs;
1213

1314
/// Test basic command interception with preload mechanism

integration-tests/tests/cases/intercept_posix.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ intercept:
2929
///
3030
/// execl(path, arg0, arg1, ..., NULL) - variadic, no PATH search, inherited env
3131
#[test]
32-
#[cfg(has_preload_library)]
3332
#[cfg(has_symbol_execl)]
3433
#[cfg(all(has_executable_compiler_c, has_executable_echo))]
3534
fn execl_interception() -> Result<()> {
@@ -75,7 +74,6 @@ int main() {{
7574
///
7675
/// execlp(file, arg0, arg1, ..., NULL) - variadic, PATH search, inherited env
7776
#[test]
78-
#[cfg(has_preload_library)]
7977
#[cfg(has_symbol_execlp)]
8078
#[cfg(all(has_executable_compiler_c, has_executable_echo))]
8179
fn execlp_interception() -> Result<()> {
@@ -118,7 +116,6 @@ int main() {
118116
///
119117
/// execle(path, arg0, arg1, ..., NULL, envp) - variadic, no PATH search, explicit env
120118
#[test]
121-
#[cfg(has_preload_library)]
122119
#[cfg(has_symbol_execle)]
123120
#[cfg(all(has_executable_compiler_c, has_executable_echo))]
124121
fn execle_interception() -> Result<()> {
@@ -164,7 +161,6 @@ int main() {{
164161
///
165162
/// execv(path, argv) - array, no PATH search, inherited env
166163
#[test]
167-
#[cfg(has_preload_library)]
168164
#[cfg(has_symbol_execv)]
169165
#[cfg(all(has_executable_compiler_c, has_executable_echo))]
170166
fn execv_interception() -> Result<()> {
@@ -208,7 +204,6 @@ int main() {{
208204
///
209205
/// execve(path, argv, envp) - array, no PATH search, explicit env
210206
#[test]
211-
#[cfg(has_preload_library)]
212207
#[cfg(has_symbol_execve)]
213208
#[cfg(all(has_executable_compiler_c, has_executable_echo))]
214209
fn execve_interception() -> Result<()> {
@@ -253,7 +248,6 @@ int main() {{
253248
///
254249
/// execvp(file, argv) - array, PATH search, inherited env
255250
#[test]
256-
#[cfg(has_preload_library)]
257251
#[cfg(has_symbol_execvp)]
258252
#[cfg(all(has_executable_compiler_c, has_executable_echo))]
259253
fn execvp_interception() -> Result<()> {
@@ -295,7 +289,6 @@ int main() {
295289
///
296290
/// execvpe(file, argv, envp) - array, PATH search, explicit env
297291
#[test]
298-
#[cfg(has_preload_library)]
299292
#[cfg(has_symbol_execvpe)]
300293
#[cfg(all(has_executable_compiler_c, has_executable_echo))]
301294
fn execvpe_interception() -> Result<()> {
@@ -338,7 +331,6 @@ int main() {
338331

339332
/// Test posix_spawn interception
340333
#[test]
341-
#[cfg(has_preload_library)]
342334
#[cfg(has_symbol_posix_spawn)]
343335
#[cfg(all(has_executable_compiler_c, has_executable_echo))]
344336
fn posix_spawn_interception() -> Result<()> {
@@ -392,7 +384,6 @@ int main() {{
392384

393385
/// Test posix_spawnp interception (searches PATH)
394386
#[test]
395-
#[cfg(has_preload_library)]
396387
#[cfg(has_symbol_posix_spawnp)]
397388
#[cfg(has_executable_compiler_c)]
398389
fn posix_spawnp_interception() -> Result<()> {
@@ -443,7 +434,6 @@ int main() {
443434

444435
/// Test popen system call interception
445436
#[test]
446-
#[cfg(has_preload_library)]
447437
#[cfg(has_symbol_popen)]
448438
#[cfg(all(has_executable_compiler_c, has_executable_cat))]
449439
fn popen_interception() -> Result<()> {
@@ -503,7 +493,6 @@ int main(void) {{
503493

504494
/// Test system() call interception
505495
#[test]
506-
#[cfg(has_preload_library)]
507496
#[cfg(has_symbol_system)]
508497
#[cfg(all(has_executable_compiler_c, has_executable_echo))]
509498
fn system_interception() -> Result<()> {
@@ -545,7 +534,6 @@ int main() {{
545534

546535
/// Test errno handling with failed exec calls
547536
#[test]
548-
#[cfg(has_preload_library)]
549537
#[cfg(has_symbol_execve)]
550538
#[cfg(has_executable_compiler_c)]
551539
fn test_failed_exec_errno_handling() -> Result<()> {
@@ -594,7 +582,6 @@ int main() {
594582

595583
/// Test that programs with no exec calls don't generate spurious events
596584
#[test]
597-
#[cfg(has_preload_library)]
598585
#[cfg(has_executable_compiler_c)]
599586
fn test_no_exec_calls() -> Result<()> {
600587
let env = TestEnvironment::new("no_exec")?;

integration-tests/tests/cases/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@ pub mod compilation_output;
3131
pub mod config;
3232
pub mod exit_codes;
3333
pub mod intercept;
34+
#[cfg(has_preload_library)]
3435
pub mod intercept_posix;
3536
pub mod semantic;

integration-tests/tests/fixtures/infrastructure.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ impl TestEnvironment {
198198
}
199199

200200
/// Verify that a file is encoded with the specified encoding
201+
#[allow(dead_code)]
201202
pub fn verify_file_encoding(
202203
&self,
203204
file_path: &Path,

0 commit comments

Comments
 (0)