88#[ cfg( unix) ]
99use rstest:: rstest;
1010use uucore:: display:: Quotable ;
11- #[ cfg( all(
12- feature = "feat_selinux" ,
13- any( target_os = "linux" , target_os = "android" )
14- ) ) ]
11+ #[ cfg( all( feature = "selinux" , any( target_os = "linux" , target_os = "android" ) ) ) ]
1512use uucore:: selinux:: get_getfattr_output;
1613use uutests:: util:: TestScenario ;
1714use uutests:: { at_and_ucmd, new_ucmd, path_concat, util_name} ;
@@ -1831,7 +1828,7 @@ fn test_cp_preserve_xattr() {
18311828
18321829#[ test]
18331830#[ cfg( all(
1834- not( feature = "feat_selinux " ) ,
1831+ not( feature = "selinux " ) ,
18351832 any( target_os = "linux" , target_os = "android" )
18361833) ) ]
18371834fn test_cp_preserve_all_context_fails_on_non_selinux ( ) {
@@ -6777,10 +6774,7 @@ fn test_cp_from_stream_permission() {
67776774}
67786775
67796776#[ test]
6780- #[ cfg( all(
6781- feature = "feat_selinux" ,
6782- any( target_os = "linux" , target_os = "android" )
6783- ) ) ]
6777+ #[ cfg( all( feature = "selinux" , any( target_os = "linux" , target_os = "android" ) ) ) ]
67846778fn test_cp_selinux ( ) {
67856779 let ts = TestScenario :: new ( util_name ! ( ) ) ;
67866780 let at = & ts. fixtures ;
@@ -6805,10 +6799,7 @@ fn test_cp_selinux() {
68056799}
68066800
68076801#[ test]
6808- #[ cfg( all(
6809- feature = "feat_selinux" ,
6810- any( target_os = "linux" , target_os = "android" )
6811- ) ) ]
6802+ #[ cfg( all( feature = "selinux" , any( target_os = "linux" , target_os = "android" ) ) ) ]
68126803fn test_cp_selinux_invalid ( ) {
68136804 let scene = TestScenario :: new ( util_name ! ( ) ) ;
68146805 let at = & scene. fixtures ;
@@ -6832,10 +6823,7 @@ fn test_cp_selinux_invalid() {
68326823}
68336824
68346825#[ test]
6835- #[ cfg( all(
6836- feature = "feat_selinux" ,
6837- any( target_os = "linux" , target_os = "android" )
6838- ) ) ]
6826+ #[ cfg( all( feature = "selinux" , any( target_os = "linux" , target_os = "android" ) ) ) ]
68396827fn test_cp_preserve_selinux ( ) {
68406828 let ts = TestScenario :: new ( util_name ! ( ) ) ;
68416829 let at = & ts. fixtures ;
@@ -6873,10 +6861,7 @@ fn test_cp_preserve_selinux() {
68736861}
68746862
68756863#[ test]
6876- #[ cfg( all(
6877- feature = "feat_selinux" ,
6878- any( target_os = "linux" , target_os = "android" )
6879- ) ) ]
6864+ #[ cfg( all( feature = "selinux" , any( target_os = "linux" , target_os = "android" ) ) ) ]
68806865fn test_cp_preserve_selinux_admin_context ( ) {
68816866 let ts = TestScenario :: new ( util_name ! ( ) ) ;
68826867 let at = & ts. fixtures ;
@@ -6935,10 +6920,7 @@ fn test_cp_preserve_selinux_admin_context() {
69356920}
69366921
69376922#[ test]
6938- #[ cfg( all(
6939- feature = "feat_selinux" ,
6940- any( target_os = "linux" , target_os = "android" )
6941- ) ) ]
6923+ #[ cfg( all( feature = "selinux" , any( target_os = "linux" , target_os = "android" ) ) ) ]
69426924fn test_cp_selinux_context_priority ( ) {
69436925 // This test verifies that -Z takes priority over --context
69446926
@@ -7018,10 +7000,7 @@ fn test_cp_selinux_context_priority() {
70187000}
70197001
70207002#[ test]
7021- #[ cfg( all(
7022- feature = "feat_selinux" ,
7023- any( target_os = "linux" , target_os = "android" )
7024- ) ) ]
7003+ #[ cfg( all( feature = "selinux" , any( target_os = "linux" , target_os = "android" ) ) ) ]
70257004fn test_cp_selinux_empty_context ( ) {
70267005 // This test verifies that --context without a value works like -Z
70277006
@@ -7067,10 +7046,7 @@ fn test_cp_selinux_empty_context() {
70677046}
70687047
70697048#[ test]
7070- #[ cfg( all(
7071- feature = "feat_selinux" ,
7072- any( target_os = "linux" , target_os = "android" )
7073- ) ) ]
7049+ #[ cfg( all( feature = "selinux" , any( target_os = "linux" , target_os = "android" ) ) ) ]
70747050fn test_cp_selinux_recursive ( ) {
70757051 // Test SELinux context preservation in recursive directory copies
70767052
@@ -7124,10 +7100,7 @@ fn test_cp_selinux_recursive() {
71247100}
71257101
71267102#[ test]
7127- #[ cfg( all(
7128- feature = "feat_selinux" ,
7129- any( target_os = "linux" , target_os = "android" )
7130- ) ) ]
7103+ #[ cfg( all( feature = "selinux" , any( target_os = "linux" , target_os = "android" ) ) ) ]
71317104fn test_cp_preserve_context_root ( ) {
71327105 use uutests:: util:: run_ucmd_as_root;
71337106 let scene = TestScenario :: new ( util_name ! ( ) ) ;
@@ -7830,10 +7803,7 @@ fn test_cp_gnu_preserve_mode() {
78307803}
78317804
78327805#[ test]
7833- #[ cfg( all(
7834- feature = "feat_selinux" ,
7835- any( target_os = "linux" , target_os = "android" )
7836- ) ) ]
7806+ #[ cfg( all( feature = "selinux" , any( target_os = "linux" , target_os = "android" ) ) ) ]
78377807fn test_cp_a_z_overrides_context ( ) {
78387808 // Verifies -aZ succeeds (-Z overrides implicit --preserve=context from -a)
78397809 use std:: path:: Path ;
@@ -7851,10 +7821,7 @@ fn test_cp_a_z_overrides_context() {
78517821}
78527822
78537823#[ test]
7854- #[ cfg( all(
7855- feature = "feat_selinux" ,
7856- any( target_os = "linux" , target_os = "android" )
7857- ) ) ]
7824+ #[ cfg( all( feature = "selinux" , any( target_os = "linux" , target_os = "android" ) ) ) ]
78587825fn test_cp_a_preserves_context ( ) {
78597826 use std:: path:: Path ;
78607827 use uucore:: selinux:: { get_selinux_security_context, set_selinux_security_context} ;
@@ -7877,10 +7844,7 @@ fn test_cp_a_preserves_context() {
78777844}
78787845
78797846#[ test]
7880- #[ cfg( all(
7881- feature = "feat_selinux" ,
7882- any( target_os = "linux" , target_os = "android" )
7883- ) ) ]
7847+ #[ cfg( all( feature = "selinux" , any( target_os = "linux" , target_os = "android" ) ) ) ]
78847848fn test_cp_preserve_context_with_z_fails ( ) {
78857849 let ( at, mut ucmd) = at_and_ucmd ! ( ) ;
78867850 at. touch ( "src" ) ;
0 commit comments