#233 selinux-policy: Add test for bug1942267
Closed 2 years ago by plautrba. Opened 2 years ago by plautrba.
tests/ plautrba/selinux pr220  into  main

@@ -55,7 +55,7 @@ 

  	@echo "TestTime:        10m" >> $(METADATA)

  	@echo "RunFor:          selinux-policy" >> $(METADATA)

  	@echo "RunFor:          systemd" >> $(METADATA)

- 	@echo "Requires:        audit initscripts libselinux libselinux-utils policycoreutils selinux-policy selinux-policy-targeted setools-console openssh-clients systemd-udev" >> $(METADATA)

+ 	@echo "Requires:        audit initscripts libselinux libselinux-utils policycoreutils rdma-core selinux-policy selinux-policy-targeted setools-console openssh-clients systemd-udev" >> $(METADATA)

  	@echo "RhtsRequires:    library(selinux-policy/common)" >> $(METADATA)

  	@echo "Environment:     AVC_ERROR=+no_avc_check" >> $(METADATA)

  	@echo "Priority:        Normal" >> $(METADATA)
@@ -80,6 +80,7 @@ 

  	@echo "Bug:             1829700" >> $(METADATA) # Fedora 32

  	@echo "Bug:             1833502" >> $(METADATA) # Fedora 32

  	@echo "Bug:             1838933" >> $(METADATA) # Fedora 32

+ 	@echo "Bug:             1942267" >> $(METADATA) # RHEL-9, Fedora 34

  

  	rhts-lint $(METADATA)

  

@@ -117,6 +117,17 @@ 

          rlRun "rm -f /etc/modules-load.d/${KERNEL_MODULE}.conf"

      rlPhaseEnd

  

+     rlPhaseStartTest "bz#1942267"

+         tst_Time="$(date '+%T')"

+         # Install kernel-module matching the running kernel version

+         rlRun "dnf -y install kernel-modules-$(uname -r)"

+         rlRun "systemctl start rdma-load-modules@rdma.service" 

+         rlRun "systemctl status rdma-load-modules@rdma.service" 

+         rlRun "lsmod | grep rdma"

+         rlRun "ausearch -m AVC -m USER_AVC --start $tst_Time" 1

+         rlRun "systemctl stop rdma-load-modules@rdma.service" 

+     rlPhaseEnd

+ 

      rlPhaseStartCleanup

          sleep 2

          rlSECheckAVC

https://src.fedoraproject.org/tests/selinux/pull-request/220

Add an rdma test case to selinux-policy test suite which verifies
bug1942267. The fix checks for avc generated by rdma service.

Signed-off-by: Amith Kumar apeetham@redhat.com

Amith Kumar will try to fix pr220, closing.

Pull-Request has been closed by plautrba

2 years ago