From e2f34056dea230b5344a1ce4bcc8d9a0395067f1 Mon Sep 17 00:00:00 2001 From: laokz Date: Mon, 4 Sep 2023 06:05:02 +0000 Subject: [PATCH] =?UTF-8?q?=E5=8F=8D=E9=A6=88os-basic/oe=5Ftest=5Fserver?= =?UTF-8?q?=5Fopenssh=5Fkey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: laokz --- .../2023-09-01-11:09:56.log | 298 +++++++++--------- 1 file changed, 151 insertions(+), 147 deletions(-) diff --git a/Round1/OERV2309_V2_Mugen_Fail/mugen-riscv/logs/os-basic/oe_test_server_openssh_key/2023-09-01-11:09:56.log b/Round1/OERV2309_V2_Mugen_Fail/mugen-riscv/logs/os-basic/oe_test_server_openssh_key/2023-09-01-11:09:56.log index 058ae8f7..77b9e359 100644 --- a/Round1/OERV2309_V2_Mugen_Fail/mugen-riscv/logs/os-basic/oe_test_server_openssh_key/2023-09-01-11:09:56.log +++ b/Round1/OERV2309_V2_Mugen_Fail/mugen-riscv/logs/os-basic/oe_test_server_openssh_key/2023-09-01-11:09:56.log @@ -1,55 +1,57 @@ -+ source /root/mugen-riscv/libs/locallibs/common_lib.sh -++ python3 --version -++ '[' 0 -eq 0 ']' -++ source /root/mugen-riscv/libs/locallibs/common_lib_python.sh -+ main -++ type -t post_test -+ '[' -n function ']' -+ trap post_test EXIT INT HUP TERM -+ rpm -qa -+ grep expect -++ type -t config_params -+ '[' -n '' ']' -++ type -t pre_test -+ '[' -n function ']' -+ pre_test -+ LOG_INFO 'Start to prepare the test environment.' -+ message='Start to prepare the test environment.' -+ python3 /root/mugen-riscv/libs/locallibs/mugen_log.py --level info --message 'Start to prepare the test environment.' -Fri Sep 1 11:09:58 2023 - INFO - Start to prepare the test environment. -+ DNF_INSTALL 'openssh-server openssh-clients openssh' -+ pkgs='openssh-server openssh-clients openssh' -+ node=1 -+ '[' -z '' ']' -+ tmpfile= -++ python3 /root/mugen-riscv/libs/locallibs/rpm_manage.py install --pkgs 'openssh-server openssh-clients openssh' --node 1 --tempfile '' -Fri Sep 1 11:10:04 2023 - INFO - pkgs:(openssh-server openssh-clients openssh) is already installed -+ tmpfile2= -+ '[' -z '' ']' -+ tmpfile= -+ LOG_INFO 'End to prepare the test environment.' -+ message='End to prepare the test environment.' -+ python3 /root/mugen-riscv/libs/locallibs/mugen_log.py --level info --message 'End to prepare the test environment.' -Fri Sep 1 11:10:04 2023 - INFO - End to prepare the test environment. -++ type -t run_test -+ '[' -n function ']' -+ run_test -+ LOG_INFO 'Start to run test.' -+ message='Start to run test.' -+ python3 /root/mugen-riscv/libs/locallibs/mugen_log.py --level info --message 'Start to run test.' -Fri Sep 1 11:10:05 2023 - INFO - Start to run test. -+ expect -c ' - set timeout 30 - log_file testlog1 - spawn ssh-keygen -t ecdsa - expect { - "Enter*" {send "\n\r" - expect "Enter*" {send "\n\r"} - expect "Enter*" {send "\n\r"} - } - } - expect eof - ' +# 未复现出这个失败。请检查两台测试机的配置 + ++ source /root/mugen-riscv/libs/locallibs/common_lib.sh +++ python3 --version +++ '[' 0 -eq 0 ']' +++ source /root/mugen-riscv/libs/locallibs/common_lib_python.sh ++ main +++ type -t post_test ++ '[' -n function ']' ++ trap post_test EXIT INT HUP TERM ++ rpm -qa ++ grep expect +++ type -t config_params ++ '[' -n '' ']' +++ type -t pre_test ++ '[' -n function ']' ++ pre_test ++ LOG_INFO 'Start to prepare the test environment.' ++ message='Start to prepare the test environment.' ++ python3 /root/mugen-riscv/libs/locallibs/mugen_log.py --level info --message 'Start to prepare the test environment.' +Fri Sep 1 11:09:58 2023 - INFO - Start to prepare the test environment. ++ DNF_INSTALL 'openssh-server openssh-clients openssh' ++ pkgs='openssh-server openssh-clients openssh' ++ node=1 ++ '[' -z '' ']' ++ tmpfile= +++ python3 /root/mugen-riscv/libs/locallibs/rpm_manage.py install --pkgs 'openssh-server openssh-clients openssh' --node 1 --tempfile '' +Fri Sep 1 11:10:04 2023 - INFO - pkgs:(openssh-server openssh-clients openssh) is already installed ++ tmpfile2= ++ '[' -z '' ']' ++ tmpfile= ++ LOG_INFO 'End to prepare the test environment.' ++ message='End to prepare the test environment.' ++ python3 /root/mugen-riscv/libs/locallibs/mugen_log.py --level info --message 'End to prepare the test environment.' +Fri Sep 1 11:10:04 2023 - INFO - End to prepare the test environment. +++ type -t run_test ++ '[' -n function ']' ++ run_test ++ LOG_INFO 'Start to run test.' ++ message='Start to run test.' ++ python3 /root/mugen-riscv/libs/locallibs/mugen_log.py --level info --message 'Start to run test.' +Fri Sep 1 11:10:05 2023 - INFO - Start to run test. ++ expect -c ' + set timeout 30 + log_file testlog1 + spawn ssh-keygen -t ecdsa + expect { + "Enter*" {send "\n\r" + expect "Enter*" {send "\n\r"} + expect "Enter*" {send "\n\r"} + } + } + expect eof + ' spawn ssh-keygen -t ecdsa Generating public/private ecdsa key pair. Enter file in which to save the key (/root/.ssh/id_ecdsa): @@ -72,106 +74,108 @@ The key's randomart image is: |+.*..+.. . | |.o.o.o. | +----[SHA256]-----+ -+ grep -i 'error|fail|while executing' testlog1 -+ CHECK_RESULT 1 1 -+ actual_result=1 -+ expect_result=1 -+ mode=0 -+ error_log= -+ '[' -z 1 ']' -+ '[' 0 -eq 0 ']' -+ test 1x '!=' 1x -+ return 0 -+ expect -c ' - set timeout 30 - log_file testlog2 - spawn ssh-copy-id root@ - expect { - "*password*" {send "\r" - } - } - expect eof - ' ++ grep -i 'error|fail|while executing' testlog1 ++ CHECK_RESULT 1 1 ++ actual_result=1 ++ expect_result=1 ++ mode=0 ++ error_log= ++ '[' -z 1 ']' ++ '[' 0 -eq 0 ']' ++ test 1x '!=' 1x ++ return 0 ++ expect -c ' + set timeout 30 + log_file testlog2 + spawn ssh-copy-id root@ + expect { + "*password*" {send "\r" + } + } + expect eof + ' spawn ssh-copy-id root@ /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_ecdsa.pub" /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed -/usr/bin/ssh-copy-id: ERROR: ssh: Could not resolve hostname : Name or service not known +/usr/bin/ssh-copy-id: ERROR: ssh: Could not resolve hostname : Name or service not known + -expect: spawn id exp5 not open - while executing +expect: spawn id exp5 not open + while executing "expect eof" -+ grep -i 'error|fail|while executing' testlog2 -+ CHECK_RESULT 1 1 -+ actual_result=1 -+ expect_result=1 -+ mode=0 -+ error_log= -+ '[' -z 1 ']' -+ '[' 0 -eq 0 ']' -+ test 1x '!=' 1x -+ return 0 -+ expect -c ' - set timeout 30 - log_file testlog3 - spawn ssh root@ - expect { - "root*" {send "exit\r" - } - } - expect eof - ' ++ grep -i 'error|fail|while executing' testlog2 ++ CHECK_RESULT 1 1 ++ actual_result=1 ++ expect_result=1 ++ mode=0 ++ error_log= ++ '[' -z 1 ']' ++ '[' 0 -eq 0 ']' ++ test 1x '!=' 1x ++ return 0 ++ expect -c ' + set timeout 30 + log_file testlog3 + spawn ssh root@ + expect { + "root*" {send "exit\r" + } + } + expect eof + ' spawn ssh root@ -ssh: Could not resolve hostname : Name or service not known -expect: spawn id exp5 not open - while executing +ssh: Could not resolve hostname : Name or service not known + +expect: spawn id exp5 not open + while executing "expect eof" -+ grep -i 'error|fail|while executing' testlog3 -+ CHECK_RESULT 1 1 -+ actual_result=1 -+ expect_result=1 -+ mode=0 -+ error_log= -+ '[' -z 1 ']' -+ '[' 0 -eq 0 ']' -+ test 1x '!=' 1x -+ return 0 -+ LOG_INFO 'End to run test.' -+ message='End to run test.' -+ python3 /root/mugen-riscv/libs/locallibs/mugen_log.py --level info --message 'End to run test.' -Fri Sep 1 11:10:07 2023 - INFO - End to run test. -+ CASE_RESULT 0 -+ case_re=0 -+ test -z '' -+ test 0 -eq 0 -+ LOG_INFO 'succeed to execute the case.' -+ message='succeed to execute the case.' -+ python3 /root/mugen-riscv/libs/locallibs/mugen_log.py --level info --message 'succeed to execute the case.' -Fri Sep 1 11:10:07 2023 - INFO - succeed to execute the case. -+ exec_result= -+ exit 0 -+ post_test -+ LOG_INFO 'Start to restores the test environment.' -+ message='Start to restores the test environment.' -+ python3 /root/mugen-riscv/libs/locallibs/mugen_log.py --level info --message 'Start to restores the test environment.' -Fri Sep 1 11:10:07 2023 - INFO - Start to restores the test environment. -+ SSH_CMD 'rm -rf /root/.ssh/authorized_keys' -+ cmd='rm -rf /root/.ssh/authorized_keys' -+ remoteip= -+ remotepasswd='openEuler12#$' -+ remoteuser=root -+ timeout=300 -+ connport=22 -+ bash /root/mugen-riscv/libs/locallibs/sshcmd.sh -c 'rm -rf /root/.ssh/authorized_keys' -i '' -u root -p 'openEuler12#$' -t 300 -o 22 -Usage: sshcmd.sh -c "command" -i "remote machinet ip" [-u login_user] [-p login_password] [-o port] [-t timeout]+ ret=1 -+ test 1 -ne 0 -+ LOG_ERROR 'Failed in remote CMD operation:1' -+ message='Failed in remote CMD operation:1' -+ python3 /root/mugen-riscv/libs/locallibs/mugen_log.py --level error --message 'Failed in remote CMD operation:1' -Fri Sep 1 11:10:08 2023 - ERROR - Failed in remote CMD operation:1 -+ return 1 -+ rm -rf testlog1 testlog2 testlog3 -+ LOG_INFO 'End to restore the test environment.' -+ message='End to restore the test environment.' -+ python3 /root/mugen-riscv/libs/locallibs/mugen_log.py --level info --message 'End to restore the test environment.' -Fri Sep 1 11:10:08 2023 - INFO - End to restore the test environment. ++ grep -i 'error|fail|while executing' testlog3 ++ CHECK_RESULT 1 1 ++ actual_result=1 ++ expect_result=1 ++ mode=0 ++ error_log= ++ '[' -z 1 ']' ++ '[' 0 -eq 0 ']' ++ test 1x '!=' 1x ++ return 0 ++ LOG_INFO 'End to run test.' ++ message='End to run test.' ++ python3 /root/mugen-riscv/libs/locallibs/mugen_log.py --level info --message 'End to run test.' +Fri Sep 1 11:10:07 2023 - INFO - End to run test. ++ CASE_RESULT 0 ++ case_re=0 ++ test -z '' ++ test 0 -eq 0 ++ LOG_INFO 'succeed to execute the case.' ++ message='succeed to execute the case.' ++ python3 /root/mugen-riscv/libs/locallibs/mugen_log.py --level info --message 'succeed to execute the case.' +Fri Sep 1 11:10:07 2023 - INFO - succeed to execute the case. ++ exec_result= ++ exit 0 ++ post_test ++ LOG_INFO 'Start to restores the test environment.' ++ message='Start to restores the test environment.' ++ python3 /root/mugen-riscv/libs/locallibs/mugen_log.py --level info --message 'Start to restores the test environment.' +Fri Sep 1 11:10:07 2023 - INFO - Start to restores the test environment. ++ SSH_CMD 'rm -rf /root/.ssh/authorized_keys' ++ cmd='rm -rf /root/.ssh/authorized_keys' ++ remoteip= ++ remotepasswd='openEuler12#$' ++ remoteuser=root ++ timeout=300 ++ connport=22 ++ bash /root/mugen-riscv/libs/locallibs/sshcmd.sh -c 'rm -rf /root/.ssh/authorized_keys' -i '' -u root -p 'openEuler12#$' -t 300 -o 22 +Usage: sshcmd.sh -c "command" -i "remote machinet ip" [-u login_user] [-p login_password] [-o port] [-t timeout]+ ret=1 ++ test 1 -ne 0 ++ LOG_ERROR 'Failed in remote CMD operation:1' ++ message='Failed in remote CMD operation:1' ++ python3 /root/mugen-riscv/libs/locallibs/mugen_log.py --level error --message 'Failed in remote CMD operation:1' +Fri Sep 1 11:10:08 2023 - ERROR - Failed in remote CMD operation:1 ++ return 1 ++ rm -rf testlog1 testlog2 testlog3 ++ LOG_INFO 'End to restore the test environment.' ++ message='End to restore the test environment.' ++ python3 /root/mugen-riscv/libs/locallibs/mugen_log.py --level info --message 'End to restore the test environment.' +Fri Sep 1 11:10:08 2023 - INFO - End to restore the test environment. -- Gitee