[LU-7483] sanity test_103a: run_acl_subtest cp failed Created: 26/Nov/15  Updated: 03/Oct/16  Resolved: 15/Aug/16

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.8.0
Fix Version/s: Lustre 2.9.0

Type: Bug Priority: Minor
Reporter: Saurabh Tandan (Inactive) Assignee: Saurabh Tandan (Inactive)
Resolution: Fixed Votes: 0
Labels: SELinux
Environment:

Master
1 CLient, 1 MDT, 2 OST


Attachments: Text File sanity.test_103a.debug_log.eagle-52vm5.1448384151.log     Text File sanity.test_103a.dmesg.eagle-52vm5.1448384151.log     Text File sanity.test_103a.test_log.eagle-52vm5.log    
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

sanity test_103a failed for SElinux enabled client feature.

== sanity test 103a: acl test =========================================== 08:55:48 (1448384148)
Adding user daemon to group bin
Adding user daemon to group bin
performing cp ...
[3] $ umask 022 -- ok
[4] $ mkdir d -- ok
[5] $ cd d -- ok
[6] $ touch f -- ok
[7] $ setfacl -m u:bin:rw f -- ok
[8] $ ls -l f | awk -- '{ print $1 }' -- ok
[11] $ cp f g -- ok
[12] $ ls -l g | awk -- '{ print $1 }' -- failed
-rw-r--r--                            ? -rw-r--r--.                            
[15] $ rm g -- ok
[16] $ cp -p f g -- ok
[17] $ ls -l f | awk -- '{ print $1 }' -- ok
[20] $ mkdir h -- ok
[21] $ echo blubb > h/x -- ok
[22] $ cp -rp h i -- ok
[23] $ cat i/x -- ok
[26] $ rm -r i -- ok
[31] $ setfacl -R -m u:bin:rwx h -- ok
[32] $ getfacl --omit-header h/x -- ok
[40] $ cp -rp h i -- ok
[41] $ getfacl --omit-header i/x -- ok
[49] $ cd .. -- ok
[50] $ rm -r d -- ok
22 commands (21 passed, 1 failed)
 sanity test_103a: @@@@@@ FAIL: run_acl_subtest cp failed


 Comments   
Comment by Andreas Dilger [ 30/Nov/15 ]

It looks like this is failing because the "ls -l" has the '.' at the end to indicate extra security attributes when SELinux is enabled. It should be possible to make a filter for this so that the expect output matches, something like:

sed -e 's/\([-tsS][-rwx][-rwx][-rwx]\)\./$1/'

or similar, so that this is only filtering the permission flags and not any '.' In the output. I'm sure I didn't get all the flags correct. Please check the ls(1) man page.

Comment by Joseph Gmitter (Inactive) [ 30/Nov/15 ]

Hi Saurabh,
Can you please have a look at this one - looks to be a test script issue.
Thanks.
Joe

Comment by Gerrit Updater [ 09/Dec/15 ]

Saurabh Tandan (saurabh.tandan@intel.com) uploaded a new patch: http://review.whamcloud.com/17529
Subject: LU-7483 test: Modifying filtering in acl for SElinux feature
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: d71f2c2bdbd2f1cb1a614d50d75463d0b0bd16d9

Comment by Gerrit Updater [ 25/Jan/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/17529/
Subject: LU-7483 test: Modifying filtering in acl for SElinux feature
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 6c61075bcf2f310a83a8d4c9173c9b9f4370f5ac

Comment by Joseph Gmitter (Inactive) [ 25/Jan/16 ]

Landed for 2.8.0

Comment by Saurabh Tandan (Inactive) [ 05/Feb/16 ]

Similar issue encountered for tag 2.7.66 , master, build# 3316 , for SELinux enabled client.

Comment by Gerrit Updater [ 04/Aug/16 ]

Saurabh Tandan (saurabh.tandan@intel.com) uploaded a new patch: http://review.whamcloud.com/21722
Subject: LU-7483 tests: sanity test_103a misc test in acl corrected
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 283b0bf8f8c5ea02c08890dc070793847c41d6ee

Comment by Saurabh Tandan (Inactive) [ 04/Aug/16 ]

Reason this ticket was reopened because sanity test_103a was failing due to following error message:

performing misc...
[6] $ umask 027 -- ok
[7] $ touch f -- ok
[10] $ setfacl -m u::r f -- ok
[11] $ setfacl -m u::rw,u:bin:rw f -- ok
[12] $ ls -dl f | awk '{print $1}' -- ok
[15] $ getfacl --omit-header f -- ok
[23] $ rm f -- ok
[24] $ umask 022 -- ok
[25] $ touch f -- ok
[26] $ setfacl -m u:bin:rw f -- ok
[27] $ ls -dl f | awk '{print $1}' -- ok
[30] $ getfacl --omit-header f -- ok
[38] $ rm f -- ok
[39] $ umask 027 -- ok
[40] $ mkdir d -- ok
[41] $ setfacl -m u:bin:rwx d -- ok
[42] $ ls -dl d | awk '{print $1}' -- ok
[45] $ getfacl --omit-header d -- ok
[53] $ rmdir d -- ok
[54] $ umask 022 -- ok
[55] $ mkdir d -- ok
[56] $ setfacl -m u:bin:rwx d -- ok
[57] $ ls -dl d | awk '{print $1}' -- ok
[60] $ getfacl --omit-header d -- ok
[68] $ rmdir d -- ok
[73] $ umask 022 -- ok
[74] $ touch f -- ok
[75] $ setfacl -m u:bin:rw,u:daemon:r f -- ok
[76] $ ls -dl f | awk '{print $1}' -- ok
[79] $ getfacl --omit-header f -- ok
[90] $ setfacl -m g:users:rw,g:daemon:r f -- ok
[91] $ ls -dl f | awk '{print $1}' -- ok
[94] $ getfacl --omit-header f -- ok
[107] $ setfacl -x g:users f -- ok
[108] $ ls -dl f | awk '{print $1}' -- ok
[111] $ getfacl --omit-header f -- ok
[123] $ setfacl -x u:daemon f -- ok
[124] $ ls -dl f | awk '{print $1}' -- ok
[127] $ getfacl --omit-header f -- ok
[136] $ rm f -- ok
[140] $ umask 027 -- ok
[141] $ mkdir d -- ok
[142] $ setfacl -m u:bin:rwx,u:daemon:rw,d:u:bin:rwx,d:m:rx d -- ok
[143] $ ls -dl d | awk '{print $1}' -- ok
[146] $ getfacl --omit-header d -- ok
[162] $ umask 027 -- ok
[163] $ touch d/f -- ok
[164] $ ls -dl d/f | awk '{print $1}' -- ok
[167] $ getfacl --omit-header d/f -- ok
[175] $ rm d/f -- ok
[176] $ umask 022 -- ok
[177] $ touch d/f -- ok
[178] $ ls -dl d/f | awk '{print $1}' -- ok
[181] $ getfacl --omit-header d/f -- ok
[189] $ rm d/f -- ok
[193] $ umask 000 -- ok
[194] $ mkdir d/d -- ok
[195] $ ls -dl d/d | awk '{print $1}' -- ok
[198] $ getfacl --omit-header d/d -- ok
[211] $ rmdir d/d -- ok
[212] $ umask 022 -- ok
[213] $ mkdir d/d -- ok
[214] $ ls -dl d/d | awk '{print $1}' -- ok
[217] $ getfacl --omit-header d/d -- ok
[232] $ setfacl -nm u:daemon:rx,d:u:daemon:rx,g:users:rx,g:daemon:rwx d/d -- ok
[233] $ ls -dl d/d | awk '{print $1}' -- ok
[236] $ getfacl --omit-header d/d -- ok
[255] $ ln -s d d/l -- ok
[256] $ ls -dl d/l | awk 'sub(/\./, "", $1); {print $1}' -- failed
lrwxrwxrwx                            ? lrwxrwxrwx 1 root root 1 Aug 4 00:07 d/l -> d
~                                     ? lrwxrwxrwx                             
[259] $ ls -dl -L d/l | awk '{print $1}' -- ok
[264] $ cd d -- ok
[265] $ getfacl --omit-header l -- ok
[282] $ cd .. -- ok
[284] $ rm d/l -- ok
[288] $ setfacl -m g:daemon:rx,u:bin:rx d/d -- ok
[289] $ ls -dl d/d | awk '{print $1}' -- ok
[292] $ getfacl --omit-header d/d -- ok
[309] $ setfacl -m d:u:bin:rwx d/d -- ok
[310] $ ls -dl d/d | awk '{print $1}' -- ok
[313] $ getfacl --omit-header d/d -- ok
[330] $ rmdir d/d -- ok
[334] $ setfacl -k d -- ok
[335] $ ls -dl d | awk '{print $1}' -- ok
[338] $ getfacl --omit-header d -- ok
[349] $ setfacl -b d -- ok
[350] $ ls -dl d | awk '{sub(/\./, "", $1); print $1}' -- ok
[353] $ getfacl --omit-header d -- ok
[361] $ chmod 775 d -- ok
[362] $ ls -dl d | awk '{sub(/\./, "", $1); print $1}' -- ok
[365] $ getfacl --omit-header d -- ok
[371] $ rmdir d -- ok
[372] $ umask 002 -- ok
[373] $ mkdir d -- ok
[374] $ setfacl -m u:daemon:rwx,u:bin:rx,d:u:daemon:rwx,d:u:bin:rx d -- ok
[375] $ ls -dl d | awk '{print $1}' -- ok
[378] $ getfacl --omit-header d -- ok
[393] $ chmod 750 d -- ok
[394] $ ls -dl d | awk '{print $1}' -- ok
[397] $ getfacl --omit-header d -- ok
[412] $ chmod 750 d -- ok
[413] $ ls -dl d | awk '{print $1}' -- ok
[416] $ getfacl --omit-header d -- ok
[431] $ rmdir d -- ok
103 commands (102 passed, 1 failed)
 sanity test_103a: @@@@@@ FAIL: misc test failed 

Results for sanity test_103a run with SELinux enabled on client with required correction in test scripts can be found at https://testing.hpdd.intel.com/test_sessions/59f27e7a-5a78-11e6-b5b1-5254006e85c2

Patch can be found at http://review.whamcloud.com/21722

Comment by Saurabh Tandan (Inactive) [ 08/Aug/16 ]

New results for successfully run sanity test_103a with SELinux enabled on client with corrections suggested by John Hammond can be found at: https://testing.hpdd.intel.com/test_sessions/a816e968-5db8-11e6-906c-5254006e85c2

Comment by Gerrit Updater [ 15/Aug/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/21722/
Subject: LU-7483 tests: sanity test_103a misc test in acl corrected
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: c3e44bc813e93ea62b5618bf47a1ddd35a92b866

Comment by Peter Jones [ 15/Aug/16 ]

Landed for 2.9

Generated at Sat Feb 10 02:09:17 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.