# rpm -qa | grep libselinux libselinux-3.8-2.el10_0.x86_64 libselinux-utils-3.8-2.el10_0.x86_64 python3-libselinux-3.8-2.el10_0.x86_64 # ./test.sh :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Setup :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 05:34:02 ] :: [ BEGIN ] :: Create tmp directory :: actually running 'tmp=$(mktemp -d)' :: [ 05:34:02 ] :: [ PASS ] :: Create tmp directory (Expected 0, got 0) :: [ 05:34:02 ] :: [ BEGIN ] :: Running 'pushd /tmp/tmp.KXYe1aXXmd' /tmp/tmp.KXYe1aXXmd ~/selinux/libselinux/selabel_lookup-and-local-changes :: [ 05:34:02 ] :: [ PASS ] :: Command 'pushd /tmp/tmp.KXYe1aXXmd' (Expected 0, got 0) :: [ 05:34:02 ] :: [ BEGIN ] :: Running 'set -o pipefail' :: [ 05:34:02 ] :: [ PASS ] :: Command 'set -o pipefail' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Assertions: 3 good, 0 bad :: RESULT: PASS (Setup) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 05:34:02 ] :: [ BEGIN ] :: Running 'cat test-selabel-lookup.cil' (filecon "/rc\.d/init\.d/test42XYZ-(selabel|lookup)" file (system_u object_r shell_exec_t ((s0) (s0)))) (filecon "/usr/bin/test42XYZ-selabel_lookup" file (system_u object_r shell_exec_t ((s0) (s0)))) (filecon "/var/lib/test42XYZ-selabel_lookup(/.*)?" file (system_u object_r shell_exec_t ((s0) (s0)))) :: [ 05:34:02 ] :: [ PASS ] :: Command 'cat test-selabel-lookup.cil' (Expected 0, got 0) :: [ 05:34:02 ] :: [ BEGIN ] :: Running 'semodule -i test-selabel-lookup.cil' :: [ 05:34:09 ] :: [ PASS ] :: Command 'semodule -i test-selabel-lookup.cil' (Expected 0, got 0) :: [ 05:34:09 ] :: [ BEGIN ] :: Running 'selabel_lookup -b file -k /rc.d/init.d/test42XYZ-selabel' Default context: system_u:object_r:shell_exec_t:s0 :: [ 05:34:09 ] :: [ PASS ] :: Command 'selabel_lookup -b file -k /rc.d/init.d/test42XYZ-selabel' (Expected 0, got 0) :: [ 05:34:09 ] :: [ PASS ] :: File '/var/tmp/rlRun_LOG.GPzvzbB1' should contain 'shell_exec_t' :: [ 05:34:09 ] :: [ BEGIN ] :: Running 'selabel_lookup -b file -k /usr/bin/test42XYZ-selabel_lookup' Default context: system_u:object_r:shell_exec_t:s0 :: [ 05:34:09 ] :: [ PASS ] :: Command 'selabel_lookup -b file -k /usr/bin/test42XYZ-selabel_lookup' (Expected 0, got 0) :: [ 05:34:09 ] :: [ PASS ] :: File '/var/tmp/rlRun_LOG.i3sj5EWb' should contain 'shell_exec_t' :: [ 05:34:09 ] :: [ BEGIN ] :: Running 'selabel_lookup -b file -k /var/lib/test42XYZ-selabel_lookup/bestmatch' Default context: system_u:object_r:shell_exec_t:s0 :: [ 05:34:09 ] :: [ PASS ] :: Command 'selabel_lookup -b file -k /var/lib/test42XYZ-selabel_lookup/bestmatch' (Expected 0, got 0) :: [ 05:34:09 ] :: [ PASS ] :: File '/var/tmp/rlRun_LOG.YK2A9qto' should contain 'shell_exec_t' :: [ 05:34:10 ] :: [ BEGIN ] :: Running 'semanage fcontext -a -t bin_t '/rc\.d/init\.d/test42XYZ-(selabel|lookup)'' :: [ 05:34:11 ] :: [ PASS ] :: Command 'semanage fcontext -a -t bin_t '/rc\.d/init\.d/test42XYZ-(selabel|lookup)'' (Expected 0, got 0) :: [ 05:34:11 ] :: [ BEGIN ] :: Running 'semanage fcontext -a -t bin_t '/usr/bin/test42XYZ-selabel_lookup'' :: [ 05:34:11 ] :: [ PASS ] :: Command 'semanage fcontext -a -t bin_t '/usr/bin/test42XYZ-selabel_lookup'' (Expected 0, got 0) :: [ 05:34:11 ] :: [ BEGIN ] :: Running 'semanage fcontext -a -t bin_t '/var/lib/test42XYZ-selabel_lookup(/.*)?'' :: [ 05:34:12 ] :: [ PASS ] :: Command 'semanage fcontext -a -t bin_t '/var/lib/test42XYZ-selabel_lookup(/.*)?'' (Expected 0, got 0) :: [ 05:34:12 ] :: [ BEGIN ] :: Running 'semanage fcontext -l -C' SELinux fcontext type Context /rc\.d/init\.d/test42XYZ-(selabel|lookup) all files system_u:object_r:bin_t:s0 /usr/bin/test42XYZ-selabel_lookup all files system_u:object_r:bin_t:s0 /var/lib/test42XYZ-selabel_lookup(/.*)? all files system_u:object_r:bin_t:s0 :: [ 05:34:13 ] :: [ PASS ] :: Command 'semanage fcontext -l -C' (Expected 0, got 0) :: [ 05:34:13 ] :: [ BEGIN ] :: Running 'selabel_lookup -b file -k /rc.d/init.d/test42XYZ-selabel' Default context: system_u:object_r:bin_t:s0 :: [ 05:34:13 ] :: [ PASS ] :: Command 'selabel_lookup -b file -k /rc.d/init.d/test42XYZ-selabel' (Expected 0, got 0) :: [ 05:34:13 ] :: [ PASS ] :: File '/var/tmp/rlRun_LOG.VrRfROqY' should contain 'bin_t' 0 :: [ 05:34:13 ] :: [ BEGIN ] :: Running 'matchpathcon /rc.d/init.d/test42XYZ-selabel' /rc.d/init.d/test42XYZ-selabel system_u:object_r:bin_t:s0 :: [ 05:34:13 ] :: [ PASS ] :: Command 'matchpathcon /rc.d/init.d/test42XYZ-selabel' (Expected 0, got 0) :: [ 05:34:13 ] :: [ BEGIN ] :: Running 'selabel_lookup -b file -k /usr/bin/test42XYZ-selabel_lookup' Default context: system_u:object_r:bin_t:s0 :: [ 05:34:13 ] :: [ PASS ] :: Command 'selabel_lookup -b file -k /usr/bin/test42XYZ-selabel_lookup' (Expected 0, got 0) :: [ 05:34:13 ] :: [ PASS ] :: File '/var/tmp/rlRun_LOG.ghVKO9L9' should contain 'bin_t' 0 :: [ 05:34:13 ] :: [ BEGIN ] :: Running 'matchpathcon /usr/bin/test42XYZ-selabel_lookup' /usr/bin/test42XYZ-selabel_lookup system_u:object_r:bin_t:s0 :: [ 05:34:13 ] :: [ PASS ] :: Command 'matchpathcon /usr/bin/test42XYZ-selabel_lookup' (Expected 0, got 0) :: [ 05:34:13 ] :: [ BEGIN ] :: Running 'selabel_lookup -b file -k /var/lib/test42XYZ-selabel_lookup/bestmatch' Default context: system_u:object_r:bin_t:s0 :: [ 05:34:13 ] :: [ PASS ] :: Command 'selabel_lookup -b file -k /var/lib/test42XYZ-selabel_lookup/bestmatch' (Expected 0, got 0) :: [ 05:34:13 ] :: [ PASS ] :: File '/var/tmp/rlRun_LOG.15QMAb0j' should contain 'bin_t' 0 :: [ 05:34:13 ] :: [ BEGIN ] :: Running 'matchpathcon /var/lib/test42XYZ-selabel_lookup/bestmatch' /var/lib/test42XYZ-selabel_lookup/bestmatch system_u:object_r:bin_t:s0 :: [ 05:34:13 ] :: [ PASS ] :: Command 'matchpathcon /var/lib/test42XYZ-selabel_lookup/bestmatch' (Expected 0, got 0) :: [ 05:34:13 ] :: [ BEGIN ] :: Running 'semanage fcontext -d -t bin_t '/rc\.d/init\.d/test42XYZ-(selabel|lookup)'' :: [ 05:34:14 ] :: [ PASS ] :: Command 'semanage fcontext -d -t bin_t '/rc\.d/init\.d/test42XYZ-(selabel|lookup)'' (Expected 0, got 0) :: [ 05:34:14 ] :: [ BEGIN ] :: Running 'semanage fcontext -d -t bin_t '/usr/bin/test42XYZ-selabel_lookup'' :: [ 05:34:15 ] :: [ PASS ] :: Command 'semanage fcontext -d -t bin_t '/usr/bin/test42XYZ-selabel_lookup'' (Expected 0, got 0) :: [ 05:34:15 ] :: [ BEGIN ] :: Running 'semanage fcontext -d -t bin_t '/var/lib/test42XYZ-selabel_lookup(/.*)?'' :: [ 05:34:16 ] :: [ PASS ] :: Command 'semanage fcontext -d -t bin_t '/var/lib/test42XYZ-selabel_lookup(/.*)?'' (Expected 0, got 0) :: [ 05:34:16 ] :: [ BEGIN ] :: Running 'semodule -r test-selabel-lookup' libsemanage.semanage_direct_remove_key: Removing last test-selabel-lookup module (no other test-selabel-lookup module exists at another priority). :: [ 05:34:22 ] :: [ PASS ] :: Command 'semodule -r test-selabel-lookup' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 20s :: Assertions: 25 good, 0 bad :: RESULT: PASS (Test) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Cleanup :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 05:34:22 ] :: [ BEGIN ] :: Running 'popd' ~/selinux/libselinux/selabel_lookup-and-local-changes :: [ 05:34:23 ] :: [ PASS ] :: Command 'popd' (Expected 0, got 0) :: [ 05:34:23 ] :: [ BEGIN ] :: Remove tmp directory :: actually running 'rm -r /tmp/tmp.KXYe1aXXmd' :: [ 05:34:23 ] :: [ PASS ] :: Remove tmp directory (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 1s :: Assertions: 2 good, 0 bad :: RESULT: PASS (Cleanup) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: unknown :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 05:34:23 ] :: [ LOG ] :: Phases fingerprint: GpTeNtEf :: [ 05:34:23 ] :: [ LOG ] :: Asserts fingerprint: cQ11Sc5A :: [ 05:34:23 ] :: [ LOG ] :: JOURNAL XML: /var/tmp/beakerlib-05OY5lc/journal.xml :: [ 05:34:23 ] :: [ LOG ] :: JOURNAL TXT: /var/tmp/beakerlib-05OY5lc/journal.txt :: [ 05:34:23 ] :: [ INFO ] :: Deleting rlRun_LOG file(s) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 21s :: Phases: 3 good, 0 bad :: OVERALL RESULT: PASS (unknown) #