def test_check_cloudinit_fingerprints(self): ''' :avocado: tags=test_check_cloudinit_fingerprints,fast_check description: os-tests check fingerprints is saved in /var/log/messages. polarion_id: https://polarion.engineering.redhat.com/polarion/#/project/RedHatEnterpriseLinux7/workitems?query=title:"[AWS]CloudInit.test_check_cloudinit_fingerprints" bugzilla_id: 1957532 customer_case_id: BZ1957532 maintainer: xiliang case_priority: 0 case_component: cloud-init key_steps: 1. Launch an instance on AWS EC2. 2. check fingerprints is saved in /var/log/messages. pass_criteria: Fingerprints is saved in /var/log/messages. ''' self.session.connect(timeout=self.ssh_wait_timeout) case_name = "os_tests.tests.test_cloud_init.TestCloudInit.test_check_cloudinit_fingerprints" utils_lib.run_os_tests(self, case_name=case_name)
def test_ethtool_P(self): ''' :avocado: tags=test_ethtool_P,fast_check description: os-tests Test using ethtool to query permanent address. polarion_id: https://polarion.engineering.redhat.com/polarion/#/project/RedHatEnterpriseLinux7/workitems?query=title:"[AWS]NetworkTest.test_ethtool_P" bugzilla_id: 1704435 customer_case_id: BZ1704435 maintainer: xiliang case_priority: 0 case_component: network key_steps: 1. Launch an instance on AWS EC2. 2. Use ethtool to query permanent address via command "$ sudo ethtool -P ethX". 3. Check the output of this command. pass_criteria: Actual permanent address should be shown, but not 00:00:00:00:00:00. ''' self.session1.connect(timeout=self.ssh_wait_timeout) self.session = self.session1 aws.check_session(self) case_name = "os_tests.tests.test_network_test.TestNetworkTest.test_ethtool_P" utils_lib.run_os_tests(self, case_name=case_name)
def test_ltp_quickhit(self): ''' :avocado: tags=test_ltp_quickhit polarion_id: ''' case_name = "os_tests.tests.test_ltp.TestLTP.test_ltp_quickhit" utils_lib.run_os_tests(self, case_name=case_name)
def test_persistent_route(self): ''' :avocado: tags=test_persistent_route,fast_check description: os-tests check if can add persistent static route. polarion_id: https://polarion.engineering.redhat.com/polarion/#/project/RedHatEnterpriseLinux7/workitems?query=title:"[AWS]NetworkTest.test_persistent_route" bugzilla_id: 1971527 customer_case_id: BZ1971527 maintainer: xiliang case_priority: 0 case_component: network key_steps: 1. # nmcli connection modify 'System eth0' +ipv4.routes "10.8.8.0/24 10.7.9.5" 2. # nmcli connection down 'System eth0';nmcli connection up 'System eth0' 3. # ip r expected_result: New static route added. eg. 10.8.8.0/24 via 10.7.9.5 dev eth0 proto static metric 100 ''' self.session1.connect(timeout=self.ssh_wait_timeout) self.session = self.session1 aws.check_session(self) case_name = "os_tests.tests.test_network_test.TestNetworkTest.test_persistent_route" utils_lib.run_os_tests(self, case_name=case_name)
def test_ethtool_G(self): ''' :avocado: tags=test_ethtool_G,fast_check description: os-tests Use ethtool to change the rx/tx ring parameters of the specified network device. polarion_id: https://polarion.engineering.redhat.com/polarion/#/project/RedHatEnterpriseLinux7/workitems?query=title:"[AWS]NetworkTest.test_ethtool_G" bugzilla_id: 1722628 customer_case_id: n/a maintainer: xiliang case_priority: 0 case_component: network key_steps: 1. Launch an instance on AWS EC2. 2. Use ethtool to check maximums and current rx/tx ring parameters via command "$ sudo ethtool -g eth0". 2. Use ethtool to change the rx/tx ring parameters via command "$ sudo ethtool -G eth0 rx 512 tx 512". 3. Change the rx/tx ring parameters to maximums, minimal and invalid parameters e.g., -1. 4. Check the rx/tx ring is changed via command "$ sudo ethtool -g eth0". pass_criteria: The supported rx/tx ring parameters can be changed. Cannot set the ring parameters to -1. And no error, warning, call track or other exception in dmesg. ''' self.session1.connect(timeout=self.ssh_wait_timeout) self.session = self.session1 aws.check_session(self) case_name = "os_tests.tests.test_network_test.TestNetworkTest.test_ethtool_G" utils_lib.run_os_tests(self, case_name=case_name)
def test_ltp_add_key02(self): ''' :avocado: tags=test_ltp_add_key02 description: os-tests Test ltp cpuhotplug case in RHEL on AWS. Linked case RHEL7-98753. polarion_id: https://polarion.engineering.redhat.com/polarion/#/project/RedHatEnterpriseLinux7/workitems?query=title:"[AWS]LTPRun.test_ltp_add_key02" bugzilla_id: 1464851 customer_case_id: n/a maintainer: xiliang case_priority: 0 case_component: LTP key_steps: 1. Launch an instance on AWS. 2. Download and install ltp tool from https://github.com/linux-test-project/ltp or download the built rpm package from below url: x86_64: https://github.com/liangxiao1/rpmbuild_specs/releases/download/ltp-master-20200514/ltp-master-20200514.x86_64.rpm aarch64: https://github.com/liangxiao1/rpmbuild_specs/releases/download/ltp-master-20200514/ltp-master-20200514.aarch64.rpm 3. Run ltp syscalls test with command "$ sudo /opt/ltp/runltp -f syscalls". 4. Run test "$ sudo /opt/ltp/runltp -f syscalls -s add_key02". pass_criteria: System doesn't crash, panic or hang, and all tests pass. ''' case_name = "os_tests.tests.test_ltp.TestLTP.test_ltp_add_key02" utils_lib.run_os_tests(self, case_name=case_name)
def test_check_avclog(self): ''' :avocado: tags=test_check_avclog,fast_check,kernel_tier1 polarion_id: N/A ''' case_name = "os_tests.tests.test_general_check.TestGeneralCheck.test_check_avclog" utils_lib.run_os_tests(self, case_name=case_name)
def test_check_cloudinit_log_error(self): ''' :avocado: tags=test_check_cloudinit_log_error,fast_check description: os-tests check no error log in cloudinit logs. polarion_id: https://polarion.engineering.redhat.com/polarion/#/project/RedHatEnterpriseLinux7/workitems?query=title:"[AWS]CloudInit.test_check_cloudinit_log_error" bugzilla_id: 1821999 customer_case_id: n/a maintainer: xiliang case_priority: 0 case_component: cloud-init key_steps: 1. Launch an instance on AWS EC2. 2. Check the cloud-init logs: /var/log/cloud-init.log or /var/log/cloud-init-output.log. pass_criteria: There isn't error log in cloudinit logs. ''' self.session.connect(timeout=self.ssh_wait_timeout) case_name = "os_tests.tests.test_cloud_init.TestCloudInit.test_check_cloudinit_log_error" utils_lib.run_os_tests(self, case_name=case_name)
def test_check_cloudinit_service_status(self): ''' :avocado: tags=test_check_cloudinit_service_status,fast_check description: os-tests Check if the 4 cloud-init services status are "active". BZ1829713 is duplicated to BZ1748015 with customer cases linked. polarion_id: https://polarion.engineering.redhat.com/polarion/#/project/RedHatEnterpriseLinux7/workitems?query=title:"[AWS]CloudInit.test_check_cloudinit_service_status" bugzilla_id: 1829713 customer_case_id: BZ1748015 maintainer: xiliang case_priority: 0 case_component: cloud-init key_steps: 1. Launch an instance on AWS EC2. 2. Use these commands to check the cloud-init services status: "sudo systemctl status cloud-init-local", "sudo systemctl status cloud-init", "sudo systemctl status cloud-config", "sudo systemctl status cloud-final". pass_criteria: The 4 cloud-init services status should be "active". ''' self.session.connect(timeout=self.ssh_wait_timeout) case_name = "os_tests.tests.test_cloud_init.TestCloudInit.test_check_cloudinit_service_status" utils_lib.run_os_tests(self, case_name=case_name)
def test_check_output_isexist(self): ''' :avocado: tags=test_check_output_isexist,fast_check description: os-tests Check the cloud-init log /var/log/cloud-init-output.log exists. polarion_id: https://polarion.engineering.redhat.com/polarion/#/project/RedHatEnterpriseLinux7/workitems?query=title:"[AWS]CloudInit.test_check_output_isexist" bugzilla_id: 1626117 customer_case_id: BZ1626117 maintainer: xiliang case_priority: 0 case_component: cloud-init key_steps: 1. Launch an instance on AWS EC2. 2. Check cloud-init log in /var/log/cloud-init-output.log after system boot up. pass_criteria: The cloud-init log /var/log/cloud-init-output.log exists, and its stdout and stderr is redirected to this log. ''' self.session.connect(timeout=self.ssh_wait_timeout) case_name = "os_tests.tests.test_cloud_init.TestCloudInit.test_check_output_isexist" utils_lib.run_os_tests(self, case_name=case_name)
def test_check_metadata(self): ''' :avocado: tags=test_check_metadata,fast_check,kernel_tier1,fast_check description: os-tests Check the cloud-init metadata. https://cloudinit.readthedocs.io/en/latest/topics/datasources/ec2.html polarion_id: https://polarion.engineering.redhat.com/polarion/#/project/RedHatEnterpriseLinux7/workitems?query=title:"[AWS]CloudInit.test_check_metadata" bugzilla_id: n/a customer_case_id: n/a maintainer: xiliang case_priority: 0 case_component: cloud-init key_steps: 1. Launch an instance on AWS EC2. 2. Run command "curl http://169.254.169.254/latest/meta-data/instance-type" to check the instance can make calls to get instance metadata. pass_criteria: Correct instance type is returned. ''' self.session.connect(timeout=self.ssh_wait_timeout) case_name = "os_tests.tests.test_cloud_init.TestCloudInit.test_check_metadata" utils_lib.run_os_tests(self, case_name=case_name)
def test_fio_cpuclock(self): ''' :avocado: tags=test_fio_cpuclock,acceptance,fast_check,outposts description: os-tests use fio to test internal CPU clock in RHEL on AWS. polarion_id: https://polarion.engineering.redhat.com/polarion/#/project/RedHatEnterpriseLinux7/workitems?query=title:"[AWS]StorageTest.test_fio_cpuclock" bugzilla_id: 1943474 customer_case_id: n/a maintainer: xiliang case_priority: 0 case_component: Storage key_steps: 1. Launch an instance on AWS. 2. Connect the instance, Use "$ sudo fio --cpuclock-test" to test internal CPU clock. pass_criteria: cpuclock test pass. ''' self.session.connect(timeout=self.ssh_wait_timeout) case_name = "os_tests.tests.test_general_test.TestGeneralTest.test_fio_cpuclock" utils_lib.run_os_tests(self, case_name=case_name, timeout=1200)
def test_fsadm_resize(self): ''' :avocado: tags=test_fsadm_resize description: os-tests check fsadm resize doesn't crash when using it without size argument in RHEL on AWS. polarion_id: https://polarion.engineering.redhat.com/polarion/#/project/RedHatEnterpriseLinux7/workitems?query=title:"[AWS]StorageTest.test_fsadm_resize" bugzilla_id: 1905705 customer_case_id: BZ1905705 maintainer: xiliang case_priority: 1 case_component: Storage key_steps: 1. Launch an instance on AWS. 2. Connect the instance, Use "$ sudo df -h" to check the filesystem. 3. Use "$ sudo fsadm resize $device_path" to resize the filesystem without size argument. 4. Or use this command to instead step 2 and 3, "$ sudo fsadm resize $(findmnt -n -o source /)". pass_criteria: fsadm does nothing since the filesystem is already at maximum size, no crash like this "/sbin/fsadm: line 818: $3: unbound variable". ''' case_name = "os_tests.tests.test_general_test.TestGeneralTest.test_fsadm_resize" utils_lib.run_os_tests(self, case_name=case_name)
def test_iostat_x(self): ''' :avocado: tags=test_iostat_x,fast_check,acceptance,outposts,kernel description: os-tests check iostat output in RHEL on AWS. polarion_id: https://polarion.engineering.redhat.com/polarion/#/project/RedHatEnterpriseLinux7/workitems?query=title:"[AWS]StorageTest.test_iostat_x" bugzilla_id: 1661977,1669684 customer_case_id: BZ1661977, BZ1669684 maintainer: xiliang case_priority: 0 case_component: Storage key_steps: 1. Launch an instance on AWS. 2. Check the iostat via command "$ iostat -x". pass_criteria: No high utils reported when no obviously read/write operations. eg. # iostat -x Linux 4.18.0-236.el8.aarch64 (ip-xx-xxx-x-xxx.us-west-2.compute.internal) 09/28/2020 _aarch64_ (2 CPU) avg-cpu: %user %nice %system %iowait %steal %idle 7.77 0.00 1.48 0.69 0.00 90.06 Device r/s w/s rkB/s wkB/s rrqm/s wrqm/s %rrqm %wrqm r_await w_await aqu-sz rareq-sz wareq-sz svctm %util nvme0n1 46.06 2.82 1587.81 274.62 0.00 0.23 0.00 7.52 0.50 1.32 0.00 34.47 97.31 0.86 4.19 nvme1n1 0.15 0.00 10.43 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 70.40 0.00 1.50 0.02 ''' self.session.connect(timeout=self.ssh_wait_timeout) self.session = self.session case_name = "os_tests.tests.test_general_check.TestGeneralCheck.test_iostat_x" utils_lib.run_os_tests(self, case_name=case_name)
def test_ltp_ipsec_icmp(self): ''' :avocado: tags=test_ltp_ipsec_icmp description: os-tests Test ltp ipsec_icmp case in RHEL on AWS. Linked case RHEL7-98754. polarion_id: https://polarion.engineering.redhat.com/polarion/#/project/RedHatEnterpriseLinux7/workitems?query=title:"[AWS]LTPRun.test_ltp_ipsec_icmp" bugzilla_id: 1473593 customer_case_id: n/a maintainer: xiliang case_priority: 0 case_component: LTP key_steps: 1. Launch an instance on AWS. 2. Download and install ltp tool from https://github.com/linux-test-project/ltp or download the built rpm package from below url: x86_64: https://github.com/liangxiao1/rpmbuild_specs/releases/download/ltp-master-20200514/ltp-master-20200514.x86_64.rpm aarch64: https://github.com/liangxiao1/rpmbuild_specs/releases/download/ltp-master-20200514/ltp-master-20200514.aarch64.rpm 3. Run ltp ipsec_icmp test with command "$ sudo /opt/ltp/runltp -f net_stress.ipsec_icmp -s icmp4-uni-vti11". 4. Check if ccm module is loaded via command "lsmod | grep ccm". 5. Remove ccm module via command "modprobe -r ccm". pass_criteria: System doesn't crash, panic or hang, and tests pass. ''' case_name = "os_tests.tests.test_ltp.TestLTP.test_ltp_ipsec_icmp" utils_lib.run_os_tests(self, case_name=case_name)
def test_check_cloudinit_log_imdsv2(self): ''' :avocado: tags=test_check_cloudinit_log_imdsv2,fast_check description: os-tests Check cloud-init use imdsv2 in aws. polarion_id: https://polarion.engineering.redhat.com/polarion/#/project/RedHatEnterpriseLinux7/workitems?query=title:"[AWS]CloudInit.test_check_cloudinit_log_imdsv2" bugzilla_id: 1793652 customer_case_id: BZ1793652 maintainer: xiliang case_priority: 0 case_component: cloud-init key_steps: 1. Launch an instance on AWS EC2. 2. Check the cloud-init fetched Ec2 IMDSv2 API Token and got metadata using the token by commands: "sudo rpm -ql cloud-init" "sudo cat /var/log/cloud-init.log" pass_criteria: There are outputs link these: "DataSourceEc2.py[DEBUG]: Fetching Ec2 IMDSv2 API Token", "X-aws-ec2-metadata-token", and no error or unexpected message. ''' self.session.connect(timeout=self.ssh_wait_timeout) case_name = "os_tests.tests.test_cloud_init.TestCloudInit.test_check_cloudinit_log_imdsv2" utils_lib.run_os_tests(self, case_name=case_name)
def test_ltp_cpuhotplug(self): ''' :avocado: tags=test_ltp_cpuhotplug description: os-tests Test ltp cpuhotplug case in RHEL on AWS. Linked case RHEL7-98752. polarion_id: https://polarion.engineering.redhat.com/polarion/#/project/RedHatEnterpriseLinux7/workitems?query=title:"[AWS]LTPRun.test_ltp_cpuhotplug" bugzilla_id: 1464095 customer_case_id: n/a maintainer: xiliang case_priority: 0 case_component: LTP key_steps: 1. Launch an instance on AWS. 2. Download and install ltp tool from https://github.com/linux-test-project/ltp or download the built rpm package from below url: x86_64: https://github.com/liangxiao1/rpmbuild_specs/releases/download/ltp-master-20200514/ltp-master-20200514.x86_64.rpm aarch64: https://github.com/liangxiao1/rpmbuild_specs/releases/download/ltp-master-20200514/ltp-master-20200514.aarch64.rpm 3. Run ltp cpuhotplug test with command "$ sudo /opt/ltp/runltp -f cpuhotplug". 4. Also can manual online/offline cpu via command "echo 0 > /sys/devices/system/cpu/cpuN/online". pass_criteria: System doesn't crash, panic or hang, and tests pass. ''' # ltp will considering fail if more than 1 cpus cannot be offline # in bare metal instance # but in large metal instances, it is expected. So do not do it in # bare metal instances case_name = "os_tests.tests.test_ltp.TestLTP.test_ltp_cpuhotplug" utils_lib.run_os_tests(self, case_name=case_name, timeout=600)
def test_check_cloudinit_ds_identify_found(self): ''' :avocado: tags=test_check_cloudinit_ds_identify_found,fast_check description: os-tests Check heck ds-identify run and ret found. polarion_id: https://polarion.engineering.redhat.com/polarion/#/project/RedHatEnterpriseLinux7/workitems?query=title:"[AWS]CloudInit.test_check_cloudinit_ds_identify_found" bugzilla_id: 1746627 customer_case_id: n/a maintainer: xiliang case_priority: 0 case_component: cloud-init key_steps: 1. Launch an instance on AWS EC2. 2. Check the cloud-init log /run/cloud-init/cloud-init-generator.log. pass_criteria: There are keywords like these: "ds-identify _RET=found". ''' self.session.connect(timeout=self.ssh_wait_timeout) case_name = "os_tests.tests.test_cloud_init.TestCloudInit.test_check_cloudinit_ds_identify_found" utils_lib.run_os_tests(self, case_name=case_name)
def test_check_dmesg_warn(self): ''' :avocado: tags=test_check_dmesg_warn,fast_check polarion_id: RHEL7-103851 ''' case_name = "os_tests.tests.test_general_check.TestGeneralCheck.test_check_dmesg_warn" utils_lib.run_os_tests(self, case_name=case_name)
def test_ltp_ipsec_icmp(self): ''' :avocado: tags=test_ltp_ipsec_icmp polarion_id: RHEL7-98754 ''' case_name = "os_tests.tests.test_ltp.TestLTP.test_ltp_ipsec_icmp" utils_lib.run_os_tests(self, case_name=case_name)
def test_check_cloudinit_cfg_no_wheel(self): ''' :avocado: tags=test_check_cloudinit_cfg_no_wheel,fast_check description: os-tests Check there is no wheel in default_user's group in "/etc/cloud/cloud.cfg" polarion_id: https://polarion.engineering.redhat.com/polarion/#/project/RedHatEnterpriseLinux7/workitems?query=title:"[AWS]CloudInit.test_check_cloudinit_cfg_no_wheel" bugzilla_id: 1549638 customer_case_id: BZ1549638 maintainer: xiliang case_priority: 0 case_component: cloud-init key_steps: 1. Launch an instance on AWS EC2. 2. Check there is no wheel in default_user's group in "/etc/cloud/cloud.cfg" pass_criteria: No 'wheel' in "/etc/cloud/cloud.cfg" ''' self.session.connect(timeout=self.ssh_wait_timeout) case_name = "os_tests.tests.test_cloud_init.TestCloudInit.test_check_cloudinit_cfg_no_wheel" utils_lib.run_os_tests(self, case_name=case_name)
def test_check_memleaks(self): ''' :avocado: tags=test_check_memleaks polarion_id: RHEL-117648 ''' case_name = "os_tests.tests.test_general_check.TestGeneralCheck.test_check_memleaks" utils_lib.run_os_tests(self, case_name=case_name)
def test_change_clocksource(self): ''' :avocado: tags=test_change_clocksource,fast_check polarion_id: ''' case_name = "os_tests.tests.test_general_test.TestGeneralTest.test_change_clocksource" utils_lib.run_os_tests(self, case_name=case_name)
def test_check_virtwhat(self): ''' :avocado: tags=test_check_virtwhat,fast_check,kernel_tier1 polarion_id: RHEL7-103857 ''' case_name = "os_tests.tests.test_general_check.TestGeneralCheck.test_check_virtwhat" utils_lib.run_os_tests(self, case_name=case_name)
def test_collect_insights_result(self): ''' :avocado: tags=test_collect_insights_result polarion_id: bz#: 1889702 ''' case_name = "os_tests.tests.test_general_check.TestGeneralCheck.test_collect_insights_result" utils_lib.run_os_tests(self, case_name=case_name)
def test_check_lspci_nvme(self): ''' :avocado: tags=test_check_lspci_nvme polarion_id: BZ#: 1656862 ''' case_name = "os_tests.tests.test_general_check.TestGeneralCheck.test_check_lspci_nvme" utils_lib.run_os_tests(self, case_name=case_name)
def test_fork_pte(self): ''' :avocado: tags=test_fork_pte,fast_check,kernel_tier1 polarion_id: RHEL7-103857 RHBZ: 1908439 ''' case_name = "os_tests.tests.test_general_test.TestGeneralTest.test_fork_pte" utils_lib.run_os_tests(self, case_name=case_name)
def test_check_available_clocksource(self): ''' :avocado: tags=test_check_available_clocksource,fast_check,kernel_tier1 polarion_id: bz#: 1726487 ''' case_name = "os_tests.tests.test_general_check.TestGeneralCheck.test_check_available_clocksource" utils_lib.run_os_tests(self, case_name=case_name)
def test_check_service(self): ''' :avocado: tags=test_check_service,fast_check,kernel_tier1 polarion_id: N/A bz#: 1740443 ''' case_name = "os_tests.tests.test_general_check.TestGeneralCheck.test_check_service" utils_lib.run_os_tests(self, case_name=case_name)
def test_dracut_f_v(self): ''' :avocado: tags=test_dracut_f_v,fast_check polarion_id: N/A bz#: 1849082 ''' case_name = "os_tests.tests.test_general_test.TestGeneralTest.test_dracut_f_v" utils_lib.run_os_tests(self, case_name=case_name)