From cb419b4f77a604efda18c1d610cd7de2562d0ff9 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 16 Apr 2025 22:13:56 +0200 Subject: [PATCH] ls: use the uucore functions --- tests/by-util/test_ls.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/by-util/test_ls.rs b/tests/by-util/test_ls.rs index e63aeb483..bcfc3d942 100644 --- a/tests/by-util/test_ls.rs +++ b/tests/by-util/test_ls.rs @@ -4153,8 +4153,7 @@ fn test_ls_dangling_symlinks() { #[test] #[cfg(feature = "feat_selinux")] fn test_ls_context1() { - use selinux::{self, KernelSupport}; - if selinux::kernel_support() == KernelSupport::Unsupported { + if !uucore::selinux::is_selinux_enabled() { println!("test skipped: Kernel has no support for SElinux context"); return; } @@ -4169,8 +4168,7 @@ fn test_ls_context1() { #[test] #[cfg(feature = "feat_selinux")] fn test_ls_context2() { - use selinux::{self, KernelSupport}; - if selinux::kernel_support() == KernelSupport::Unsupported { + if !uucore::selinux::is_selinux_enabled() { println!("test skipped: Kernel has no support for SElinux context"); return; } @@ -4206,8 +4204,7 @@ fn test_ls_context_long() { #[test] #[cfg(feature = "feat_selinux")] fn test_ls_context_format() { - use selinux::{self, KernelSupport}; - if selinux::kernel_support() == KernelSupport::Unsupported { + if !uucore::selinux::is_selinux_enabled() { println!("test skipped: Kernel has no support for SElinux context"); return; }