mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Compass-ci

Threads by month
  • ----- 2025 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
compass-ci@openeuler.org

  • 1 participants
  • 5231 discussions
[PATCH v2 lkp-tests] tests/build-pkg: fix syntax errors caused by replacement
by Lin Jiaxin 24 Nov '20

24 Nov '20
error: //PKGBUILD: line 13: syntax error near unexpected token `)' //PKGBUILD: line 13: ` "$_pkgname.desktop")' The original logic only adapts to the situation where source has only one value. Signed-off-by: Lin Jiaxin <ljx.joe(a)qq.com> --- tests/build-pkg | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/build-pkg b/tests/build-pkg index c5d55eda..65c83e22 100755 --- a/tests/build-pkg +++ b/tests/build-pkg @@ -90,6 +90,11 @@ create_softlink() ln -sf "${bm_name}" "${soft_path}/latest.cgz" } +replace_source() +{ + sed -i "s|^source=[^)]*|$1|g" "$2" +} + build_source_pkg() { local repo_dir="" @@ -103,11 +108,9 @@ build_source_pkg() repo_dir="${repo_dir%.git*}::" fi - upstream_source="source=(\"${repo_dir}git://${LKP_SERVER}/${upstream_repo}#commit=${upstream_commit}\")" - sed -i "s|^source=.*|${upstream_source}|g" PKGBUILD - [ -n "$PKGBUILD_TAG" ] && { - sed -i "s|^source=.*|${upstream_source}|g" "PKGBUILD-$PKGBUILD_TAG" - } + upstream_source="source=(\"${repo_dir}git://${LKP_SERVER}/${upstream_repo}#commit=${upstream_commit}\"" + replace_source "${upstream_source}" PKGBUILD + [ -n "$PKGBUILD_TAG" ] && replace_source "${upstream_source}" "PKGBUILD-$PKGBUILD_TAG" } cgz_name="$PKG_MNT/${pack_to}/${pkgname}/${upstream_commit}.cgz" -- 2.23.0
1 0
0 0
[PATCH lkp-tests] lib/job2sh.rb: the job value obtaining logic is modified
by Hu Xuejiao 24 Nov '20

24 Nov '20
[why] the original logic is too round Signed-off-by: Hu XueJiao <1034502035(a)qq.com> --- lib/job2sh.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/job2sh.rb b/lib/job2sh.rb index 14bf7159..7f9cf562 100755 --- a/lib/job2sh.rb +++ b/lib/job2sh.rb @@ -287,9 +287,7 @@ class Job2sh < Job @setups = available_programs(:setup) @programs = available_programs(:workload_elements) - if !job - job = (@jobx || @job).clone # a shallow copy so that delete_if won't impact @job - end + job ||= (@jobx || @job).clone # a shallow copy so that delete_if won't impact @job @cur_func = :extract_stats @@ -317,7 +315,7 @@ class Job2sh < Job @setups = available_programs(:setup) @programs = available_programs(:workload_elements) - if !job + unless job job = (@jobx || @job).clone # a shallow copy so that delete_if won't impact @job job.delete_if { |key, val| parse_one([], key, val, :PASS_EXPORT_ENV) } end -- 2.23.0
1 0
0 0
[PATCH v2 lkp-tests] stats/wrapper support user define file to parse result
by Lu Weitao 23 Nov '20

23 Nov '20
[Why] User need debug their script which haven't commit to lkp-tests/stats [How] lkp-tests/stats/wrapper calls the program-script in result_root if lkp-tests/stats/ have no program-script [Dependence] Write job['define_files'] to file in result_root, job can query from ES DB Signed-off-by: Lu Weitao <luweitaobe(a)163.com> --- stats/wrapper | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stats/wrapper b/stats/wrapper index a44e9f31..d13249d2 100755 --- a/stats/wrapper +++ b/stats/wrapper @@ -140,6 +140,9 @@ check_empty_output check_binary_output tmpfile=$(mktemp -p /tmp -t lkp-stats.XXXXXXXX) + +[[ -f "$RESULT_ROOT/stats/$program" ]] && program_dir="$RESULT_ROOT/stats" + if [[ -f $log ]]; then $program_dir/$program $log < $log > $tmpfile || { log_error "$program_dir/$program $log < $log exit code $?, check $tmpfile"; exit 1; } else -- 2.23.0
2 2
0 0
[PATCH v2 compass-ci 3/3] doc/job/: add define_files.md
by Li Ping 23 Nov '20

23 Nov '20
add a document for introducing the define_files field. Signed-off-by: Li Ping <15396232681(a)163.com> --- doc/job/define_files.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 doc/job/define_files.md diff --git a/doc/job/define_files.md b/doc/job/define_files.md new file mode 100644 index 0000000..2c3457d --- /dev/null +++ b/doc/job/define_files.md @@ -0,0 +1,16 @@ +# define_files + +Meaning: +- We use lkp-tests as client for compass-ci. There are many testcases in lkp-tests. most testcases contain the following files: + distro/depends/$testcase + distro/depends/$testcase-dev + pkg/$testcase/PKGBUILD + stats/$testcase + tests/$testcase + jobs/$testcase.yaml +- When user add new testcase files to lkp-tests or change existing testcase files in lkp-tests, these change files that related with test program would be added to define_files field. +- The define_files field do not need to be specified by user in the $testcase.yaml. It can be generated automatically when user submit with the option '-a'. User can confirm the define_files field in the job.yaml under result_root. + +Usage example: +- % submit -a $testcase.yaml testbox=vm-2p8g--$USER os=openeuler os_arch=aarch64 os_version=20.03 +- % cat /srv/result/$testcase/vm-2p8g--$USER/$date/$job_id/job.yaml -- 2.23.0
1 0
0 0
[PATCH v2 compass-ci 2/3] doc/job/: add initrd_deps.md
by Li Ping 23 Nov '20

23 Nov '20
add a document for introducing initrd_deps field. Signed-off-by: Li Ping <15396232681(a)163.com> --- doc/job/initrd_deps.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/job/initrd_deps.md diff --git a/doc/job/initrd_deps.md b/doc/job/initrd_deps.md new file mode 100644 index 0000000..0c3d79c --- /dev/null +++ b/doc/job/initrd_deps.md @@ -0,0 +1,5 @@ +# initrd_deps + +Meaning: +- Most testcases depend on many other package to run. If user has already packed all the other package for running testcase. Then initrd_deps field would give the location of the package. +- The initrd_deps field do not need to be specified by user in the $testcase yaml. It is filled in by the scheduler. User can get the package through the wget command to check the rpm in compressed package. -- 2.23.0
1 0
0 0
[PATCH v2 compass-ci 1/3] doc/job/: add initrd_pkg.md
by Li Ping 23 Nov '20

23 Nov '20
add a document for introducing the initrd_pkg field. Signed-off-by: Li Ping <15396232681(a)163.com> --- doc/job/initrd_pkg.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/job/initrd_pkg.md diff --git a/doc/job/initrd_pkg.md b/doc/job/initrd_pkg.md new file mode 100644 index 0000000..2ef3d03 --- /dev/null +++ b/doc/job/initrd_pkg.md @@ -0,0 +1,5 @@ +# initrd_pkg + +Meaning: +- Most testcases rely on many other files such as configuration files to run. If user has already packed all the files for running testcase. Then initrd_pkg field would give the location of the packed compression file. +- The initrd_pkg field do not need to be specified by user in the $testcase yaml. It is filled in by the scheduler. User can get the package through the wget command to check the files in compressed package. -- 2.23.0
1 0
0 0
[PATCH compass-ci] scheduler: fix: return ips of all nodes
by Ren Wen 23 Nov '20

23 Nov '20
Return all nodes' ips when request state is "roles_ip". Example: If roles of all nodes are: "server", "client", ... ips of all nodes are: "<ip01>", "<ip02>", ... Then return: sever=<ip01> client=<ip02> ... All nodes will export the return content as environment variables line by line. --- src/scheduler/request_cluster_state.cr | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/scheduler/request_cluster_state.cr b/src/scheduler/request_cluster_state.cr index 5bbbad1..72e3810 100644 --- a/src/scheduler/request_cluster_state.cr +++ b/src/scheduler/request_cluster_state.cr @@ -52,11 +52,16 @@ class Sched "direct_macs" => direct_macs} update_cluster_state(cluster_id, job_id, job_info) when "roles_ip" - role = "server" - role_state = get_role_state(cluster_id, role) - raise "Missing #{role} state in cluster state" unless role_state - return "server=#{role_state["ip"]}\n" \ - "direct_server_ips=#{role_state["direct_ips"]}" + cluster_state = get_cluster_state(cluster_id) + roles_ip = [] of String + + cluster_state.each_value do |host_state| + roles = host_state["roles"] + direct_ips = host_state["direct_ips"] + roles_ip << "#{roles}=#{direct_ips}" + end + + return roles_ip.join('\n') end # show cluster state -- 2.23.0
2 2
0 0
[PATCH compass-ci] lib/job.cr: fix repeated setting job
by Wu Zhende 23 Nov '20

23 Nov '20
Only first time should full initialize the job. Next time function "initialized?" will return true, just to use job_content, don't need to set default values. But now, "kernel_version" will let "initialized?" return false. Fix this. Signed-off-by: Wu Zhende <wuzhende666(a)163.com> --- src/lib/job.cr | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/job.cr b/src/lib/job.cr index 4bef329..512f256 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -63,6 +63,8 @@ class Job set_defaults() end + # Each key must exist after the job is initialized + # Otherwise "initialized"? will return false METHOD_KEYS = %w( id os @@ -91,7 +93,6 @@ class Job kernel_append_root kernel_params docker_image - kernel_version linux_vmlinuz_path linux_modules_initrd linux_headers_initrd @@ -312,7 +313,7 @@ class Job private def set_kernel_version boot_dir = "#{SRV_OS}/#{os_dir}/boot" - suffix = "-#{kernel_version}" if self["kernel_version"]? + suffix = "-#{self["kernel_version"]}" if self["kernel_version"]? self["linux_vmlinuz_path"] = File.real_path("#{boot_dir}/vmlinuz#{suffix}") if "#{os_mount}" == "initramfs" self["linux_modules_initrd"] = File.real_path("#{boot_dir}/modules#{suffix}.cgz") -- 2.23.0
2 1
0 0
[PATCH compass-ci 1/3] doc/job/: add define_files.md
by Li Ping 23 Nov '20

23 Nov '20
add a document for introducing the define_files field. Signed-off-by: Li Ping <15396232681(a)163.com> --- doc/job/define_files.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 doc/job/define_files.md diff --git a/doc/job/define_files.md b/doc/job/define_files.md new file mode 100644 index 0000000..dec74f1 --- /dev/null +++ b/doc/job/define_files.md @@ -0,0 +1,16 @@ +# define_files + +Meaning: +- We use lkp-tests as client for compass-ci. There are many testcases in lkp-tests. most testcases contain the following files: + distro/depends/$testcase + distro/depends/$testcase-dev + pkg/$testcase/PKGBUILD + stats/$testcase + tests/$testcase + jobs/$testcase.yaml +- When user add new testcase files to lkp-tests or change existing testcase files in lkp-tests, these change files that related with test program would be added to define_files field. +- The define_files field do not need to be specified by user in the $testcase.yaml. It can be generated automatically by the scheduler when user submit with the option '-a'. User can confirm the define_files field in the job.yaml under result_root. + +Usage example: +- % submit -a $testcase.yaml testbox=vm-2p8g--$USER os=openeuler os_arch=aarch64 os_version=20.03 +- % cat /srv/result/$testcase/vm-2p8g--$USER/$date/$job_id/job.yaml -- 2.23.0
2 2
0 0
[PATCH compass-ci 2/2] lib/json_logger.cr: add a new class for json log
by Wu Zhende 23 Nov '20

23 Nov '20
[Why] The built-in log system prints logs in string format by default. The logs should be formatted in json format for subsequent analysis and processing. [Example1] use: log.info("test") output: {"level":"INFO","level_num":1,"time":"2020-11-19 16:57:17+0800","progname":"test","message":"test"} [Example2] use: log.error({"job_id" => "1", "job_state" => "submit"}.to_json) output: {"level":"ERROR","level_num":3,"datetime":"2020-11-19 16:57:17+0800","progname":"test", "job_id":"1","job_state":"submit","caller":["./test.rb:6:in`<main>'"]} Signed-off-by: Wu Zhende <wuzhende666(a)163.com> --- src/lib/json_logger.cr | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 src/lib/json_logger.cr diff --git a/src/lib/json_logger.cr b/src/lib/json_logger.cr new file mode 100755 index 0000000..371c042 --- /dev/null +++ b/src/lib/json_logger.cr @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. + +require "logger" +require "json" +require "any_merge" + +class JSONLogger < Logger + FORMATTER = Logger::Formatter.new do | severity, datetime, progname, msg, io| + level_num = severity.to_i32 + logger_hash = JSON.parse(%({"level_num": #{level_num}, + "level": "#{severity}", + "time": "#{datetime}" + })).as_h + + logger_hash.any_merge!({"progname" => progname}) unless progname.empty? + logger_hash.merge!(JSON.parse(%({"caller": #{caller}})).as_h) if level_num >= 2 + + begin + message = JSON.parse(msg).as_h + rescue + message = {"message" => msg} + end + logger_hash.any_merge!(message) + + io << logger_hash.to_json + end + + def initialize(logdev = STDOUT, formatter = FORMATTER) + super(logdev, formatter: formatter) + end +end -- 2.23.0
2 1
0 0
  • ← Newer
  • 1
  • ...
  • 361
  • 362
  • 363
  • 364
  • 365
  • 366
  • 367
  • ...
  • 524
  • Older →

HyperKitty Powered by HyperKitty