Best Python code snippet using pytest-play_python
manual_daemon_1.py
Source:manual_daemon_1.py
...10 ## ì´ê¸°í ë¶ë¶ ##############################11 testResult = []12 13 # 8.3 ë²ì 14 command_exec(execMode, 'systemctl start bacula-dir.service')15 command_exec(execMode, 'systemctl stop bacula-dir.service')16 test1 = reg.exec_test('bacula-dir.service', 'journalctl -b -u bacula-dir.service', 'output', 'code=exited, status=15')17 testResult.append(test1)18 command_exec(execMode, 'systemctl start named-pkcs11.service')19 test1 = reg.exec_test('named-pkcs11.service', 'journalctl -b -u named-pkcs11.service', 'output', 'initializing DST: no PKCS#11 provider')20 testResult.append(test1)21 test1 = reg.exec_test('named-pkcs11.service', 'journalctl -b -u named-pkcs11.service', 'output', 'exiting (due to fatal error)')22 testResult.append(test1)23 command_exec(execMode, 'systemctl start blivet.service')24 test1 = reg.exec_test('blivet.service', 'journalctl -b -u blivet.service', 'output', 'dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Connection ":')25 testResult.append(test1)26 command_exec(execMode, 'systemctl start dhcrelay.service')27 test1 = reg.exec_test('dhcrelay.service', 'journalctl -b -u dhcrelay.service', 'output', 'No servers specified.')28 testResult.append(test1)29 command_exec(execMode, 'systemctl start dhcpd6.service')30 test1 = reg.exec_test('dhcpd6.service', 'journalctl -b -u dhcpd6.service', 'output', 'ldap_gssapi_principal is not set,GSSAPI Authentication for LDAP will not be used')31 testResult.append(test1)32 test1 = reg.exec_test('dhcpd6.service', 'journalctl -b -u dhcpd6.service', 'output', 'No subnet6 declaration for')33 testResult.append(test1)34 test1 = reg.exec_test('dhcpd6.service', 'journalctl -b -u dhcpd6.service', 'output', 'Not configured to listen on any interfaces!')35 testResult.append(test1)36 command_exec(execMode, 'systemctl start exchange-bmc-os-info.service')37 test1 = reg.exec_test('exchange-bmc-os-info.service', 'journalctl -b -u exchange-bmc-os-info.service', 'output', 'start failed with result \'dependency\'')38 testResult.append(test1)39 command_exec(execMode, 'systemctl start ipmidetectd.service')40 test1 = reg.exec_test('ipmidetectd.service', 'journalctl -b -u ipmidetectd.service', 'output', 'ipmidetectd: No nodes configured')41 testResult.append(test1)42 command_exec(execMode, 'systemctl start garbd.servicee')43 test1 = reg.exec_test('garbd.service', 'journalctl -b -u garbd.service', 'output', 'List of GALERA_NODES is not configured')44 testResult.append(test1)45 command_exec(execMode, 'mkdir -p /dev/vmbus/')46 command_exec(execMode, 'touch /dev/vmbus/hv_kvp')47 command_exec(execMode, 'systemctl start hypervkvpd.service')48 command_exec(execMode, 'sleep 1')49 test1 = reg.exec_test('hypervkvpd.service', 'journalctl -xe', 'output', '13 Permission denied')50 command_exec(execMode, 'rm -rf /dev/vmbus/')51 testResult.append(test1)52 command_exec(execMode, 'mkdir -p /dev/vmbus/')53 command_exec(execMode, 'touch /dev/vmbus/hv_vss')54 command_exec(execMode, 'systemctl start hypervvssd.service')55 command_exec(execMode, 'sleep 1')56 test1 = reg.exec_test('hypervvssd.service', 'journalctl -xe', 'output', '13 Permission denied')57 command_exec(execMode, 'rm -rf /dev/vmbus/')58 testResult.append(test1)59 command_exec(execMode, 'systemctl start ibacm.service')60 test1 = reg.exec_test('ibacm.service', 'journalctl -b -u ibacm.service', 'output', 'code=exited, status=255')61 testResult.append(test1)62 command_exec(execMode, 'systemctl start kadmin.service')63 test1 = reg.exec_test('kadmin.service', 'journalctl -b -u kadmin.service', 'output', 'Configuration file does not specify default realm while initializing, aborting')64 testResult.append(test1)65 command_exec(execMode, 'touch /var/kerberos/krb5kdc/kpropd.acl')66 command_exec(execMode, 'systemctl start kprop.service')67 command_exec(execMode, 'sleep 1')68 test1 = reg.exec_test('kprop.service', 'journalctl -xe', 'output', 'Configuration file does not specify default realm Unable to get default realm')69 command_exec(execMode, 'rm -rf /var/kerberos/krb5kdc/kpropd.acl')70 testResult.append(test1)71 command_exec(execMode, 'systemctl start krb5kdc.service')72 test1 = reg.exec_test('krb5kdc.service', 'journalctl -b -u krb5kdc.service', 'output', 'Configuration file does not specify default realm, attempting to retrieve default realm')73 testResult.append(test1)74 command_exec(execMode, 'systemctl start phc2sys.service')75 test1 = reg.exec_test('phc2sys.service', 'journalctl -b -u phc2sys.service', 'output', 'uds: sendto failed: No such file or directory')76 testResult.append(test1)77 command_exec(execMode, 'systemctl stop phc2sys.service')78 test1 = reg.exec_test('phc2sys.service', 'journalctl -b -u phc2sys.service', 'output', 'poll failed')79 testResult.append(test1)80 command_exec(execMode, 'systemctl start ptp4l.service')81 test1 = reg.exec_test('ptp4l.service', 'journalctl -b -u ptp4l.service', 'output', 'failed to create a clock')82 testResult.append(test1)83 test1 = reg.exec_test('ptp4l.service', 'journalctl -xe', 'output', 'ioctl SIOCETHTOOL failed: No such device')84 testResult.append(test1)85 test1 = reg.exec_test('ptp4l.service', 'journalctl -b -u ptp4l.service', 'output', 'PTP device not specified and automatic determination is not supported. Please specify PTP device.')86 testResult.append(test1)87 command_exec(execMode, 'echo "test" > /etc/fancontrol')88 command_exec(execMode, 'systemctl start fancontrol.service')89 command_exec(execMode, 'sleep 1')90 test1 = reg.exec_test('fancontrol.service', 'journalctl -xe', 'output', 'Some mandatory settings missing, please check your config file!')91 command_exec(execMode, 'rm -rf /etc/fancontrol')92 testResult.append(test1)93 command_exec(execMode, 'systemctl start lvmlocks.service')94 command_exec(execMode, 'systemctl stop lvmlocks.service')95 test1 = reg.exec_test('lvmlocks.service', 'journalctl -xe', 'output', ' /run/lvm/lvmlockd.socket: connect failed: No such file or directory')96 testResult.append(test1)97 test1 = reg.exec_test('lvmlocks.service', 'journalctl -xe', 'output', ' Cannot connect to lvmlockd.')98 testResult.append(test1)99 command_exec(execMode, 'systemctl start mdmonitor-oneshot.service')100 test1 = reg.exec_test('mdmonitor-oneshot.service', 'journalctl -xe', 'output', 'No mail address or alert command - not monitoring.')101 testResult.append(test1)102 command_exec(execMode, 'systemctl start mailman.service')103 test1 = reg.exec_test('mailman.service', 'journalctl -xe', 'output', 'Site list is missing: mailman')104 testResult.append(test1)105 command_exec(execMode, 'touch /etc/mdadm.conf')106 command_exec(execMode, 'systemctl start mdmonitor.service')107 command_exec(execMode, 'sleep 1')108 test1 = reg.exec_test('mdmonitor.service', 'journalctl -b -u mdmonitor.service', 'output', 'No mail address or alert command - not monitoring')109 command_exec(execMode, 'rm -rf /etc/mdadm.conf')110 testResult.append(test1)111 command_exec(execMode, 'touch /etc/munge/munge.key')112 command_exec(execMode, 'systemctl start munge.service')113 command_exec(execMode, 'sleep 1')114 command_exec(execMode, 'systemctl stop munge.service')115 test1 = reg.exec_test('munge.service', 'journalctl -xe', 'output', 'Keyfile is insecure: "/etc/munge/munge.key" should be owned by UID')116 command_exec(execMode, 'rm -rf /etc/munge/munge.key')117 testResult.append(test1)118 command_exec(execMode, 'systemctl start nfs-blkmap.service')119 command_exec(execMode, 'systemctl stop nfs-blkmap.service')120 test1 = reg.exec_test('nfs-blkmap.service', 'journalctl -b -u nfs-blkmap.service', 'output', 'open pipe file /var/lib/nfs/rpc_pipefs/nfs/blocklayout failed: No such file or directory')121 testResult.append(test1)122 command_exec(execMode, 'systemctl start nvmet.service')123 test1 = reg.exec_test('nvmet.service', 'journalctl -xe', 'output', '/sys/kernel/config/nvmet does not exist. Giving up.')124 testResult.append(test1)125 command_exec(execMode, 'systemctl start opafm.service')126 test1 = reg.exec_test('opafm.service', 'journalctl -b -u opafm.service', 'output', 'Invalid config detected! Coundn\'t find device for instance 0!.')127 testResult.append(test1)128 command_exec(execMode, 'systemctl start ipmi.service')129 test1 = reg.exec_test('ipmi.service', 'journalctl -b -u ipmi.service', 'output', 'Startup failed.')130 testResult.append(test1)131 command_exec(execMode, 'touch /run/ostree-booted')132 command_exec(execMode, 'mkdir /sysroot')133 command_exec(execMode, 'systemctl start ostree-finalize-staged.service')134 command_exec(execMode, 'sleep 1')135 command_exec(execMode, 'systemctl stop ostree-finalize-staged.service')136 test1 = reg.exec_test('ostree-finalize-staged.service', 'journalctl -b -u ostree-finalize-staged.service', 'output', 'error: opendir(ostree/repo): No such file or directory')137 command_exec(execMode, 'rm -rf /run/ostree-booted /sysroot')138 testResult.append(test1)139 command_exec(execMode, 'systemctl start pcscd.service')140 command_exec(execMode, 'systemctl stop pcscd.service')141 test1 = reg.exec_test('pcscd.service', 'journalctl -b -u pcscd.service', 'output', 'code=exited, status=1/FAILURE')142 testResult.append(test1)143 command_exec(execMode, 'systemctl start qemu-guest-agent.service')144 test1 = reg.exec_test('qemu-guest-agent.service', 'journalctl -b -u qemu-guest-agent.service', 'output', 'start failed with result \'dependency\'')145 testResult.append(test1)146 command_exec(execMode, 'systemctl start ras-mc-ctl.service')147 test1 = reg.exec_test('ras-mc-ctl.service', 'journalctl -b -u ras-mc-ctl.service', 'output', 'code=exited, status=1/FAILURE')148 testResult.append(test1)149 command_exec(execMode, 'systemctl start redfish-finder.service')150 test1 = reg.exec_test('redfish-finder.service', 'journalctl -b -u redfish-finder.service', 'output', 'AttributeError: \'NoneType\' object has no attribute \'getifcname\'')151 testResult.append(test1)152 command_exec(execMode, 'touch /run/ostree-booted')153 command_exec(execMode, 'systemctl start rpm-ostree-bootstatus.service')154 command_exec(execMode, 'sleep 1')155 test1 = reg.exec_test('rpm-ostree-bootstatus.service', 'journalctl -b -u rpm-ostree-bootstatus.service', 'output', 'error: Failed to activate service \'org.projectatomic.rpmostree1\': timed out (service_start_timeout=25000ms)')156 command_exec(execMode, 'rm -rf /run/ostree-booted')157 testResult.append(test1)158 command_exec(execMode, 'mkdir /ostree')159 command_exec(execMode, 'systemctl start rpm-ostreed.service')160 command_exec(execMode, 'sleep 1')161 test1 = reg.exec_test('rpm-ostreed.service', 'journalctl -b -u rpm-ostreed.service', 'output', 'error: Couldn\'t start daemon: Error setting up sysroot: opendir(ostree/repo): No such file or directory')162 command_exec(execMode, 'rm -rf /ostree')163 testResult.append(test1)164 command_exec(execMode, 'systemctl start rrdcached.socket')165 test1 = reg.exec_test('rrdcached.socket', 'journalctl -xe', 'output', 'Failed to create listening socket: Permission denied')166 testResult.append(test1)167 command_exec(execMode, 'systemctl start rrdcached.socket')168 test1 = reg.exec_test('rrdcached.socket', 'journalctl -b -u rrdcached.socket', 'output', 'Failed to listen on sockets: Permission denied')169 testResult.append(test1)170 command_exec(execMode, 'systemctl start rrdcached.socket')171 test1 = reg.exec_test('rrdcached.socket', 'journalctl -b -u rrdcached.socket', 'output', 'Failed with result \'resources\'.')172 testResult.append(test1)173 command_exec(execMode, 'systemctl start speech-dispatcherd.service')174 test1 = reg.exec_test('speech-dispatcherd.service', 'journalctl -b -u speech-dispatcherd.service', 'output', 'Can\'t create pid file in /root/.cache/speech-dispatcher/pid/speech-dispatcher.pid, wrong permissions?')175 testResult.append(test1)176 command_exec(execMode, 'mkdir /var/lib/machines.raw')177 command_exec(execMode, 'systemctl start var-lib-machines.mount')178 command_exec(execMode, 'sleep 1')179 test1 = reg.exec_test('var-lib-machines.mount', 'journalctl -b -u var-lib-machines.mount', 'output', 'mount: /var/lib/machines: failed to setup loop device for /var/lib/machines.raw.')180 command_exec(execMode, 'rm -rf /var/lib/machines.raw')181 testResult.append(test1)182 command_exec(execMode, 'systemctl start varnishncsa.service')183 command_exec(execMode, 'sleep 7')184 test1 = reg.exec_test('varnishncsa.service', 'journalctl -xe', 'output', 'Could not get hold of varnishd')185 testResult.append(test1)186 command_exec(execMode, 'systemctl start ypbind.service')187 command_exec(execMode, 'sleep 3')188 test1 = reg.exec_test('ypbind.service', 'journalctl -xe', 'output', 'domain not found')189 testResult.append(test1)190 command_exec(execMode, 'systemctl start yppasswdd.service')191 test1 = reg.exec_test('yppasswdd.service', 'journalctl -xe', 'output', 'domain not found')192 testResult.append(test1)193 # 8.2 ë²ì 194 # command_exec(execMode, 'systemctl start bacula-dir.service')195 # command_exec(execMode, 'systemctl stop bacula-dir.service')196 # test1 = reg.exec_test('bacula-dir.service', 'journalctl -b -u bacula-dir.service', 'output', 'code=exited, status=15')197 # testResult.append(test1)198 #199 # command_exec(execMode, 'systemctl start named-pkcs11.service')200 # test1 = reg.exec_test('named-pkcs11.service', 'journalctl -b -u named-pkcs11.service', 'output', 'initializing DST: no PKCS#11 provider')201 # testResult.append(test1)202 # test1 = reg.exec_test('named-pkcs11.service', 'journalctl -b -u named-pkcs11.service', 'output', 'exiting (due to fatal error)')203 # testResult.append(test1)204 #205 # command_exec(execMode, 'systemctl start blivet.service')206 # test1 = reg.exec_test('blivet.service', 'journalctl -b -u blivet.service', 'output', 'dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Connection ":')207 # testResult.append(test1)208 #209 # command_exec(execMode, 'systemctl start dhcrelay.service')210 # test1 = reg.exec_test('dhcrelay.service', 'journalctl -b -u dhcrelay.service', 'output', 'No servers specified.')211 # testResult.append(test1)212 #213 # command_exec(execMode, 'systemctl start dhcpd6.service')214 # test1 = reg.exec_test('dhcpd6.service', 'journalctl -b -u dhcpd6.service', 'output', 'ldap_gssapi_principal is not set,GSSAPI Authentication for LDAP will not be used')215 # testResult.append(test1)216 # test1 = reg.exec_test('dhcpd6.service', 'journalctl -b -u dhcpd6.service', 'output', 'No subnet6 declaration for')217 # testResult.append(test1)218 # test1 = reg.exec_test('dhcpd6.service', 'journalctl -b -u dhcpd6.service', 'output', 'Not configured to listen on any interfaces!')219 # testResult.append(test1)220 #221 # command_exec(execMode, 'systemctl start exchange-bmc-os-info.service')222 # test1 = reg.exec_test('exchange-bmc-os-info.service', 'journalctl -b -u exchange-bmc-os-info.service', 'output', 'start failed with result \'dependency\'')223 # testResult.append(test1)224 #225 # command_exec(execMode, 'systemctl start ipmidetectd.service')226 # test1 = reg.exec_test('ipmidetectd.service', 'journalctl -b -u ipmidetectd.service', 'output', 'ipmidetectd: No nodes configured')227 # testResult.append(test1)228 #229 # command_exec(execMode, 'systemctl start garbd.servicee')230 # test1 = reg.exec_test('garbd.service', 'journalctl -b -u garbd.service', 'output', 'List of GALERA_NODES is not configured')231 # testResult.append(test1)232 #233 # command_exec(execMode, 'mkdir -p /dev/vmbus/')234 # command_exec(execMode, 'touch /dev/vmbus/hv_kvp')235 # command_exec(execMode, 'systemctl start hypervkvpd.service')236 # command_exec(execMode, 'sleep 1')237 # test1 = reg.exec_test('hypervkvpd.service', 'journalctl -xe', 'output', '13 Permission denied')238 # command_exec(execMode, 'rm -rf /dev/vmbus/')239 # testResult.append(test1)240 #241 # command_exec(execMode, 'mkdir -p /dev/vmbus/')242 # command_exec(execMode, 'touch /dev/vmbus/hv_vss')243 # command_exec(execMode, 'systemctl start hypervvssd.service')244 # command_exec(execMode, 'sleep 1')245 # test1 = reg.exec_test('hypervvssd.service', 'journalctl -xe', 'output', '13 Permission denied')246 # command_exec(execMode, 'rm -rf /dev/vmbus/')247 # testResult.append(test1)248 #249 # command_exec(execMode, 'systemctl start ibacm.service')250 # test1 = reg.exec_test('ibacm.service', 'journalctl -b -u ibacm.service', 'output', 'code=exited, status=255')251 # testResult.append(test1)252 #253 # command_exec(execMode, 'systemctl start kadmin.service')254 # test1 = reg.exec_test('kadmin.service', 'journalctl -b -u kadmin.service', 'output', 'Configuration file does not specify default realm while initializing, aborting')255 # testResult.append(test1)256 #257 # command_exec(execMode, 'touch /var/kerberos/krb5kdc/kpropd.acl')258 # command_exec(execMode, 'systemctl start kprop.service')259 # command_exec(execMode, 'sleep 1')260 # test1 = reg.exec_test('kprop.service', 'journalctl -xe', 'output', 'Configuration file does not specify default realm Unable to get default realm')261 # command_exec(execMode, 'rm -rf /var/kerberos/krb5kdc/kpropd.acl')262 # testResult.append(test1)263 #264 # command_exec(execMode, 'systemctl start krb5kdc.service')265 # test1 = reg.exec_test('krb5kdc.service', 'journalctl -b -u krb5kdc.service', 'output', 'Configuration file does not specify default realm, attempting to retrieve default realm')266 # testResult.append(test1)267 #268 # command_exec(execMode, 'systemctl start phc2sys.service')269 # test1 = reg.exec_test('phc2sys.service', 'journalctl -b -u phc2sys.service', 'output', 'uds: sendto failed: No such file or directory')270 # testResult.append(test1)271 # command_exec(execMode, 'systemctl stop phc2sys.service')272 # test1 = reg.exec_test('phc2sys.service', 'journalctl -b -u phc2sys.service', 'output', 'poll failed')273 # testResult.append(test1)274 #275 # command_exec(execMode, 'systemctl start ptp4l.service')276 # test1 = reg.exec_test('ptp4l.service', 'journalctl -b -u ptp4l.service', 'output', 'failed to create a clock')277 # testResult.append(test1)278 # test1 = reg.exec_test('ptp4l.service', 'journalctl -xe', 'output', 'ioctl SIOCETHTOOL failed: No such device')279 # testResult.append(test1)280 # test1 = reg.exec_test('ptp4l.service', 'journalctl -b -u ptp4l.service', 'output', 'PTP device not specified and automatic determination is not supported. Please specify PTP device.')281 # testResult.append(test1)282 #283 # command_exec(execMode, 'echo "test" > /etc/fancontrol')284 # command_exec(execMode, 'systemctl start fancontrol.service')285 # command_exec(execMode, 'sleep 1')286 # test1 = reg.exec_test('fancontrol.service', 'journalctl -xe', 'output', 'Some mandatory settings missing, please check your config file!')287 # command_exec(execMode, 'rm -rf /etc/fancontrol')288 # testResult.append(test1)289 #290 # command_exec(execMode, 'systemctl start lvmlocks.service')291 # command_exec(execMode, 'systemctl stop lvmlocks.service')292 # test1 = reg.exec_test('lvmlocks.service', 'journalctl -xe', 'output', ' /run/lvm/lvmlockd.socket: connect failed: No such file or directory')293 # testResult.append(test1)294 # test1 = reg.exec_test('lvmlocks.service', 'journalctl -xe', 'output', ' Cannot connect to lvmlockd.')295 # testResult.append(test1)296 #297 # command_exec(execMode, 'systemctl start mdmonitor-oneshot.service')298 # test1 = reg.exec_test('mdmonitor-oneshot.service', 'journalctl -xe', 'output', 'No mail address or alert command - not monitoring.')299 # testResult.append(test1)300 #301 # command_exec(execMode, 'systemctl start mailman.service')302 # test1 = reg.exec_test('mailman.service', 'journalctl -xe', 'output', 'Site list is missing: mailman')303 # testResult.append(test1)304 #305 # command_exec(execMode, 'touch /etc/mdadm.conf')306 # command_exec(execMode, 'systemctl start mdmonitor.service')307 # command_exec(execMode, 'sleep 1')308 # test1 = reg.exec_test('mdmonitor.service', 'journalctl -b -u mdmonitor.service', 'output', 'No mail address or alert command - not monitoring')309 # command_exec(execMode, 'rm -rf /etc/mdadm.conf')310 # testResult.append(test1)311 #312 # command_exec(execMode, 'touch /etc/munge/munge.key')313 # command_exec(execMode, 'systemctl start munge.service')314 # command_exec(execMode, 'sleep 1')315 # command_exec(execMode, 'systemctl stop munge.service')316 # test1 = reg.exec_test('munge.service', 'journalctl -xe', 'output', 'Keyfile is insecure: "/etc/munge/munge.key" should be owned by UID')317 # command_exec(execMode, 'rm -rf /etc/munge/munge.key')318 # testResult.append(test1)319 #320 # command_exec(execMode, 'systemctl start nfs-blkmap.service')321 # command_exec(execMode, 'systemctl stop nfs-blkmap.service')322 # test1 = reg.exec_test('nfs-blkmap.service', 'journalctl -b -u nfs-blkmap.service', 'output', 'open pipe file /var/lib/nfs/rpc_pipefs/nfs/blocklayout failed: No such file or directory')323 # testResult.append(test1)324 #325 # command_exec(execMode, 'systemctl start nvmet.service')326 # test1 = reg.exec_test('nvmet.service', 'journalctl -xe', 'output', '/sys/kernel/config/nvmet does not exist. Giving up.')327 # testResult.append(test1)328 #329 # command_exec(execMode, 'systemctl start opafm.service')330 # test1 = reg.exec_test('opafm.service', 'journalctl -b -u opafm.service', 'output', 'Invalid config detected! Coundn\'t find device for instance 0!.')331 # testResult.append(test1)332 #333 # command_exec(execMode, 'systemctl start ipmi.service')334 # test1 = reg.exec_test('ipmi.service', 'journalctl -b -u ipmi.service', 'output', 'Startup failed.')335 # testResult.append(test1)336 #337 # command_exec(execMode, 'touch /run/ostree-booted')338 # command_exec(execMode, 'mkdir /sysroot')339 # command_exec(execMode, 'systemctl start ostree-finalize-staged.service')340 # command_exec(execMode, 'sleep 1')341 # command_exec(execMode, 'systemctl stop ostree-finalize-staged.service')342 # test1 = reg.exec_test('ostree-finalize-staged.service', 'journalctl -b -u ostree-finalize-staged.service', 'output', 'error: opendir(ostree/repo): No such file or directory')343 # command_exec(execMode, 'rm -rf /run/ostree-booted /sysroot')344 # testResult.append(test1)345 #346 # command_exec(execMode, 'systemctl start pcscd.service')347 # command_exec(execMode, 'systemctl stop pcscd.service')348 # test1 = reg.exec_test('pcscd.service', 'journalctl -b -u pcscd.service', 'output', 'code=exited, status=1/FAILURE')349 # testResult.append(test1)350 #351 # command_exec(execMode, 'systemctl start qemu-guest-agent.service')352 # test1 = reg.exec_test('qemu-guest-agent.service', 'journalctl -b -u qemu-guest-agent.service', 'output', 'start failed with result \'dependency\'')353 # testResult.append(test1)354 #355 # command_exec(execMode, 'systemctl start ras-mc-ctl.service')356 # test1 = reg.exec_test('ras-mc-ctl.service', 'journalctl -b -u ras-mc-ctl.service', 'output', 'code=exited, status=1/FAILURE')357 # testResult.append(test1)358 #359 # command_exec(execMode, 'systemctl start redfish-finder.service')360 # test1 = reg.exec_test('redfish-finder.service', 'journalctl -b -u redfish-finder.service', 'output', 'AttributeError: \'NoneType\' object has no attribute \'getifcname\'')361 # testResult.append(test1)362 #363 # command_exec(execMode, 'touch /run/ostree-booted')364 # command_exec(execMode, 'systemctl start rpm-ostree-bootstatus.service')365 # command_exec(execMode, 'sleep 1')366 # test1 = reg.exec_test('rpm-ostree-bootstatus.service', 'journalctl -b -u rpm-ostree-bootstatus.service', 'output', 'error: Failed to activate service \'org.projectatomic.rpmostree1\': timed out (service_start_timeout=25000ms)')367 # command_exec(execMode, 'rm -rf /run/ostree-booted')368 # testResult.append(test1)369 #370 # command_exec(execMode, 'mkdir /ostree')371 # command_exec(execMode, 'systemctl start rpm-ostreed.service')372 # command_exec(execMode, 'sleep 1')373 # test1 = reg.exec_test('rpm-ostreed.service', 'journalctl -b -u rpm-ostreed.service', 'output', 'error: Couldn\'t start daemon: Error setting up sysroot: opendir(ostree/repo): No such file or directory')374 # command_exec(execMode, 'rm -rf /ostree')375 # testResult.append(test1)376 #377 # command_exec(execMode, 'systemctl start rrdcached.socket')378 # test1 = reg.exec_test('rrdcached.socket', 'journalctl -xe', 'output', 'Failed to create listening socket: Permission denied')379 # testResult.append(test1)380 #381 # command_exec(execMode, 'systemctl start rrdcached.socket')382 # test1 = reg.exec_test('rrdcached.socket', 'journalctl -b -u rrdcached.socket', 'output', 'Failed to listen on sockets: Permission denied')383 # testResult.append(test1)384 #385 # command_exec(execMode, 'systemctl start rrdcached.socket')386 # test1 = reg.exec_test('rrdcached.socket', 'journalctl -b -u rrdcached.socket', 'output', 'Failed with result \'resources\'.')387 # testResult.append(test1)388 #389 # command_exec(execMode, 'systemctl start speech-dispatcherd.service')390 # test1 = reg.exec_test('speech-dispatcherd.service', 'journalctl -b -u speech-dispatcherd.service', 'output', 'Can\'t create pid file in /root/.cache/speech-dispatcher/pid/speech-dispatcher.pid, wrong permissions?')391 # testResult.append(test1)392 #393 # command_exec(execMode, 'mkdir /var/lib/machines.raw')394 # command_exec(execMode, 'systemctl start var-lib-machines.mount')395 # command_exec(execMode, 'sleep 1')396 # test1 = reg.exec_test('var-lib-machines.mount', 'journalctl -b -u var-lib-machines.mount', 'output', 'mount: /var/lib/machines: failed to setup loop device for /var/lib/machines.raw.')397 # command_exec(execMode, 'rm -rf /var/lib/machines.raw')398 # testResult.append(test1)399 #400 # command_exec(execMode, 'systemctl start varnishncsa.service')401 # command_exec(execMode, 'sleep 7')402 # test1 = reg.exec_test('varnishncsa.service', 'journalctl -xe', 'output', 'Could not get hold of varnishd')403 # testResult.append(test1)404 #405 # command_exec(execMode, 'systemctl start ypbind.service')406 # command_exec(execMode, 'sleep 3')407 # test1 = reg.exec_test('ypbind.service', 'journalctl -xe', 'output', 'domain not found')408 # testResult.append(test1)409 #410 # command_exec(execMode, 'systemctl start yppasswdd.service')411 # test1 = reg.exec_test('yppasswdd.service', 'journalctl -xe', 'output', 'domain not found')412 # testResult.append(test1)413 ##############################################################################################################################################414 # 7.8 ë²ì 415 # command_exec(execMode, 'systemctl start bacula-fd.service')416 # command_exec(execMode, 'systemctl stop bacula-fd.service')417 # test1 = reg.exec_test('bacula-fd.service', 'journalctl -xe', 'output', 'code=exited, status=15/n/a')418 # testResult.append(test1)419 #420 # command_exec(execMode, 'systemctl start named-pkcs11.service')421 # test1 = reg.exec_test('named-pkcs11.service', 'journalctl -xe', 'output', 'initializing DST: PKCS#11 initialization failed') # initializing DST: PKCS#11 initialization failed, RHELê³¼ ë¹êµ íì422 # testResult.append(test1)423 # test1 = reg.exec_test('named-pkcs11.service', 'journalctl -xe', 'output', 'exiting (due to fatal error)')424 # testResult.append(test1)425 #426 # command_exec(execMode, 'systemctl start blivet.service')427 # test1 = reg.exec_test('blivet.service', 'journalctl -b -u blivet.service', 'output', 'dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Connection ":')428 # testResult.append(test1)429 #430 # command_exec(execMode, 'systemctl start rbdmap.service')431 # test1 = reg.exec_test('rbdmap.service', 'journalctl -b -u rbdmap.service', 'output', 'Failed to start Map RBD devices.')432 # testResult.append(test1)433 #434 # command_exec(execMode, 'systemctl start conman.service')435 # test1 = reg.exec_test('conman.service', 'journalctl -b -u conman.service', 'output', 'code=exited status=1')436 # testResult.append(test1)437 # test1 = reg.exec_test('conman.service', 'journalctl -b -u conman.service', 'output', 'Configuration "/etc/conman.conf" has no consoles defined')438 # testResult.append(test1)439 #440 # command_exec(execMode, 'systemctl start dhcpd6.service')441 # test1 = reg.exec_test('dhcpd6.service', 'journalctl -b -u dhcpd6.service', 'output', 'Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file') # Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file, RHELê³¼ ë¹êµ íì442 # testResult.append(test1)443 # test1 = reg.exec_test('dhcpd6.service', 'journalctl -b -u dhcpd6.service', 'output', 'No subnet6 declaration for')444 # testResult.append(test1)445 # test1 = reg.exec_test('dhcpd6.service', 'journalctl -xe', 'output', 'Not configured to listen on any interfaces!')446 # testResult.append(test1)447 #448 # command_exec(execMode, 'systemctl start dhcrelay.service')449 # test1 = reg.exec_test('dhcrelay.service', 'journalctl -b -u dhcrelay.service', 'output', 'No servers specified.')450 # testResult.append(test1)451 #452 # command_exec(execMode, 'systemctl start edac.service')453 # test1 = reg.exec_test('edac.service', 'journalctl -b -u edac.service', 'output', 'No dimm labels for')454 # testResult.append(test1)455 # command_exec(execMode, 'systemctl stop edac.service')456 # test1 = reg.exec_test('edac.service', 'journalctl -b -u edac.service', 'output', 'code=exited status=1')457 # testResult.append(test1)458 # test1 = reg.exec_test('edac.service', 'journalctl -b -u edac.service', 'output', 'Unknown option: unload')459 # testResult.append(test1)460 # command_exec(execMode, 'systemctl start bmc-watchdog.service')461 # command_exec(execMode, 'systemctl stop bmc-watchdog.service')462 # test1 = reg.exec_test('bmc-watchdog.service', 'journalctl -xe', 'output', 'Get Watchdog Timer: driver timeout')463 # testResult.append(test1)464 #465 # command_exec(execMode, 'systemctl start ipmidetectd.service')466 # test1 = reg.exec_test('ipmidetectd.service', 'journalctl -b -u ipmidetectd.service', 'output', 'ipmidetectd: No nodes configured')467 # testResult.append(test1)468 #469 # command_exec(execMode, 'systemctl start hwloc-dump-hwdata.service')470 # test1 = reg.exec_test('hwloc-dump-hwdata.service', 'journalctl -xe', 'output', "Couldn't find any KNL information.")471 # testResult.append(test1)472 #473 # command_exec(execMode, 'mkdir -p /dev/vmbus/')474 # command_exec(execMode, 'touch /dev/vmbus/hv_kvp')475 # command_exec(execMode, 'systemctl start hypervkvpd.service')476 # command_exec(execMode, 'sleep 1')477 # test1 = reg.exec_test('hypervkvpd.service', 'journalctl -xe', 'output', '13 Permission denied')478 # command_exec(execMode, 'rm -rf /dev/vmbus/')479 # testResult.append(test1)480 #481 # command_exec(execMode, 'mkdir -p /dev/vmbus/')482 # command_exec(execMode, 'touch /dev/vmbus/hv_vss')483 # command_exec(execMode, 'systemctl start hypervvssd.service')484 # command_exec(execMode, 'sleep 1')485 # test1 = reg.exec_test('hypervvssd.service', 'journalctl -xe', 'output', '13 Permission denied')486 # command_exec(execMode, 'rm -rf /dev/vmbus/')487 # testResult.append(test1)488 #489 # command_exec(execMode, 'systemctl start ibacm.service')490 # test1 = reg.exec_test('ibacm.service', 'journalctl -b -u ibacm.service', 'output', 'code=exited, status=255')491 # testResult.append(test1)492 #493 # command_exec(execMode, 'systemctl start ipa.service')494 # test1 = reg.exec_test('ipa.service', 'journalctl -b -u ipa.service', 'output', 'code=exited, status=6')495 # testResult.append(test1)496 # test1 = reg.exec_test('ipa.service', 'journalctl -b -u ipa.service', 'output', 'IPA is not configured')497 # testResult.append(test1)498 #499 # command_exec(execMode, 'touch /dev/ipmi0')500 # command_exec(execMode, 'systemctl start ipmievd.service')501 # test1 = reg.exec_test('ipmievd.service', 'journalctl -xe', 'output', 'Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory')502 # testResult.append(test1)503 # command_exec(execMode, 'rm -rf /dev/ipmi0')504 #505 # command_exec(execMode, 'systemctl start capi.service')506 # test1 = reg.exec_test('capi.service', 'journalctl -b -u capi.service', 'output', 'cannot open /dev/capi20 nor /dev/isdn/capi20 - No such file or directory (2)')507 # testResult.append(test1)508 #509 # test1 = reg.exec_test('isdn.service', 'systemctl start isdn.service', 'output', 'Failed to start isdn.service: Unit not found.')510 # testResult.append(test1)511 #512 # command_exec(execMode, 'systemctl start isnsd.service')513 # test1 = reg.exec_test('isnsd.service', 'journalctl -b -u isnsd.service', 'output', 'code=exited, status=1/FAILURE')514 # testResult.append(test1)515 #516 # command_exec(execMode, 'systemctl start kadmin.service')517 # test1 = reg.exec_test('kadmin.service', 'journalctl -b -u kadmin.service', 'output', 'Configuration file does not specify default realm while initializing, aborting')518 # testResult.append(test1)519 #520 # command_exec(execMode, 'touch /var/kerberos/krb5kdc/kpropd.acl')521 # command_exec(execMode, 'systemctl start kprop.service')522 # command_exec(execMode, 'sleep 1')523 # test1 = reg.exec_test('kprop.service', 'journalctl -xe', 'output', 'Configuration file does not specify default realm Unable to get default realm')524 # command_exec(execMode, 'rm -rf /var/kerberos/krb5kdc/kpropd.acl')525 # testResult.append(test1)526 #527 # command_exec(execMode, 'systemctl start krb5kdc.service')528 # test1 = reg.exec_test('krb5kdc.service', 'journalctl -b -u krb5kdc.service', 'output', 'Configuration file does not specify default realm, attempting to retrieve default realm')529 # testResult.append(test1)530 #531 # command_exec(execMode, 'systemctl start phc2sys.service')532 # test1 = reg.exec_test('phc2sys.service', 'journalctl -b -u phc2sys.service', 'output', 'uds: sendto failed: No such file or directory')533 # testResult.append(test1)534 # command_exec(execMode, 'systemctl stop phc2sys.service')535 # test1 = reg.exec_test('phc2sys.service', 'journalctl -xe', 'output', 'poll failed')536 # testResult.append(test1)537 #538 # command_exec(execMode, 'systemctl start ptp4l.service')539 # test1 = reg.exec_test('ptp4l.service', 'journalctl -b -u ptp4l.service', 'output', 'failed to create a clock')540 # testResult.append(test1)541 #542 # command_exec(execMode, 'echo "test" > /etc/fancontrol')543 # command_exec(execMode, 'systemctl start fancontrol.service')544 # command_exec(execMode, 'sleep 1')545 # test1 = reg.exec_test('fancontrol.service', 'journalctl -xe', 'output', 'Some mandatory settings missing, please check your config file!')546 # command_exec(execMode, 'rm -rf /etc/fancontrol')547 # testResult.append(test1)548 #549 # command_exec(execMode, 'systemctl start mailman.service')550 # test1 = reg.exec_test('mailman.service', 'journalctl -xe', 'output', 'Site list is missing: mailman')551 # testResult.append(test1)552 #553 # command_exec(execMode, 'systemctl start mdcheck_start.timer')554 # test1 = reg.exec_test('mdcheck_start.timer', 'journalctl -xe', 'output', 'Failed to parse calendar specification, ignoring: Sun *-*-1..7 1:00:00')555 # testResult.append(test1)556 # test1 = reg.exec_test('mdcheck_start.timer', 'journalctl -xe', 'output', 'mdcheck_start.timer lacks value setting. Refusing.')557 # testResult.append(test1)558 #559 # command_exec(execMode, 'systemctl start mdmonitor-oneshot.service')560 # test1 = reg.exec_test('mdmonitor-oneshot.service', 'journalctl -xe', 'output', 'No mail address or alert command - not monitoring.')561 # testResult.append(test1)562 #563 # command_exec(execMode, 'touch /etc/mdadm.conf')564 # command_exec(execMode, 'systemctl start mdmonitor.service')565 # command_exec(execMode, 'sleep 1')566 # test1 = reg.exec_test('mdmonitor.service', 'journalctl -b -u mdmonitor.service', 'output', 'No mail address or alert command - not monitoring')567 # command_exec(execMode, 'rm -rf /etc/mdadm.conf')568 # testResult.append(test1)569 #570 # command_exec(execMode, 'systemctl start ndctl-monitor.service')571 # test1 = reg.exec_test('ndctl-monitor.service', 'journalctl -xe', 'output', 'code=exited, status=250')572 # testResult.append(test1)573 #574 # command_exec(execMode, 'systemctl start nfs-blkmap.service')575 # command_exec(execMode, 'systemctl stop nfs-blkmap.service')576 # test1 = reg.exec_test('nfs-blkmap.service', 'journalctl -b -u nfs-blkmap.service', 'output', 'open pipe file /var/lib/nfs/rpc_pipefs/nfs/blocklayout failed: No such file or directory')577 # testResult.append(test1)578 #579 # command_exec(execMode, 'systemctl start nvmet.service')580 # test1 = reg.exec_test('nvmet.service', 'journalctl -xe', 'output', '/sys/kernel/config/nvmet does not exist. Giving up.')581 # testResult.append(test1)582 #583 # command_exec(execMode, 'systemctl start opafm.service')584 # test1 = reg.exec_test('opafm.service', 'journalctl -b -u opafm.service', 'output', 'Invalid config detected! Coundn\'t find device for instance 0!.')585 # testResult.append(test1)586 #587 # command_exec(execMode, 'systemctl start ods-enforcerd.service')588 # test1 = reg.exec_test('ods-enforcerd.service', 'journalctl -b -u ods-enforcerd.service', 'output', 'Can\'t open PID file /var/run/opendnssec/enforcerd.pid (yet?) after start: No such file or directory')589 # testResult.append(test1)590 # test1 = reg.exec_test('ods-enforcerd.service', 'journalctl -b -u ods-enforcerd.service', 'output', 'could not find token with the name OpenDNSSEC') # could not find token with the name OpenDNSSEC, RHELê³¼ ë¹êµ íì591 # testResult.append(test1)592 #593 # command_exec(execMode, 'systemctl start openwsmand.service')594 # test1 = reg.exec_test('openwsmand.service', 'journalctl -b -u openwsmand.service', 'output', 'There is no ssl server key available for openwsman server to use.')595 # testResult.append(test1)596 # test1 = reg.exec_test('openwsmand.service', 'journalctl -b -u openwsmand.service', 'output', 'Please generate one with the following script and start the openwsman service again:')597 # testResult.append(test1)598 #599 # command_exec(execMode, 'systemctl start pcscd.service')600 # command_exec(execMode, 'systemctl stop pcscd.service')601 # test1 = reg.exec_test('pcscd.service', 'journalctl -b -u pcscd.service', 'output', 'code=exited, status=1/FAILURE')602 # testResult.append(test1)603 #604 # command_exec(execMode, 'systemctl start qemu-guest-agent.service')605 # test1 = reg.exec_test('qemu-guest-agent.service', 'journalctl -b -u qemu-guest-agent.service', 'output', 'start failed with result \'dependency\'')606 # testResult.append(test1)607 #608 # command_exec(execMode, 'touch /etc/quagga/ospf6d.conf')609 # command_exec(execMode, 'systemctl start ospf6d.service')610 # command_exec(execMode, 'systemctl stop ospf6d.service')611 # test1 = reg.exec_test('ospf6d.service', 'journalctl -b -u ospf6d.service', 'output', 'code=killed, status=6/ABRT')612 # testResult.append(test1)613 # test1 = reg.exec_test('ospf6d.service', 'journalctl -b -u ospf6d.service', 'output', 'Unit ospf6d.service entered failed state.')614 # testResult.append(test1)615 # command_exec(execMode, 'rm -rf /etc/quagga/ospf6d.conf')616 #617 # command_exec(execMode, 'systemctl start ras-mc-ctl.service')618 # test1 = reg.exec_test('ras-mc-ctl.service', 'journalctl -b -u ras-mc-ctl.service', 'output', 'code=killed, status=11/SEGV')619 # testResult.append(test1)620 # test1 = reg.exec_test('ras-mc-ctl.service', 'journalctl -b -u ras-mc-ctl.service', 'output', 'Unit ras-mc-ctl.service entered failed state.')621 # testResult.append(test1)622 #623 # command_exec(execMode, 'systemctl start redfish-finder.service')624 # test1 = reg.exec_test('redfish-finder.service', 'journalctl -b -u redfish-finder.service', 'output', 'AttributeError: dmiobject instance has no attribute \'device\'') # AttributeError: dmiobject instance has no attribute 'device', RHELê³¼ ë¹êµ íì625 # testResult.append(test1)626 #627 # command_exec(execMode, 'systemctl start pppoe-server.service')628 # test1 = reg.exec_test('pppoe-server.service', 'journalctl -b -u pppoe-server.service', 'output', 'pppoe: ioctl(SIOCGIFHWADDR): No such device')629 # testResult.append(test1)630 # test1 = reg.exec_test('pppoe-server.service', 'journalctl -b -u pppoe-server.service', 'output', 'ioctl(SIOCGIFHWADDR): No such device')631 # testResult.append(test1)632 #633 # command_exec(execMode, 'systemctl start speech-dispatcherd.service')634 # test1 = reg.exec_test('speech-dispatcherd.service', 'journalctl -xe', 'output', 'Can\'t create pid file in /root/.speech-dispatcher/pid/speech-dispatcher.pid, wrong permissions?')635 # testResult.append(test1)636 #637 # command_exec(execMode, 'systemctl start sssd-autofs.socket')638 # test1 = reg.exec_test('sssd-autofs.socket', 'journalctl -b -u sssd-autofs.socket', 'output', 'failed with result \'dependency\'.')639 # testResult.append(test1)640 #641 # command_exec(execMode, 'systemctl start sssd-pac.socket')642 # test1 = reg.exec_test('sssd-pac.socket', 'journalctl -b -u sssd-pac.socket', 'output', 'failed with result \'dependency\'.')643 # testResult.append(test1)644 #645 # command_exec(execMode, 'systemctl start sssd-pam-priv.socket')646 # test1 = reg.exec_test('sssd-pam-priv.socket', 'journalctl -b -u sssd-pam-priv.socket', 'output', 'failed with result \'dependency\'.')647 # testResult.append(test1)648 #649 # command_exec(execMode, 'systemctl start sssd-pam.socket')650 # test1 = reg.exec_test('sssd-pam.socket', 'journalctl -b -u sssd-pam.socket', 'output', 'failed with result \'dependency\'.')651 # testResult.append(test1)652 #653 # command_exec(execMode, 'systemctl start sssd-ssh.socket')654 # test1 = reg.exec_test('sssd-ssh.socket', 'journalctl -b -u sssd-ssh.socket', 'output', 'failed with result \'dependency\'.')655 # testResult.append(test1)656 #657 # command_exec(execMode, 'systemctl start sssd-sudo.socket')658 # test1 = reg.exec_test('sssd-sudo.socket', 'journalctl -b -u sssd-sudo.socket', 'output', 'failed with result \'dependency\'.')659 # testResult.append(test1)660 #661 # command_exec(execMode, 'systemctl start sssd.service')662 # test1 = reg.exec_test('sssd.service', 'journalctl -b -u sssd.service', 'output', 'code=exited, status=4/NOPERMISSION')663 # testResult.append(test1)664 # test1 = reg.exec_test('sssd.service', 'journalctl -b -u sssd.service', 'output', 'SSSD couldn\'t load the configuration database [2]: No such file or directory.')665 # testResult.append(test1)666 #667 # command_exec(execMode, 'systemctl start sssd-ifp.service')668 # test1 = reg.exec_test('sssd-ifp.service', 'journalctl -b -u sssd-ifp.service', 'output', 'failed with result \'dependency\'.')669 # testResult.append(test1)670 #671 # command_exec(execMode, 'touch /.readahead')672 # command_exec(execMode, 'systemctl start systemd-readahead-replay.service')673 # test1 = reg.exec_test('systemd-readahead-replay.service', 'journalctl -b -u systemd-readahead-replay.service', 'output', 'code=exited, status=1/FAILURE')674 # testResult.append(test1)675 # test1 = reg.exec_test('systemd-readahead-replay.service', 'journalctl -xe', 'output', ' Premature end of pack file.')676 # testResult.append(test1)677 # command_exec(execMode, 'rm -rf /.readahead')678 #679 # command_exec(execMode, 'systemctl start ypbind.service')680 # command_exec(execMode, 'sleep 3')681 # test1 = reg.exec_test('ypbind.service', 'journalctl -xe', 'output', 'domain not found')682 # testResult.append(test1)683 #684 # command_exec(execMode, 'systemctl start yppasswdd.service')685 # test1 = reg.exec_test('yppasswdd.service', 'journalctl -xe', 'output', 'domain not found')686 # testResult.append(test1)687 ##############################################################################################################################################688 # 7.9 ë²ì 689 # command_exec(execMode, 'systemctl start bacula-fd.service')690 # command_exec(execMode, 'systemctl stop bacula-fd.service')691 # test1 = reg.exec_test('bacula-fd.service', 'journalctl -xe', 'output', 'code=exited, status=15/n/a')692 # testResult.append(test1)693 #694 # command_exec(execMode, 'systemctl start named-pkcs11.service')695 # test1 = reg.exec_test('named-pkcs11.service', 'journalctl -xe', 'output', 'initializing DST: PKCS#11 initialization failed') # initializing DST: PKCS#11 initialization failed, RHELê³¼ ë¹êµ íì696 # testResult.append(test1)697 # test1 = reg.exec_test('named-pkcs11.service', 'journalctl -xe', 'output', 'exiting (due to fatal error)')698 # testResult.append(test1)699 #700 # command_exec(execMode, 'systemctl start blivet.service')701 # test1 = reg.exec_test('blivet.service', 'journalctl -b -u blivet.service', 'output', 'dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Connection ":')702 # testResult.append(test1)703 #704 # command_exec(execMode, 'systemctl start rbdmap.service')705 # test1 = reg.exec_test('rbdmap.service', 'journalctl -b -u rbdmap.service', 'output', 'Failed to start Map RBD devices.')706 # testResult.append(test1)707 #708 # command_exec(execMode, 'systemctl start conman.service')709 # test1 = reg.exec_test('conman.service', 'journalctl -b -u conman.service', 'output', 'code=exited status=1')710 # testResult.append(test1)711 # test1 = reg.exec_test('conman.service', 'journalctl -b -u conman.service', 'output', 'Configuration "/etc/conman.conf" has no consoles defined')712 # testResult.append(test1)713 #714 # command_exec(execMode, 'systemctl start dhcpd6.service')715 # test1 = reg.exec_test('dhcpd6.service', 'journalctl -b -u dhcpd6.service', 'output', 'Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file') # Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file, RHELê³¼ ë¹êµ íì716 # testResult.append(test1)717 # test1 = reg.exec_test('dhcpd6.service', 'journalctl -b -u dhcpd6.service', 'output', 'No subnet6 declaration for')718 # testResult.append(test1)719 # test1 = reg.exec_test('dhcpd6.service', 'journalctl -xe', 'output', 'Not configured to listen on any interfaces!')720 # testResult.append(test1)721 #722 # command_exec(execMode, 'systemctl start dhcrelay.service')723 # test1 = reg.exec_test('dhcrelay.service', 'journalctl -b -u dhcrelay.service', 'output', 'No servers specified.')724 # testResult.append(test1)725 #726 # command_exec(execMode, 'systemctl start edac.service')727 # test1 = reg.exec_test('edac.service', 'journalctl -b -u edac.service', 'output', 'No dimm labels for')728 # testResult.append(test1)729 # command_exec(execMode, 'systemctl stop edac.service')730 # test1 = reg.exec_test('edac.service', 'journalctl -b -u edac.service', 'output', 'code=exited status=1')731 # testResult.append(test1)732 # test1 = reg.exec_test('edac.service', 'journalctl -b -u edac.service', 'output', 'Unknown option: unload')733 # testResult.append(test1)734 #735 # command_exec(execMode, 'systemctl start firstboot-graphical.service')736 # test1 = reg.exec_test('firstboot-graphical.service', 'journalctl -b -u firstboot-graphical.service', 'output', 'Support for option SysVStartPriority= has been removed and it is ignored')737 # testResult.append(test1)738 #739 # command_exec(execMode, 'systemctl start bmc-watchdog.service')740 # command_exec(execMode, 'systemctl stop bmc-watchdog.service')741 # test1 = reg.exec_test('bmc-watchdog.service', 'journalctl -xe', 'output', 'Get Watchdog Timer: driver timeout')742 # testResult.append(test1)743 #744 # command_exec(execMode, 'systemctl start ipmidetectd.service')745 # test1 = reg.exec_test('ipmidetectd.service', 'journalctl -b -u ipmidetectd.service', 'output', 'ipmidetectd: No nodes configured')746 # testResult.append(test1)747 #748 # command_exec(execMode, 'mkdir -p /dev/vmbus/')749 # command_exec(execMode, 'touch /dev/vmbus/hv_kvp')750 # command_exec(execMode, 'systemctl start hypervkvpd.service')751 # command_exec(execMode, 'sleep 1')752 # test1 = reg.exec_test('hypervkvpd.service', 'journalctl -xe', 'output', '13 Permission denied')753 # command_exec(execMode, 'rm -rf /dev/vmbus/')754 # testResult.append(test1)755 #756 # command_exec(execMode, 'mkdir -p /dev/vmbus/')757 # command_exec(execMode, 'touch /dev/vmbus/hv_vss')758 # command_exec(execMode, 'systemctl start hypervvssd.service')759 # command_exec(execMode, 'sleep 1')760 # test1 = reg.exec_test('hypervvssd.service', 'journalctl -xe', 'output', '13 Permission denied')761 # command_exec(execMode, 'rm -rf /dev/vmbus/')762 # testResult.append(test1)763 #764 # command_exec(execMode, 'systemctl start ibacm.service')765 # test1 = reg.exec_test('ibacm.service', 'journalctl -b -u ibacm.service', 'output', 'code=exited, status=255')766 # testResult.append(test1)767 #768 # command_exec(execMode, 'systemctl start ipa.service')769 # test1 = reg.exec_test('ipa.service', 'journalctl -b -u ipa.service', 'output', 'code=exited, status=6')770 # testResult.append(test1)771 # test1 = reg.exec_test('ipa.service', 'journalctl -b -u ipa.service', 'output', 'IPA is not configured')772 # testResult.append(test1)773 #774 # command_exec(execMode, 'touch /dev/ipmi0')775 # command_exec(execMode, 'systemctl start ipmievd.service')776 # test1 = reg.exec_test('ipmievd.service', 'journalctl -xe', 'output', 'Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory')777 # testResult.append(test1)778 # command_exec(execMode, 'rm -rf /dev/ipmi0')779 #780 # command_exec(execMode, 'systemctl start rdisc.service')781 # test1 = reg.exec_test('rdisc.service', 'journalctl -b -u rdisc.service', 'output', 'code=exited status=5')782 # testResult.append(test1)783 #784 # command_exec(execMode, 'systemctl start capi.service')785 # test1 = reg.exec_test('capi.service', 'journalctl -b -u capi.service', 'output', 'cannot open /dev/capi20 nor /dev/isdn/capi20 - No such file or directory (2)')786 # testResult.append(test1)787 #788 # test1 = reg.exec_test('isdn.service', 'systemctl start isdn.service', 'output', 'Failed to start isdn.service: Unit not found.')789 # testResult.append(test1)790 #791 # command_exec(execMode, 'systemctl start isnsd.service')792 # test1 = reg.exec_test('isnsd.service', 'journalctl -b -u isnsd.service', 'output', 'code=exited, status=1/FAILURE')793 # testResult.append(test1)794 #795 # command_exec(execMode, 'systemctl start kadmin.service')796 # test1 = reg.exec_test('kadmin.service', 'journalctl -b -u kadmin.service', 'output', 'Configuration file does not specify default realm while initializing, aborting')797 # testResult.append(test1)798 #799 # command_exec(execMode, 'touch /var/kerberos/krb5kdc/kpropd.acl')800 # command_exec(execMode, 'systemctl start kprop.service')801 # command_exec(execMode, 'sleep 1')802 # test1 = reg.exec_test('kprop.service', 'journalctl -xe', 'output', 'Configuration file does not specify default realm Unable to get default realm')803 # command_exec(execMode, 'rm -rf /var/kerberos/krb5kdc/kpropd.acl')804 # testResult.append(test1)805 #806 # command_exec(execMode, 'systemctl start krb5kdc.service')807 # test1 = reg.exec_test('krb5kdc.service', 'journalctl -b -u krb5kdc.service', 'output', 'Configuration file does not specify default realm, attempting to retrieve default realm')808 # testResult.append(test1)809 #810 # command_exec(execMode, 'systemctl start phc2sys.service')811 # test1 = reg.exec_test('phc2sys.service', 'journalctl -b -u phc2sys.service', 'output', 'uds: sendto failed: No such file or directory')812 # testResult.append(test1)813 # command_exec(execMode, 'systemctl stop phc2sys.service')814 # test1 = reg.exec_test('phc2sys.service', 'journalctl -xe', 'output', 'poll failed')815 # testResult.append(test1)816 #817 # command_exec(execMode, 'systemctl start ptp4l.service')818 # test1 = reg.exec_test('ptp4l.service', 'journalctl -b -u ptp4l.service', 'output', 'failed to create a clock')819 # testResult.append(test1)820 #821 # command_exec(execMode, 'echo "test" > /etc/fancontrol')822 # command_exec(execMode, 'systemctl start fancontrol.service')823 # command_exec(execMode, 'sleep 1')824 # test1 = reg.exec_test('fancontrol.service', 'journalctl -xe', 'output', 'Some mandatory settings missing, please check your config file!')825 # command_exec(execMode, 'rm -rf /etc/fancontrol')826 # testResult.append(test1)827 #828 # command_exec(execMode, 'systemctl start mailman.service')829 # test1 = reg.exec_test('mailman.service', 'journalctl -xe', 'output', 'Site list is missing: mailman')830 # testResult.append(test1)831 #832 # command_exec(execMode, 'systemctl start mdcheck_start.timer')833 # test1 = reg.exec_test('mdcheck_start.timer', 'journalctl -xe', 'output', 'Failed to parse calendar specification, ignoring: Sun *-*-1..7 1:00:00')834 # testResult.append(test1)835 # test1 = reg.exec_test('mdcheck_start.timer', 'journalctl -xe', 'output', 'mdcheck_start.timer lacks value setting. Refusing.')836 # testResult.append(test1)837 #838 # command_exec(execMode, 'systemctl start mdmonitor-oneshot.service')839 # test1 = reg.exec_test('mdmonitor-oneshot.service', 'journalctl -xe', 'output', 'No mail address or alert command - not monitoring.')840 # testResult.append(test1)841 #842 # command_exec(execMode, 'touch /etc/mdadm.conf')843 # command_exec(execMode, 'systemctl start mdmonitor.service')844 # command_exec(execMode, 'sleep 1')845 # test1 = reg.exec_test('mdmonitor.service', 'journalctl -b -u mdmonitor.service', 'output', 'No mail address or alert command - not monitoring')846 # command_exec(execMode, 'rm -rf /etc/mdadm.conf')847 # testResult.append(test1)848 #849 # command_exec(execMode, 'systemctl start ndctl-monitor.service')850 # test1 = reg.exec_test('ndctl-monitor.service', 'journalctl -xe', 'output', 'code=exited, status=250')851 # testResult.append(test1)852 #853 # command_exec(execMode, 'systemctl start nfs-blkmap.service')854 # command_exec(execMode, 'systemctl stop nfs-blkmap.service')855 # test1 = reg.exec_test('nfs-blkmap.service', 'journalctl -b -u nfs-blkmap.service', 'output', 'open pipe file /var/lib/nfs/rpc_pipefs/nfs/blocklayout failed: No such file or directory')856 # testResult.append(test1)857 #858 # command_exec(execMode, 'systemctl start nvmet.service')859 # test1 = reg.exec_test('nvmet.service', 'journalctl -xe', 'output', '/sys/kernel/config/nvmet does not exist. Giving up.')860 # testResult.append(test1)861 #862 # command_exec(execMode, 'systemctl start opafm.service')863 # test1 = reg.exec_test('opafm.service', 'journalctl -b -u opafm.service', 'output', 'Invalid config detected! Coundn\'t find device for instance 0!.')864 # testResult.append(test1)865 #866 # command_exec(execMode, 'systemctl start ods-enforcerd.service')867 # test1 = reg.exec_test('ods-enforcerd.service', 'journalctl -b -u ods-enforcerd.service', 'output', 'Can\'t open PID file /var/run/opendnssec/enforcerd.pid (yet?) after start: No such file or directory')868 # testResult.append(test1)869 # test1 = reg.exec_test('ods-enforcerd.service', 'journalctl -b -u ods-enforcerd.service', 'output', 'could not find token with the name OpenDNSSEC') # could not find token with the name OpenDNSSEC, RHELê³¼ ë¹êµ íì870 # testResult.append(test1)871 #872 # command_exec(execMode, 'systemctl start openwsmand.service')873 # test1 = reg.exec_test('openwsmand.service', 'journalctl -b -u openwsmand.service', 'output', 'There is no ssl server key available for openwsman server to use.')874 # testResult.append(test1)875 # test1 = reg.exec_test('openwsmand.service', 'journalctl -b -u openwsmand.service', 'output', 'Please generate one with the following script and start the openwsman service again:')876 # testResult.append(test1)877 #878 # command_exec(execMode, 'systemctl start pcscd.service')879 # command_exec(execMode, 'systemctl stop pcscd.service')880 # test1 = reg.exec_test('pcscd.service', 'journalctl -b -u pcscd.service', 'output', 'code=exited, status=1/FAILURE')881 # testResult.append(test1)882 #883 # command_exec(execMode, 'systemctl start qemu-guest-agent.service')884 # test1 = reg.exec_test('qemu-guest-agent.service', 'journalctl -b -u qemu-guest-agent.service', 'output', 'start failed with result \'dependency\'')885 # testResult.append(test1)886 #887 # command_exec(execMode, 'touch /etc/quagga/ospf6d.conf')888 # command_exec(execMode, 'systemctl start ospf6d.service')889 # command_exec(execMode, 'systemctl stop ospf6d.service')890 # test1 = reg.exec_test('ospf6d.service', 'journalctl -b -u ospf6d.service', 'output', 'code=killed, status=6/ABRT')891 # testResult.append(test1)892 # test1 = reg.exec_test('ospf6d.service', 'journalctl -b -u ospf6d.service', 'output', 'Unit ospf6d.service entered failed state.')893 # testResult.append(test1)894 # command_exec(execMode, 'rm -rf /etc/quagga/ospf6d.conf')895 #896 # command_exec(execMode, 'systemctl start ras-mc-ctl.service')897 # test1 = reg.exec_test('ras-mc-ctl.service', 'journalctl -b -u ras-mc-ctl.service', 'output', 'code=killed, status=11/SEGV')898 # testResult.append(test1)899 # test1 = reg.exec_test('ras-mc-ctl.service', 'journalctl -b -u ras-mc-ctl.service', 'output', 'Unit ras-mc-ctl.service entered failed state.')900 # testResult.append(test1)901 #902 # command_exec(execMode, 'systemctl start redfish-finder.service')903 # test1 = reg.exec_test('redfish-finder.service', 'journalctl -b -u redfish-finder.service', 'output', 'AttributeError: dmiobject instance has no attribute \'device\'') # AttributeError: dmiobject instance has no attribute 'device', RHELê³¼ ë¹êµ íì904 # testResult.append(test1)905 #906 # command_exec(execMode, 'systemctl start pppoe-server.service')907 # test1 = reg.exec_test('pppoe-server.service', 'journalctl -b -u pppoe-server.service', 'output', 'pppoe: ioctl(SIOCGIFHWADDR): No such device')908 # testResult.append(test1)909 # test1 = reg.exec_test('pppoe-server.service', 'journalctl -b -u pppoe-server.service', 'output', 'ioctl(SIOCGIFHWADDR): No such device')910 # testResult.append(test1)911 #912 # command_exec(execMode, 'systemctl start speech-dispatcherd.service')913 # test1 = reg.exec_test('speech-dispatcherd.service', 'journalctl -xe', 'output', 'Can\'t create pid file in /root/.speech-dispatcher/pid/speech-dispatcher.pid, wrong permissions?')914 # testResult.append(test1)915 #916 # command_exec(execMode, 'systemctl start sssd-autofs.socket')917 # test1 = reg.exec_test('sssd-autofs.socket', 'journalctl -b -u sssd-autofs.socket', 'output', 'failed with result \'dependency\'.')918 # testResult.append(test1)919 #920 # command_exec(execMode, 'systemctl start sssd-nss.socket')921 # test1 = reg.exec_test('sssd-nss.socket', 'journalctl -b -u sssd-nss.socket', 'output', 'failed with result \'dependency\'.')922 # testResult.append(test1)923 #924 # command_exec(execMode, 'systemctl start sssd-pac.socket')925 # test1 = reg.exec_test('sssd-pac.socket', 'journalctl -b -u sssd-pac.socket', 'output', 'failed with result \'dependency\'.')926 # testResult.append(test1)927 #928 # command_exec(execMode, 'systemctl start sssd-pam-priv.socket')929 # test1 = reg.exec_test('sssd-pam-priv.socket', 'journalctl -b -u sssd-pam-priv.socket', 'output', 'failed with result \'dependency\'.')930 # testResult.append(test1)931 #932 # command_exec(execMode, 'systemctl start sssd-pam.socket')933 # test1 = reg.exec_test('sssd-pam.socket', 'journalctl -b -u sssd-pam.socket', 'output', 'failed with result \'dependency\'.')934 # testResult.append(test1)935 #936 # command_exec(execMode, 'systemctl start sssd-ssh.socket')937 # test1 = reg.exec_test('sssd-ssh.socket', 'journalctl -b -u sssd-ssh.socket', 'output', 'failed with result \'dependency\'.')938 # testResult.append(test1)939 #940 # command_exec(execMode, 'systemctl start sssd-sudo.socket')941 # test1 = reg.exec_test('sssd-sudo.socket', 'journalctl -b -u sssd-sudo.socket', 'output', 'failed with result \'dependency\'.')942 # testResult.append(test1)943 #944 # command_exec(execMode, 'systemctl start sssd.service')945 # test1 = reg.exec_test('sssd.service', 'journalctl -b -u sssd.service', 'output', 'code=exited, status=4/NOPERMISSION')946 # testResult.append(test1)947 # test1 = reg.exec_test('sssd.service', 'journalctl -b -u sssd.service', 'output', 'SSSD couldn\'t load the configuration database [2]: No such file or directory.')948 # testResult.append(test1)949 #950 # command_exec(execMode, 'systemctl start sssd-ifp.service')951 # test1 = reg.exec_test('sssd-ifp.service', 'journalctl -b -u sssd-ifp.service', 'output', 'failed with result \'dependency\'.')952 # testResult.append(test1)953 #954 # test1 = reg.exec_test('-.slice', 'systemctl start -.slice', 'output', "systemctl: invalid option -- \'.\'")955 # testResult.append(test1)956 #957 # command_exec(execMode, 'systemctl start syslog.socket')958 # test1 = reg.exec_test('syslog.socket', 'journalctl -b -u syslog.socket', 'output', 'Socket service syslog.service not loaded, refusing.')959 # testResult.append(test1)960 #961 # command_exec(execMode, 'touch /.readahead')962 # command_exec(execMode, 'systemctl start systemd-readahead-replay.service')963 # test1 = reg.exec_test('systemd-readahead-replay.service', 'journalctl -b -u systemd-readahead-replay.service', 'output', 'code=exited, status=1/FAILURE')964 # testResult.append(test1)965 # test1 = reg.exec_test('systemd-readahead-replay.service', 'journalctl -xe', 'output', ' Premature end of pack file.')966 # testResult.append(test1)967 # command_exec(execMode, 'rm -rf /.readahead')968 #969 # command_exec(execMode, 'systemctl start tcsd.service')970 # command_exec(execMode, 'sleep 3')971 # test1 = reg.exec_test('tcsd.service', 'journalctl -xe', 'output', 'TrouSerS ERROR: Could not find a device to open!')972 # testResult.append(test1)973 #974 # command_exec(execMode, 'systemctl start ypbind.service')975 # command_exec(execMode, 'sleep 3')976 # test1 = reg.exec_test('ypbind.service', 'journalctl -xe', 'output', 'domain not found')977 # testResult.append(test1)978 #979 # command_exec(execMode, 'systemctl start yppasswdd.service')980 # test1 = reg.exec_test('yppasswdd.service', 'journalctl -xe', 'output', 'domain not found')981 # testResult.append(test1)982 ##############################################################################################################################################983 # save result to csv984 reg.export_csv(testResult, RESULT_PATH + '/manual_'+VERSION_DETAIL+'_daemon1_result.csv', 'name;result;msg')985 return testResult986if __name__=="__main__":987 reg.makeFolder(RESULT_PATH) # ê²°ê³¼ì ì¥ í´ë ë§ë¤ê¸°...
manual_daemon_2.py
Source:manual_daemon_2.py
...8 print("* Manual Daemon 2 Test Case")9 ## ì´ê¸°í ë¶ë¶ ##############################10 testResult = []11 # 8.3 ë²ì 12 command_exec(execMode, 'touch /var/crash/test')13 command_exec(execMode, 'systemctl start abrtd.service')14 command_exec(execMode, 'systemctl start abrt-vmcore.service')15 test1 = reg.exec_test('abrt-vmcore.service', 'systemctl status abrt-vmcore.service', 'output', 'Active: active')16 testResult.append(test1)17 command_exec(execMode, 'rm -rf /var/crash/test')18 command_exec(execMode, 'systemctl stop abrtd.service')19 command_exec(execMode, 'systemctl stop abrt-vmcore.service')20 test1 = reg.exec_test('abrt-vmcore.service', 'systemctl status abrt-vmcore.service', 'output', 'Active: inactive')21 testResult.append(test1)22 command_exec(execMode, 'mv /var/lib/cloud/instance /var/lib/cloud/instance_back') #/etc/ssh/sshd_config ë´ PasswordAuthentication yes 주ì í´ì íì23 command_exec(execMode, 'mv /etc/cloud/cloud-init.disabled /etc/cloud/cloud-init.disabled.bak')24 command_exec(execMode, 'systemctl start cloud-config.service')25 test1 = reg.exec_test('cloud-config.service', 'systemctl status cloud-config.service', 'output', 'Active: active')26 testResult.append(test1)27 command_exec(execMode, 'mv /var/lib/cloud/instance_back /var/lib/cloud/instance')28 command_exec(execMode, 'mv /etc/cloud/cloud-init.disabled.bak /etc/cloud/cloud-init.disabled')29 command_exec(execMode, 'systemctl stop cloud-config.service')30 test1 = reg.exec_test('cloud-config.service', 'systemctl status cloud-config.service', 'output', 'Active: inactive')31 testResult.append(test1)32 command_exec(execMode, 'mv /var/lib/cloud/instance /var/lib/cloud/instance_back')33 command_exec(execMode, 'mv /etc/cloud/cloud-init.disabled /etc/cloud/cloud-init.disabled.bak')34 command_exec(execMode, 'systemctl start cloud-final.service')35 test1 = reg.exec_test('cloud-final.service', 'systemctl status cloud-final.service', 'output', 'Active: active')36 testResult.append(test1)37 command_exec(execMode, 'mv /var/lib/cloud/instance_back /var/lib/cloud/instance')38 command_exec(execMode, 'mv /etc/cloud/cloud-init.disabled.bak /etc/cloud/cloud-init.disabled')39 command_exec(execMode, 'systemctl stop cloud-final.service')40 test1 = reg.exec_test('cloud-final.service', 'systemctl status cloud-final.service', 'output', 'Active: inactive')41 testResult.append(test1)42 command_exec(execMode, 'systemctl start dbus.socket')43 command_exec(execMode, 'systemctl start dbus.service')44 test1 = reg.exec_test('dbus.service', 'systemctl status dbus.service', 'output', 'Active: active')45 testResult.append(test1)46 command_exec(execMode, 'systemctl stop dbus.socket')47 command_exec(execMode, 'systemctl stop dbus.service')48 test1 = reg.exec_test('dbus.service', 'systemctl status dbus.service', 'output', 'Active: inactive')49 testResult.append(test1)50 command_exec(execMode, 'systemctl start httpd.service')51 command_exec(execMode, 'sleep 1')52 test1 = reg.exec_test('httpd.service', 'systemctl status httpd.service', 'output', 'Active: active')53 testResult.append(test1)54 command_exec(execMode, 'systemctl stop httpd.service')55 test1 = reg.exec_test('httpd.service', 'systemctl status httpd.service', 'output', 'Active: inactive')56 testResult.append(test1)57 command_exec(execMode, 'mkdir -p /dev/vmbus/')58 command_exec(execMode, 'touch /dev/vmbus/hv_fcopy')59 command_exec(execMode, 'systemctl start hypervfcopyd.service')60 command_exec(execMode, 'sleep 1')61 test1 = reg.exec_test('hypervfcopyd.service', 'systemctl status hypervfcopyd.service', 'output', 'Active: active')62 testResult.append(test1)63 command_exec(execMode, 'systemctl stop hypervfcopyd.service')64 test1 = reg.exec_test('hypervfcopyd.service', 'systemctl status hypervfcopyd.service', 'output', 'Active: inactive')65 command_exec(execMode, 'rm -rf /dev/vmbus/')66 testResult.append(test1)67 command_exec(execMode, 'cp /usr/share/doc/stunnel/stunnel.conf-sample /etc/stunnel/stunnel.conf')68 command_exec(execMode, 'systemctl start stunnel.service')69 command_exec(execMode, 'sleep 1')70 test1 = reg.exec_test('stunnel.service', 'systemctl status stunnel.service', 'output', 'Active: active') # ì¤í¨ ì netstat -lpn | grep -e :25 -e :110ë¡ ì¬ì©ì¤ì¸ íë¡ì¸ì¤ íì
ë° ì¢
ë£ ì´í íì¸71 testResult.append(test1)72 command_exec(execMode, 'systemctl stop stunnel.service')73 test1 = reg.exec_test('stunnel.service', 'systemctl status stunnel.service', 'output', 'Active: inactive')74 command_exec(execMode, 'rm -rf /etc/stunnel/stunnel.conf')75 testResult.append(test1)76 command_exec(execMode, 'systemctl stop systemd-journald.service')77 command_exec(execMode, 'systemctl start systemd-journald-dev-log.socket')78 command_exec(execMode, 'sleep 1')79 test1 = reg.exec_test('systemd-journald-dev-log.socket', 'systemctl status systemd-journald-dev-log.socket', 'output', 'Active: active')80 testResult.append(test1)81 command_exec(execMode, 'systemctl stop systemd-journald-dev-log.socket')82 test1 = reg.exec_test('systemd-journald-dev-log.socket', 'systemctl status systemd-journald-dev-log.socket', 'output', 'Active: inactive')83 command_exec(execMode, 'systemctl start systemd-journald.service')84 testResult.append(test1)85 # 8.2 ë²ì 86 # command_exec(execMode, 'touch /var/crash/test')87 # command_exec(execMode, 'systemctl start abrtd.service')88 # command_exec(execMode, 'systemctl start abrt-vmcore.service')89 # test1 = reg.exec_test('abrt-vmcore.service', 'systemctl status abrt-vmcore.service', 'output', 'Active: active')90 # testResult.append(test1)91 # command_exec(execMode, 'rm -rf /var/crash/test')92 # command_exec(execMode, 'systemctl stop abrtd.service')93 # command_exec(execMode, 'systemctl stop abrt-vmcore.service')94 # test1 = reg.exec_test('abrt-vmcore.service', 'systemctl status abrt-vmcore.service', 'output', 'Active: inactive')95 # testResult.append(test1)96 #97 # command_exec(execMode, 'mv /var/lib/cloud/instance /var/lib/cloud/instance_back') #/etc/ssh/sshd_config ë´ PasswordAuthentication yes 주ì í´ì íì98 # command_exec(execMode, 'mv /etc/cloud/cloud-init.disabled /etc/cloud/cloud-init.disabled.bak')99 # command_exec(execMode, 'systemctl start cloud-config.service')100 # test1 = reg.exec_test('cloud-config.service', 'systemctl status cloud-config.service', 'output', 'Active: active')101 # testResult.append(test1)102 # command_exec(execMode, 'mv /var/lib/cloud/instance_back /var/lib/cloud/instance')103 # command_exec(execMode, 'mv /etc/cloud/cloud-init.disabled.bak /etc/cloud/cloud-init.disabled')104 # command_exec(execMode, 'systemctl stop cloud-config.service')105 # test1 = reg.exec_test('cloud-config.service', 'systemctl status cloud-config.service', 'output', 'Active: inactive')106 # testResult.append(test1)107 #108 # command_exec(execMode, 'mv /var/lib/cloud/instance /var/lib/cloud/instance_back')109 # command_exec(execMode, 'mv /etc/cloud/cloud-init.disabled /etc/cloud/cloud-init.disabled.bak')110 # command_exec(execMode, 'systemctl start cloud-final.service')111 # test1 = reg.exec_test('cloud-final.service', 'systemctl status cloud-final.service', 'output', 'Active: active')112 # testResult.append(test1)113 # command_exec(execMode, 'mv /var/lib/cloud/instance_back /var/lib/cloud/instance')114 # command_exec(execMode, 'mv /etc/cloud/cloud-init.disabled.bak /etc/cloud/cloud-init.disabled')115 # command_exec(execMode, 'systemctl stop cloud-final.service')116 # test1 = reg.exec_test('cloud-final.service', 'systemctl status cloud-final.service', 'output', 'Active: inactive')117 # testResult.append(test1)118 #119 # command_exec(execMode, 'systemctl start dbus.socket')120 # command_exec(execMode, 'systemctl start dbus.service')121 # test1 = reg.exec_test('dbus.service', 'systemctl status dbus.service', 'output', 'Active: active')122 # testResult.append(test1)123 # command_exec(execMode, 'systemctl stop dbus.socket')124 # command_exec(execMode, 'systemctl stop dbus.service')125 # test1 = reg.exec_test('dbus.service', 'systemctl status dbus.service', 'output', 'Active: inactive')126 # testResult.append(test1)127 #128 # command_exec(execMode, 'systemctl start httpd.service')129 # command_exec(execMode, 'sleep 1')130 # test1 = reg.exec_test('httpd.service', 'systemctl status httpd.service', 'output', 'Active: active')131 # testResult.append(test1)132 # command_exec(execMode, 'systemctl stop httpd.service')133 # test1 = reg.exec_test('httpd.service', 'systemctl status httpd.service', 'output', 'Active: inactive')134 # testResult.append(test1)135 #136 # command_exec(execMode, 'mkdir -p /dev/vmbus/')137 # command_exec(execMode, 'touch /dev/vmbus/hv_fcopy')138 # command_exec(execMode, 'systemctl start hypervfcopyd.service')139 # command_exec(execMode, 'sleep 1')140 # test1 = reg.exec_test('hypervfcopyd.service', 'systemctl status hypervfcopyd.service', 'output', 'Active: active')141 # testResult.append(test1)142 # command_exec(execMode, 'systemctl stop hypervfcopyd.service')143 # test1 = reg.exec_test('hypervfcopyd.service', 'systemctl status hypervfcopyd.service', 'output', 'Active: inactive')144 # command_exec(execMode, 'rm -rf /dev/vmbus/')145 # testResult.append(test1)146 #147 # command_exec(execMode, 'cp /usr/share/doc/stunnel/stunnel.conf-sample /etc/stunnel/stunnel.conf')148 # command_exec(execMode, 'systemctl start stunnel.service')149 # command_exec(execMode, 'sleep 1')150 # test1 = reg.exec_test('stunnel.service', 'systemctl status stunnel.service', 'output', 'Active: active') # ì¤í¨ ì netstat -lpn | grep -e :25 -e :110ë¡ ì¬ì©ì¤ì¸ íë¡ì¸ì¤ íì
ë° ì¢
ë£ ì´í íì¸151 # testResult.append(test1)152 # command_exec(execMode, 'systemctl stop stunnel.service')153 # test1 = reg.exec_test('stunnel.service', 'systemctl status stunnel.service', 'output', 'Active: inactive')154 # command_exec(execMode, 'rm -rf /etc/stunnel/stunnel.conf')155 # testResult.append(test1)156 #157 # command_exec(execMode, 'systemctl stop systemd-journald.service')158 # command_exec(execMode, 'systemctl start systemd-journald-dev-log.socket')159 # command_exec(execMode, 'sleep 1')160 # test1 = reg.exec_test('systemd-journald-dev-log.socket', 'systemctl status systemd-journald-dev-log.socket', 'output', 'Active: active')161 # testResult.append(test1)162 # command_exec(execMode, 'systemctl stop systemd-journald-dev-log.socket')163 # test1 = reg.exec_test('systemd-journald-dev-log.socket', 'systemctl status systemd-journald-dev-log.socket', 'output', 'Active: inactive')164 # command_exec(execMode, 'systemctl start systemd-journald.service')165 # testResult.append(test1)166 ##############################################################################################################################################167 # 7.8 ë²ì 168 # command_exec(execMode, 'systemctl start abrtd.service')169 # command_exec(execMode, 'systemctl start abrt-ccpp.service')170 # test1 = reg.exec_test('abrt-ccpp.service', 'systemctl status abrt-ccpp.service', 'output', 'Active: active')171 # testResult.append(test1)172 # command_exec(execMode, 'systemctl stop abrt-ccpp.service')173 # test1 = reg.exec_test('abrt-ccpp.service', 'systemctl status abrt-ccpp.service', 'output', 'Active: inactive')174 # command_exec(execMode, 'systemctl stop abrtd.service')175 # testResult.append(test1)176 #177 # command_exec(execMode, 'systemctl start abrtd.service')178 # command_exec(execMode, 'systemctl start abrt-oops.service')179 # test1 = reg.exec_test('abrt-oops.service', 'systemctl status abrt-oops.service', 'output', 'Active: active')180 # testResult.append(test1)181 # command_exec(execMode, 'systemctl stop abrt-oops.service')182 # test1 = reg.exec_test('abrt-oops.service', 'systemctl status abrt-oops.service', 'output', 'Active: inactive')183 # command_exec(execMode, 'systemctl stop abrtd.service')184 # testResult.append(test1)185 #186 # command_exec(execMode, 'touch /var/crash/test')187 # command_exec(execMode, 'systemctl start abrtd.service')188 # command_exec(execMode, 'systemctl start abrt-vmcore.service')189 # test1 = reg.exec_test('abrt-vmcore.service', 'systemctl status abrt-vmcore.service', 'output', 'Active: active')190 # testResult.append(test1)191 # command_exec(execMode, 'rm -rf /var/crash/test')192 # command_exec(execMode, 'systemctl stop abrtd.service')193 # command_exec(execMode, 'systemctl stop abrt-vmcore.service')194 # test1 = reg.exec_test('abrt-vmcore.service', 'systemctl status abrt-vmcore.service', 'output', 'Active: inactive')195 # testResult.append(test1)196 #197 # command_exec(execMode, 'mv /var/lib/cloud/instance /var/lib/cloud/instance_back') #/etc/ssh/sshd_config ë´ PasswordAuthentication yes 주ì í´ì íì198 # command_exec(execMode, 'mv /etc/cloud/cloud-init.disabled /etc/cloud/cloud-init.disabled.bak')199 # command_exec(execMode, 'systemctl start cloud-config.service')200 # test1 = reg.exec_test('cloud-config.service', 'systemctl status cloud-config.service', 'output', 'Active: active')201 # testResult.append(test1)202 # command_exec(execMode, 'mv /var/lib/cloud/instance_back /var/lib/cloud/instance')203 # command_exec(execMode, 'mv /etc/cloud/cloud-init.disabled.bak /etc/cloud/cloud-init.disabled')204 # command_exec(execMode, 'systemctl stop cloud-config.service')205 # test1 = reg.exec_test('cloud-config.service', 'systemctl status cloud-config.service', 'output', 'Active: inactive')206 # testResult.append(test1)207 #208 # command_exec(execMode, 'mv /var/lib/cloud/instance /var/lib/cloud/instance_back')209 # command_exec(execMode, 'mv /etc/cloud/cloud-init.disabled /etc/cloud/cloud-init.disabled.bak')210 # command_exec(execMode, 'systemctl start cloud-final.service')211 # test1 = reg.exec_test('cloud-final.service', 'systemctl status cloud-final.service', 'output', 'Active: active')212 # testResult.append(test1)213 # command_exec(execMode, 'mv /var/lib/cloud/instance_back /var/lib/cloud/instance')214 # command_exec(execMode, 'mv /etc/cloud/cloud-init.disabled.bak /etc/cloud/cloud-init.disabled')215 # command_exec(execMode, 'systemctl stop cloud-final.service')216 # test1 = reg.exec_test('cloud-final.service', 'systemctl status cloud-final.service', 'output', 'Active: inactive')217 # testResult.append(test1)218 #219 # command_exec(execMode, 'systemctl start dbus.service')220 # test1 = reg.exec_test('dbus.service', 'systemctl status dbus.service', 'output', 'Active: active')221 # testResult.append(test1)222 # command_exec(execMode, 'systemctl stop dbus.socket')223 # test1 = reg.exec_test('dbus.service', 'systemctl status dbus.service', 'output', 'Active: inactive')224 # command_exec(execMode, 'systemctl start dbus.service')225 # testResult.append(test1)226 #227 # command_exec(execMode, 'mkdir -p /dev/vmbus/')228 # command_exec(execMode, 'touch /dev/vmbus/hv_fcopy')229 # command_exec(execMode, 'systemctl start hypervfcopyd.service')230 # command_exec(execMode, 'sleep 1')231 # test1 = reg.exec_test('hypervfcopyd.service', 'systemctl status hypervfcopyd.service', 'output', 'Active: active')232 # testResult.append(test1)233 # command_exec(execMode, 'systemctl stop hypervfcopyd.service')234 # test1 = reg.exec_test('hypervfcopyd.service', 'systemctl status hypervfcopyd.service', 'output', 'Active: inactive')235 # command_exec(execMode, 'rm -rf /dev/vmbus/')236 # testResult.append(test1)237 ##############################################################################################################################################238 # 7.9 ë²ì 239 # command_exec(execMode, 'systemctl start abrtd.service')240 # command_exec(execMode, 'systemctl start abrt-ccpp.service')241 # test1 = reg.exec_test('abrt-ccpp.service', 'systemctl status abrt-ccpp.service', 'output', 'Active: active')242 # testResult.append(test1)243 # command_exec(execMode, 'systemctl stop abrt-ccpp.service')244 # test1 = reg.exec_test('abrt-ccpp.service', 'systemctl status abrt-ccpp.service', 'output', 'Active: inactive')245 # command_exec(execMode, 'systemctl stop abrtd.service')246 # testResult.append(test1)247 #248 # command_exec(execMode, 'systemctl start abrtd.service')249 # command_exec(execMode, 'systemctl start abrt-oops.service')250 # test1 = reg.exec_test('abrt-oops.service', 'systemctl status abrt-oops.service', 'output', 'Active: active')251 # testResult.append(test1)252 # command_exec(execMode, 'systemctl stop abrt-oops.service')253 # test1 = reg.exec_test('abrt-oops.service', 'systemctl status abrt-oops.service', 'output', 'Active: inactive')254 # command_exec(execMode, 'systemctl stop abrtd.service')255 # testResult.append(test1)256 #257 # command_exec(execMode, 'touch /var/crash/test')258 # command_exec(execMode, 'systemctl start abrtd.service')259 # command_exec(execMode, 'systemctl start abrt-vmcore.service')260 # test1 = reg.exec_test('abrt-vmcore.service', 'systemctl status abrt-vmcore.service', 'output', 'Active: active')261 # testResult.append(test1)262 # command_exec(execMode, 'rm -rf /var/crash/test')263 # command_exec(execMode, 'systemctl stop abrtd.service')264 # command_exec(execMode, 'systemctl stop abrt-vmcore.service')265 # test1 = reg.exec_test('abrt-vmcore.service', 'systemctl status abrt-vmcore.service', 'output', 'Active: inactive')266 # testResult.append(test1)267 #268 # command_exec(execMode, 'mv /etc/cloud/cloud-init.disabled /etc/cloud/cloud-init.disabled.bak')269 # command_exec(execMode, 'systemctl start cloud-config.service')270 # test1 = reg.exec_test('cloud-config.service', 'systemctl status cloud-config.service', 'output', 'Active: active')271 # testResult.append(test1)272 # command_exec(execMode, 'systemctl stop cloud-config.service')273 # command_exec(execMode, 'mv /etc/cloud/cloud-init.disabled.bak /etc/cloud/cloud-init.disabled')274 # test1 = reg.exec_test('cloud-config.service', 'systemctl status cloud-config.service', 'output', 'Active: inactive')275 # testResult.append(test1)276 #277 # command_exec(execMode, 'systemctl start cloud-final.service')278 # test1 = reg.exec_test('cloud-final.service', 'systemctl status cloud-final.service', 'output', 'Active: active')279 # testResult.append(test1)280 # command_exec(execMode, 'systemctl stop cloud-final.service')281 # test1 = reg.exec_test('cloud-final.service', 'systemctl status cloud-final.service', 'output', 'Active: inactive')282 # testResult.append(test1)283 #284 # command_exec(execMode, 'systemctl start dbus.service')285 # test1 = reg.exec_test('dbus.service', 'systemctl status dbus.service', 'output', 'Active: active')286 # testResult.append(test1)287 # command_exec(execMode, 'systemctl stop dbus.socket')288 # command_exec(execMode, 'systemctl stop dbus.service')289 # test1 = reg.exec_test('dbus.service', 'systemctl status dbus.service', 'output', 'Active: inactive')290 # command_exec(execMode, 'systemctl start dbus.service')291 # testResult.append(test1)292 #293 # command_exec(execMode, 'mkdir -p /dev/vmbus/')294 # command_exec(execMode, 'touch /dev/vmbus/hv_fcopy')295 # command_exec(execMode, 'systemctl start hypervfcopyd.service')296 # command_exec(execMode, 'sleep 1')297 # test1 = reg.exec_test('hypervfcopyd.service', 'systemctl status hypervfcopyd.service', 'output', 'Active: active')298 # testResult.append(test1)299 # command_exec(execMode, 'systemctl stop hypervfcopyd.service')300 # test1 = reg.exec_test('hypervfcopyd.service', 'systemctl status hypervfcopyd.service', 'output', 'Active: inactive')301 # command_exec(execMode, 'rm -rf /dev/vmbus/')302 # testResult.append(test1)303 # save result to csv304 reg.export_csv(testResult, RESULT_PATH + '/manual_'+VERSION_DETAIL+'_daemon2_result.csv', 'name;result;msg')305 return testResult306if __name__=="__main__":307 makeFolder(RESULT_PATH) # ê²°ê³¼ì ì¥ í´ë ë§ë¤ê¸°...
views.py
Source:views.py
1from django.shortcuts import render2from django.http import HttpRequest3from django.http import HttpResponse4from django.http import JsonResponse5from collections import OrderedDict6from django.http import Http4047from django.contrib.auth.decorators import login_required8import json9import libioc10from libipfw import command_exec11@login_required12def index(request: HttpRequest) -> HttpResponse:13 return render(request, 'firewall/index.html')14def fetch_all_lists(request: HttpRequest) -> JsonResponse:15 firewall = command_exec.IPFW()16 response = firewall.results()17 return JsonResponse(dict(firewall_lists=response))18def add(request: HttpRequest) -> JsonResponse:19 try:20 command: str = ""21 response = json.loads(request.body)22 command = ' '.join([line for line in response.values()])23 firewall = command_exec.IPFW()24 firewall.add(command)25 except (command_exec.errors.AddExecError):26 return HttpResponse('API Error', status=500)27 return HttpResponse('OK')28def delete(request: HttpRequest) -> JsonResponse:29 try:30 command: str = ""31 response = json.loads(request.body)32 command = ' '.join([line for line in response.values()])33 firewall = command_exec.IPFW()34 firewall.delete(command)35 except (command_exec.errors.AddExecError):36 return HttpResponse('API Error', status=500)...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!