Skip to content

Commit cb419b4

Browse files
committed
ls: use the uucore functions
1 parent 4651a58 commit cb419b4

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tests/by-util/test_ls.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4153,8 +4153,7 @@ fn test_ls_dangling_symlinks() {
41534153
#[test]
41544154
#[cfg(feature = "feat_selinux")]
41554155
fn test_ls_context1() {
4156-
use selinux::{self, KernelSupport};
4157-
if selinux::kernel_support() == KernelSupport::Unsupported {
4156+
if !uucore::selinux::is_selinux_enabled() {
41584157
println!("test skipped: Kernel has no support for SElinux context");
41594158
return;
41604159
}
@@ -4169,8 +4168,7 @@ fn test_ls_context1() {
41694168
#[test]
41704169
#[cfg(feature = "feat_selinux")]
41714170
fn test_ls_context2() {
4172-
use selinux::{self, KernelSupport};
4173-
if selinux::kernel_support() == KernelSupport::Unsupported {
4171+
if !uucore::selinux::is_selinux_enabled() {
41744172
println!("test skipped: Kernel has no support for SElinux context");
41754173
return;
41764174
}
@@ -4206,8 +4204,7 @@ fn test_ls_context_long() {
42064204
#[test]
42074205
#[cfg(feature = "feat_selinux")]
42084206
fn test_ls_context_format() {
4209-
use selinux::{self, KernelSupport};
4210-
if selinux::kernel_support() == KernelSupport::Unsupported {
4207+
if !uucore::selinux::is_selinux_enabled() {
42114208
println!("test skipped: Kernel has no support for SElinux context");
42124209
return;
42134210
}

0 commit comments

Comments
 (0)