For result mount in test-machine to add $RESULT_SERVER, $RESULT_SERVER is written in deploy-cci.yaml, and run clif for update mount.cifs-comment.
Signed-off-by: Hu XueJiao huxuejiao1@huawei.com --- lib/job-init.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/lib/job-init.sh b/lib/job-init.sh index 0732d4b9..eeac693e 100755 --- a/lib/job-init.sh +++ b/lib/job-init.sh @@ -51,11 +51,15 @@ setup_result_service() { [ -n "$result_service" ] && return [ -n "$NO_NETWORK" ] && return 1 + [ -n "$RESULT_SERVER" ] || $RESULT_SERVER=$LKP_SERVER
- supports_netfs 'nfs' && result_service=$LKP_SERVER:/result && return - supports_netfs 'cifs' && result_service=//$LKP_SERVER/result && return - supports_raw_upload && result_service=raw_upload && return + if [ "$os_mount" == 'nfs' ] || [ -z "$os_mount" ]; then + supports_netfs 'nfs' && result_service=$RESULT_SERVER:/result && return + elif [ "$os_mount" == 'cifs' ] || [ -z "$os_mount" ]; then + supports_netfs 'cifs' && result_service=//$RESULT_SERVER/result && return + fi
+ supports_raw_upload && result_service=raw_upload && return return 1 }
@@ -94,7 +98,7 @@ mount_result_root() //*/*) result_fs=cifs modprobe cifs 2>/dev/null - local cifs_mount_option='-o guest' + local cifs_mount_option='-o guest,ro,hard,vers=1.0,noacl,nouser_xattr' [ -n "$LKP_CIFS_PORT" ] && cifs_mount_option="$cifs_mount_option,port=$LKP_CIFS_PORT" mount.cifs $cifs_mount_option $result_service $RESULT_MNT || return ;;