diff --git a/testcase/libmicro/libmicro-args-sched.csv b/testcase/libmicro/libmicro-args-sched.csv new file mode 100644 index 0000000000000000000000000000000000000000..f72454bba4e20b5f82f818ca662adde7499e1dda --- /dev/null +++ b/testcase/libmicro/libmicro-args-sched.csv @@ -0,0 +1,41 @@ +工具名称,子系统,权重,test_name,processes,threads,iterations,count,sync +libmicro,sched,0.104801,fork,6,1,5,10,1 +libmicro,sched,0.104801,fork,3,2,5,10,1 +libmicro,sched,0.104801,pthread_create,1,6,5,10,1 +libmicro,sched,0.104801,pthread_create,2,3,5,10,1 +libmicro,sched,0.064904,fork,1,18,5,10,1 +libmicro,sched,0.064904,fork,6,3,5,10,1 +libmicro,sched,0.064904,pthread_create,1,19,5,10,1 +libmicro,sched,0.064904,pthread_create,19,1,5,10,1 +libmicro,sched,0.034818,fork,4,8,5,10,1 +libmicro,sched,0.034818,fork,16,2,5,10,1 +libmicro,sched,0.034818,pthread_create,2,16,5,10,1 +libmicro,sched,0.034818,pthread_create,8,4,5,10,1 +libmicro,sched,0.019003,fork,5,9,5,10,1 +libmicro,sched,0.019003,fork,9,5,5,10,1 +libmicro,sched,0.019003,pthread_create,3,15,5,10,1 +libmicro,sched,0.019003,pthread_create,11,4,5,10,1 +libmicro,sched,0.010617,fork,2,29,5,10,1 +libmicro,sched,0.010617,fork,1,59,5,10,1 +libmicro,sched,0.010617,pthread_create,59,1,5,10,1 +libmicro,sched,0.010617,pthread_create,15,4,5,10,1 +libmicro,sched,0.006726,fork,6,12,5,10,1 +libmicro,sched,0.006726,fork,24,3,5,10,1 +libmicro,sched,0.006726,pthread_create,4,18,5,10,1 +libmicro,sched,0.006726,pthread_create,18,4,5,10,1 +libmicro,sched,0.003729,fork,85,1,5,10,1 +libmicro,sched,0.003729,fork,17,5,5,10,1 +libmicro,sched,0.003729,pthread_create,5,17,5,10,1 +libmicro,sched,0.003729,pthread_create,21,4,5,10,1 +libmicro,sched,0.001972,fork,7,14,5,10,1 +libmicro,sched,0.001972,fork,49,2,5,10,1 +libmicro,sched,0.001972,pthread_create,6,16,5,10,1 +libmicro,sched,0.001972,pthread_create,24,4,5,10,1 +libmicro,sched,0.001084,fork,111,1,5,10,1 +libmicro,sched,0.001084,fork,37,3,5,10,1 +libmicro,sched,0.001084,pthread_create,7,16,5,10,1 +libmicro,sched,0.001084,pthread_create,28,4,5,10,1 +libmicro,sched,0.000791,fork,4,31,5,10,1 +libmicro,sched,0.000791,fork,62,2,5,10,1 +libmicro,sched,0.000791,pthread_create,8,16,5,10,1 +libmicro,sched,0.000791,pthread_create,31,4,5,10,1 diff --git a/testcase/libmicro/libmicro-tune.csv b/testcase/libmicro/libmicro-tune.csv new file mode 100644 index 0000000000000000000000000000000000000000..f51d340244d6b182ac08c3291273e869fb86f91b --- /dev/null +++ b/testcase/libmicro/libmicro-tune.csv @@ -0,0 +1,42 @@ +# libmicro pthread_create/fork 用例稳定性参数配置 +# 格式: 用例名称,warmup,run_loop,result_select_percent +tperf-libmicro-co10-it5-pr6-sy1-tnfork-th1,1,10,80 +tperf-libmicro-co10-it5-pr3-sy1-tnfork-th2,1,10,80 +tperf-libmicro-co10-it5-pr1-sy1-tnpthread_create-th6,1,10,80 +tperf-libmicro-co10-it5-pr2-sy1-tnpthread_create-th3,1,10,80 +tperf-libmicro-co10-it5-pr1-sy1-tnfork-th18,1,10,80 +tperf-libmicro-co10-it5-pr6-sy1-tnfork-th3,1,10,80 +tperf-libmicro-co10-it5-pr1-sy1-tnpthread_create-th19,1,10,80 +tperf-libmicro-co10-it5-pr19-sy1-tnpthread_create-th1,1,10,80 +tperf-libmicro-co10-it5-pr4-sy1-tnfork-th8,1,10,80 +tperf-libmicro-co10-it5-pr16-sy1-tnfork-th2,1,10,80 +tperf-libmicro-co10-it5-pr2-sy1-tnpthread_create-th16,1,10,80 +tperf-libmicro-co10-it5-pr8-sy1-tnpthread_create-th4,1,10,80 +tperf-libmicro-co10-it5-pr5-sy1-tnfork-th9,1,10,80 +tperf-libmicro-co10-it5-pr9-sy1-tnfork-th5,1,10,80 +tperf-libmicro-co10-it5-pr3-sy1-tnpthread_create-th15,1,10,80 +tperf-libmicro-co10-it5-pr11-sy1-tnpthread_create-th4,1,10,80 +tperf-libmicro-co10-it5-pr2-sy1-tnfork-th29,1,10,80 +tperf-libmicro-co10-it5-pr1-sy1-tnfork-th59,1,10,80 +tperf-libmicro-co10-it5-pr59-sy1-tnpthread_create-th1,1,10,80 +tperf-libmicro-co10-it5-pr15-sy1-tnpthread_create-th4,1,10,80 +tperf-libmicro-co10-it5-pr6-sy1-tnfork-th12,1,10,80 +tperf-libmicro-co10-it5-pr24-sy1-tnfork-th3,1,10,80 +tperf-libmicro-co10-it5-pr4-sy1-tnpthread_create-th18,1,10,80 +tperf-libmicro-co10-it5-pr18-sy1-tnpthread_create-th4,1,10,80 +tperf-libmicro-co10-it5-pr85-sy1-tnfork-th1,1,10,80 +tperf-libmicro-co10-it5-pr17-sy1-tnfork-th5,1,10,80 +tperf-libmicro-co10-it5-pr5-sy1-tnpthread_create-th17,1,10,80 +tperf-libmicro-co10-it5-pr21-sy1-tnpthread_create-th4,1,10,80 +tperf-libmicro-co10-it5-pr7-sy1-tnfork-th14,1,10,80 +tperf-libmicro-co10-it5-pr49-sy1-tnfork-th2,1,10,80 +tperf-libmicro-co10-it5-pr6-sy1-tnpthread_create-th16,1,10,80 +tperf-libmicro-co10-it5-pr24-sy1-tnpthread_create-th4,1,10,80 +tperf-libmicro-co10-it5-pr111-sy1-tnfork-th1,1,10,80 +tperf-libmicro-co10-it5-pr37-sy1-tnfork-th3,1,10,80 +tperf-libmicro-co10-it5-pr7-sy1-tnpthread_create-th16,1,10,80 +tperf-libmicro-co10-it5-pr28-sy1-tnpthread_create-th4,1,10,80 +tperf-libmicro-co10-it5-pr4-sy1-tnfork-th31,1,10,80 +tperf-libmicro-co10-it5-pr62-sy1-tnfork-th2,1,10,80 +tperf-libmicro-co10-it5-pr8-sy1-tnpthread_create-th16,1,10,80 +tperf-libmicro-co10-it5-pr31-sy1-tnpthread_create-th4,1,10,80 diff --git a/testcase/libmicro/libmicro.py b/testcase/libmicro/libmicro.py new file mode 100644 index 0000000000000000000000000000000000000000..b3efb7c8aebde5410c45de432839b44886d74996 --- /dev/null +++ b/testcase/libmicro/libmicro.py @@ -0,0 +1,69 @@ +#!/usr/bin/python3 +# coding: utf-8 +# Desc: libmicro pthread_create/fork 工具类,供 parse-csv2case.py 通用框架调用 +# +# 内部委托给 lib.ts_common.PerfLibMicro,确保生成的 case +# 与老 case (tperf-libmicro-pthread-*.py / tperf-libmicro-fork-*.py) 行为完全一致。 +# +# CSV 参数列名与 __init__ 参数名的对应关系: +# test_name → test_name (pthread_create / fork) +# processes → processes (-P) +# threads → threads (-T) +# iterations → iterations (-B) +# count → count (-C) +# sync → sync (-S, 1=启用) + +import os +import sys + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) + +from common.lib.benchmark import TSTPerf # noqa: E402 +from lib.ts_common import PerfLibMicro # noqa: E402 + + +class PerfLibmicro(TSTPerf): + """libmicro pthread_create/fork 工具类 — 委托给 PerfLibMicro + + 接收 parse-csv2case.py 传入的 CSV 字符串参数, + 拼接为 test_opt 和 tool_path 后委托给 PerfLibMicro。 + """ + + def __init__( + self, + tc_name: str, + test_name: str = "pthread_create", + processes: str = "1", + threads: str = "4", + iterations: str = "5", + count: str = "10", + sync: str = "1", + ): + super().__init__() + test_opt = f"-P {processes} -T {threads} -B {iterations} -C {count}" + if str(sync).strip() == "1": + test_opt += " -S" + tool_path = f"tools/libmicro.install/build/{test_name}" + self._impl = PerfLibMicro( + name=tc_name, + label="L0:调度", + test_opt=test_opt, + tool_path=tool_path, + ) + + def prepare(self): + return self._impl.prepare() + + def benchmark(self): + return self._impl.benchmark() + + def parse_test_data(self): + return self._impl.parse_test_data() + + def cleanup(self): + return self._impl.cleanup() diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr1-sy1-tnfork-th18.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr1-sy1-tnfork-th18.py new file mode 100755 index 0000000000000000000000000000000000000000..c382c81c838886b60d819e0c950409209c818d21 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr1-sy1-tnfork-th18.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 1ddfa6f206a6f92c + @用例名称: tperf-libmicro-co10-it5-pr1-sy1-tnfork-th18 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=fork,processes=1,threads=18,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="fork", + processes="1", + threads="18", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=fork,processes=1,threads=18,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr1-sy1-tnfork-th59.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr1-sy1-tnfork-th59.py new file mode 100755 index 0000000000000000000000000000000000000000..738a7ac4f7cfd9b534a7eff35cc06edb5f85e051 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr1-sy1-tnfork-th59.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: b0de8d9e98c5eaf6 + @用例名称: tperf-libmicro-co10-it5-pr1-sy1-tnfork-th59 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=fork,processes=1,threads=59,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="fork", + processes="1", + threads="59", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=fork,processes=1,threads=59,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr1-sy1-tnpthread_create-th19.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr1-sy1-tnpthread_create-th19.py new file mode 100755 index 0000000000000000000000000000000000000000..9f2349ceb212aa925bba57af570cf79b30f14c22 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr1-sy1-tnpthread_create-th19.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: ed7bded245ba8e4c + @用例名称: tperf-libmicro-co10-it5-pr1-sy1-tnpthread_create-th19 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=pthread_create,processes=1,threads=19,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="pthread_create", + processes="1", + threads="19", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=pthread_create,processes=1,threads=19,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr1-sy1-tnpthread_create-th6.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr1-sy1-tnpthread_create-th6.py new file mode 100755 index 0000000000000000000000000000000000000000..d53a5f99e8c8ceb8779b79eee239e241219d811d --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr1-sy1-tnpthread_create-th6.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 38f6aef294c4a298 + @用例名称: tperf-libmicro-co10-it5-pr1-sy1-tnpthread_create-th6 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=pthread_create,processes=1,threads=6,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="pthread_create", + processes="1", + threads="6", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=pthread_create,processes=1,threads=6,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr11-sy1-tnpthread_create-th4.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr11-sy1-tnpthread_create-th4.py new file mode 100755 index 0000000000000000000000000000000000000000..ad0d91779ae5367f3aef813d7596737752e4fc0c --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr11-sy1-tnpthread_create-th4.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 576a35fbaf5e3547 + @用例名称: tperf-libmicro-co10-it5-pr11-sy1-tnpthread_create-th4 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=pthread_create,processes=11,threads=4,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="pthread_create", + processes="11", + threads="4", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=pthread_create,processes=11,threads=4,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr111-sy1-tnfork-th1.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr111-sy1-tnfork-th1.py new file mode 100755 index 0000000000000000000000000000000000000000..debf826cf043efc58a06cbd12931bd9e64bfaa46 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr111-sy1-tnfork-th1.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: e28d89e9d9e6b95e + @用例名称: tperf-libmicro-co10-it5-pr111-sy1-tnfork-th1 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=fork,processes=111,threads=1,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="fork", + processes="111", + threads="1", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=fork,processes=111,threads=1,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr15-sy1-tnpthread_create-th4.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr15-sy1-tnpthread_create-th4.py new file mode 100755 index 0000000000000000000000000000000000000000..dedfd79b0f6f6aaaf31eb56fc6f42870bd9d5440 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr15-sy1-tnpthread_create-th4.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 269c69e96acb6901 + @用例名称: tperf-libmicro-co10-it5-pr15-sy1-tnpthread_create-th4 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=pthread_create,processes=15,threads=4,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="pthread_create", + processes="15", + threads="4", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=pthread_create,processes=15,threads=4,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr16-sy1-tnfork-th2.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr16-sy1-tnfork-th2.py new file mode 100755 index 0000000000000000000000000000000000000000..0ca6f2300bb5c46e2d889dad96ab01b7fd8a89be --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr16-sy1-tnfork-th2.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 83b54118f3f8cb26 + @用例名称: tperf-libmicro-co10-it5-pr16-sy1-tnfork-th2 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=fork,processes=16,threads=2,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="fork", + processes="16", + threads="2", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=fork,processes=16,threads=2,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr17-sy1-tnfork-th5.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr17-sy1-tnfork-th5.py new file mode 100755 index 0000000000000000000000000000000000000000..b10dd2e864d03e4df2cce3512212d04c1933f888 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr17-sy1-tnfork-th5.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: c0636715506f5e43 + @用例名称: tperf-libmicro-co10-it5-pr17-sy1-tnfork-th5 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=fork,processes=17,threads=5,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="fork", + processes="17", + threads="5", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=fork,processes=17,threads=5,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr18-sy1-tnpthread_create-th4.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr18-sy1-tnpthread_create-th4.py new file mode 100755 index 0000000000000000000000000000000000000000..6792538816a86f3370baf3b6d6c1243f8d22c123 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr18-sy1-tnpthread_create-th4.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 18103e7fb81badd4 + @用例名称: tperf-libmicro-co10-it5-pr18-sy1-tnpthread_create-th4 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=pthread_create,processes=18,threads=4,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="pthread_create", + processes="18", + threads="4", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=pthread_create,processes=18,threads=4,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr19-sy1-tnpthread_create-th1.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr19-sy1-tnpthread_create-th1.py new file mode 100755 index 0000000000000000000000000000000000000000..fddd5ba11783cae4a4206ed15806b3217aeea866 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr19-sy1-tnpthread_create-th1.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: ab84a09eceef6121 + @用例名称: tperf-libmicro-co10-it5-pr19-sy1-tnpthread_create-th1 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=pthread_create,processes=19,threads=1,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="pthread_create", + processes="19", + threads="1", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=pthread_create,processes=19,threads=1,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr2-sy1-tnfork-th29.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr2-sy1-tnfork-th29.py new file mode 100755 index 0000000000000000000000000000000000000000..bc20d9c83c7f0f230a7212298c3d024016463409 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr2-sy1-tnfork-th29.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 7c15b436995ad3c3 + @用例名称: tperf-libmicro-co10-it5-pr2-sy1-tnfork-th29 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=fork,processes=2,threads=29,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="fork", + processes="2", + threads="29", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=fork,processes=2,threads=29,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr2-sy1-tnpthread_create-th16.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr2-sy1-tnpthread_create-th16.py new file mode 100755 index 0000000000000000000000000000000000000000..0304e9492357b419c11d63d72b11081f647c97b3 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr2-sy1-tnpthread_create-th16.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: c5f2984dab133ff9 + @用例名称: tperf-libmicro-co10-it5-pr2-sy1-tnpthread_create-th16 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=pthread_create,processes=2,threads=16,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="pthread_create", + processes="2", + threads="16", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=pthread_create,processes=2,threads=16,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr2-sy1-tnpthread_create-th3.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr2-sy1-tnpthread_create-th3.py new file mode 100755 index 0000000000000000000000000000000000000000..0d8e65482e662bae87f2028554fd6c49c0c79972 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr2-sy1-tnpthread_create-th3.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 3b303932e949c9a5 + @用例名称: tperf-libmicro-co10-it5-pr2-sy1-tnpthread_create-th3 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=pthread_create,processes=2,threads=3,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="pthread_create", + processes="2", + threads="3", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=pthread_create,processes=2,threads=3,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr21-sy1-tnpthread_create-th4.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr21-sy1-tnpthread_create-th4.py new file mode 100755 index 0000000000000000000000000000000000000000..86172f9162305a39f51d3ca534eb276411c588e3 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr21-sy1-tnpthread_create-th4.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 1dcadf98fbcb594e + @用例名称: tperf-libmicro-co10-it5-pr21-sy1-tnpthread_create-th4 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=pthread_create,processes=21,threads=4,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="pthread_create", + processes="21", + threads="4", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=pthread_create,processes=21,threads=4,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr24-sy1-tnfork-th3.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr24-sy1-tnfork-th3.py new file mode 100755 index 0000000000000000000000000000000000000000..49c63f79f1b205aa31135d4c7b4e7cf3f2458751 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr24-sy1-tnfork-th3.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 78e2fb33de6fd443 + @用例名称: tperf-libmicro-co10-it5-pr24-sy1-tnfork-th3 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=fork,processes=24,threads=3,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="fork", + processes="24", + threads="3", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=fork,processes=24,threads=3,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr24-sy1-tnpthread_create-th4.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr24-sy1-tnpthread_create-th4.py new file mode 100755 index 0000000000000000000000000000000000000000..35cc7f262a9e598e6be40919f18f40a353f55766 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr24-sy1-tnpthread_create-th4.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 829b5a08cd169311 + @用例名称: tperf-libmicro-co10-it5-pr24-sy1-tnpthread_create-th4 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=pthread_create,processes=24,threads=4,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="pthread_create", + processes="24", + threads="4", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=pthread_create,processes=24,threads=4,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr28-sy1-tnpthread_create-th4.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr28-sy1-tnpthread_create-th4.py new file mode 100755 index 0000000000000000000000000000000000000000..126277b9af5e8d71217da6c2a725115488650bff --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr28-sy1-tnpthread_create-th4.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 060d984453ea70ce + @用例名称: tperf-libmicro-co10-it5-pr28-sy1-tnpthread_create-th4 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=pthread_create,processes=28,threads=4,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="pthread_create", + processes="28", + threads="4", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=pthread_create,processes=28,threads=4,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr3-sy1-tnfork-th2.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr3-sy1-tnfork-th2.py new file mode 100755 index 0000000000000000000000000000000000000000..114d05f738d728ae10bf025b322167582f73ee0d --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr3-sy1-tnfork-th2.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 7716395d98115ce1 + @用例名称: tperf-libmicro-co10-it5-pr3-sy1-tnfork-th2 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=fork,processes=3,threads=2,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="fork", + processes="3", + threads="2", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=fork,processes=3,threads=2,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr3-sy1-tnpthread_create-th15.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr3-sy1-tnpthread_create-th15.py new file mode 100755 index 0000000000000000000000000000000000000000..a21b128c5181586bae82cb1469f12cde13e19a01 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr3-sy1-tnpthread_create-th15.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: cf51051bc975e547 + @用例名称: tperf-libmicro-co10-it5-pr3-sy1-tnpthread_create-th15 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=pthread_create,processes=3,threads=15,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="pthread_create", + processes="3", + threads="15", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=pthread_create,processes=3,threads=15,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr31-sy1-tnpthread_create-th4.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr31-sy1-tnpthread_create-th4.py new file mode 100755 index 0000000000000000000000000000000000000000..86f52b8599eaadf05de5083f54d325c154c2af54 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr31-sy1-tnpthread_create-th4.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: fcf72354719d0eec + @用例名称: tperf-libmicro-co10-it5-pr31-sy1-tnpthread_create-th4 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=pthread_create,processes=31,threads=4,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="pthread_create", + processes="31", + threads="4", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=pthread_create,processes=31,threads=4,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr37-sy1-tnfork-th3.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr37-sy1-tnfork-th3.py new file mode 100755 index 0000000000000000000000000000000000000000..4632eef3dde70f790af479cda8fb2e36be9fbf9d --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr37-sy1-tnfork-th3.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 5b459efb288daa9d + @用例名称: tperf-libmicro-co10-it5-pr37-sy1-tnfork-th3 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=fork,processes=37,threads=3,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="fork", + processes="37", + threads="3", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=fork,processes=37,threads=3,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr4-sy1-tnfork-th31.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr4-sy1-tnfork-th31.py new file mode 100755 index 0000000000000000000000000000000000000000..4e42e7afb494b706f5f78de817ec4d7e6f9f3b33 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr4-sy1-tnfork-th31.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 378558a7e0780427 + @用例名称: tperf-libmicro-co10-it5-pr4-sy1-tnfork-th31 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=fork,processes=4,threads=31,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="fork", + processes="4", + threads="31", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=fork,processes=4,threads=31,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr4-sy1-tnfork-th8.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr4-sy1-tnfork-th8.py new file mode 100755 index 0000000000000000000000000000000000000000..3b62a73ecd97d4d007adecadb6e6fadf8a10ee79 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr4-sy1-tnfork-th8.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: a66a5cf7fbd44098 + @用例名称: tperf-libmicro-co10-it5-pr4-sy1-tnfork-th8 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=fork,processes=4,threads=8,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="fork", + processes="4", + threads="8", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=fork,processes=4,threads=8,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr4-sy1-tnpthread_create-th18.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr4-sy1-tnpthread_create-th18.py new file mode 100755 index 0000000000000000000000000000000000000000..a96781715a53d73ad681bf6c436cd221f8aca5d3 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr4-sy1-tnpthread_create-th18.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 33b25ed83b35d479 + @用例名称: tperf-libmicro-co10-it5-pr4-sy1-tnpthread_create-th18 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=pthread_create,processes=4,threads=18,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="pthread_create", + processes="4", + threads="18", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=pthread_create,processes=4,threads=18,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr49-sy1-tnfork-th2.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr49-sy1-tnfork-th2.py new file mode 100755 index 0000000000000000000000000000000000000000..5cba6f1904425198f325f74c273d210965780f01 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr49-sy1-tnfork-th2.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: cf343191be6424f4 + @用例名称: tperf-libmicro-co10-it5-pr49-sy1-tnfork-th2 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=fork,processes=49,threads=2,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="fork", + processes="49", + threads="2", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=fork,processes=49,threads=2,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr5-sy1-tnfork-th9.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr5-sy1-tnfork-th9.py new file mode 100755 index 0000000000000000000000000000000000000000..3da69c07c685b343f986abe7e6e6f8558f6d9ad1 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr5-sy1-tnfork-th9.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 52e902857ac6458f + @用例名称: tperf-libmicro-co10-it5-pr5-sy1-tnfork-th9 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=fork,processes=5,threads=9,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="fork", + processes="5", + threads="9", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=fork,processes=5,threads=9,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr5-sy1-tnpthread_create-th17.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr5-sy1-tnpthread_create-th17.py new file mode 100755 index 0000000000000000000000000000000000000000..17454cd6d056d9cae2a05775ec8caab56e956a88 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr5-sy1-tnpthread_create-th17.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: a200a9cee126ea43 + @用例名称: tperf-libmicro-co10-it5-pr5-sy1-tnpthread_create-th17 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=pthread_create,processes=5,threads=17,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="pthread_create", + processes="5", + threads="17", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=pthread_create,processes=5,threads=17,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr59-sy1-tnpthread_create-th1.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr59-sy1-tnpthread_create-th1.py new file mode 100755 index 0000000000000000000000000000000000000000..c50aed52a63743c0cf4633dd5233b09b41be0c1f --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr59-sy1-tnpthread_create-th1.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: a1f283572e7d9555 + @用例名称: tperf-libmicro-co10-it5-pr59-sy1-tnpthread_create-th1 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=pthread_create,processes=59,threads=1,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="pthread_create", + processes="59", + threads="1", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=pthread_create,processes=59,threads=1,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr6-sy1-tnfork-th1.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr6-sy1-tnfork-th1.py new file mode 100755 index 0000000000000000000000000000000000000000..e1020f54ab9f47cd9434f3931aa07d8f57585b53 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr6-sy1-tnfork-th1.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: afd1891c12f00b3d + @用例名称: tperf-libmicro-co10-it5-pr6-sy1-tnfork-th1 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=fork,processes=6,threads=1,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="fork", + processes="6", + threads="1", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=fork,processes=6,threads=1,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr6-sy1-tnfork-th12.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr6-sy1-tnfork-th12.py new file mode 100755 index 0000000000000000000000000000000000000000..a9b4740733db26c745065f2732a425ac27814d4a --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr6-sy1-tnfork-th12.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 79d0539e66e983da + @用例名称: tperf-libmicro-co10-it5-pr6-sy1-tnfork-th12 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=fork,processes=6,threads=12,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="fork", + processes="6", + threads="12", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=fork,processes=6,threads=12,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr6-sy1-tnfork-th3.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr6-sy1-tnfork-th3.py new file mode 100755 index 0000000000000000000000000000000000000000..05ac2d85ad45c2ac8f81f81d87c3efa9540be840 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr6-sy1-tnfork-th3.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 1db3658c1ec7b030 + @用例名称: tperf-libmicro-co10-it5-pr6-sy1-tnfork-th3 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=fork,processes=6,threads=3,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="fork", + processes="6", + threads="3", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=fork,processes=6,threads=3,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr6-sy1-tnpthread_create-th16.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr6-sy1-tnpthread_create-th16.py new file mode 100755 index 0000000000000000000000000000000000000000..31d11093669b52613731bba0521422bba2138bea --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr6-sy1-tnpthread_create-th16.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 91e0737cb4684de1 + @用例名称: tperf-libmicro-co10-it5-pr6-sy1-tnpthread_create-th16 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=pthread_create,processes=6,threads=16,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="pthread_create", + processes="6", + threads="16", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=pthread_create,processes=6,threads=16,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr62-sy1-tnfork-th2.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr62-sy1-tnfork-th2.py new file mode 100755 index 0000000000000000000000000000000000000000..d771753a342a7e04230336677dbbd52329696bab --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr62-sy1-tnfork-th2.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: b7ccde2c7d784f26 + @用例名称: tperf-libmicro-co10-it5-pr62-sy1-tnfork-th2 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=fork,processes=62,threads=2,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="fork", + processes="62", + threads="2", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=fork,processes=62,threads=2,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr7-sy1-tnfork-th14.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr7-sy1-tnfork-th14.py new file mode 100755 index 0000000000000000000000000000000000000000..9bcdd9bb19e154122a4177836c3b6068558fb2e9 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr7-sy1-tnfork-th14.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 7a23b68c093a4a62 + @用例名称: tperf-libmicro-co10-it5-pr7-sy1-tnfork-th14 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=fork,processes=7,threads=14,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="fork", + processes="7", + threads="14", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=fork,processes=7,threads=14,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr7-sy1-tnpthread_create-th16.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr7-sy1-tnpthread_create-th16.py new file mode 100755 index 0000000000000000000000000000000000000000..2feb78c5cfe7d1cfa8643306bbbc955271c2ea77 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr7-sy1-tnpthread_create-th16.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 6ed8e6fa83165038 + @用例名称: tperf-libmicro-co10-it5-pr7-sy1-tnpthread_create-th16 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=pthread_create,processes=7,threads=16,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="pthread_create", + processes="7", + threads="16", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=pthread_create,processes=7,threads=16,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr8-sy1-tnpthread_create-th16.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr8-sy1-tnpthread_create-th16.py new file mode 100755 index 0000000000000000000000000000000000000000..b15b9b67c666a6440e054315fa89bcd93ca10af5 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr8-sy1-tnpthread_create-th16.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 96d95c738004e34d + @用例名称: tperf-libmicro-co10-it5-pr8-sy1-tnpthread_create-th16 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=pthread_create,processes=8,threads=16,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="pthread_create", + processes="8", + threads="16", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=pthread_create,processes=8,threads=16,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr8-sy1-tnpthread_create-th4.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr8-sy1-tnpthread_create-th4.py new file mode 100755 index 0000000000000000000000000000000000000000..6ee2c989fd4d5f27f03ae58b94961ddb61131353 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr8-sy1-tnpthread_create-th4.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 9fbda6e33e282661 + @用例名称: tperf-libmicro-co10-it5-pr8-sy1-tnpthread_create-th4 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=pthread_create,processes=8,threads=4,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="pthread_create", + processes="8", + threads="4", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=pthread_create,processes=8,threads=4,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr85-sy1-tnfork-th1.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr85-sy1-tnfork-th1.py new file mode 100755 index 0000000000000000000000000000000000000000..776f32e42215f7e4dc611b72a7dc2557dff0c3dc --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr85-sy1-tnfork-th1.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 2e7980f187b07697 + @用例名称: tperf-libmicro-co10-it5-pr85-sy1-tnfork-th1 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=fork,processes=85,threads=1,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="fork", + processes="85", + threads="1", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=fork,processes=85,threads=1,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/libmicro/tperf-libmicro-co10-it5-pr9-sy1-tnfork-th5.py b/testcase/libmicro/tperf-libmicro-co10-it5-pr9-sy1-tnfork-th5.py new file mode 100755 index 0000000000000000000000000000000000000000..346f2d3dea8b3b5f22c1bed77b231986d9cb3650 --- /dev/null +++ b/testcase/libmicro/tperf-libmicro-co10-it5-pr9-sy1-tnfork-th5.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.libmicro.libmicro import PerfLibmicro # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 7e351253d90a218c + @用例名称: tperf-libmicro-co10-it5-pr9-sy1-tnfork-th5 + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用libmicro测试sched性能,参数:test_name=fork,processes=9,threads=5,iterations=5,count=10,sync=1 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具libmicro运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLibmicro( + tc_name=self.tc_name, + test_name="fork", + processes="9", + threads="5", + iterations="5", + count="10", + sync="1", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用libmicro工具测试性能,参数:test_name=fork,processes=9,threads=5,iterations=5,count=10,sync=1 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=10, + result_select_percent=80, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/lmbench-args-sched.csv b/testcase/lmbench/lmbench-args-sched.csv new file mode 100644 index 0000000000000000000000000000000000000000..2e5f1f02ac1e353ce2c947ef95e17f8ce77a6726 --- /dev/null +++ b/testcase/lmbench/lmbench-args-sched.csv @@ -0,0 +1,41 @@ +工具名称,子系统,权重,subtest,parallelism,size_kb,num_procs +lmbench,sched,0.104801,lat_ctx,5,1024,12 +lmbench,sched,0.104801,lat_ctx,6,512,12 +lmbench,sched,0.104801,lat_ctx,6,64,12 +lmbench,sched,0.104801,lat_ctx,8,8,12 +lmbench,sched,0.064904,lat_ctx,17,1024,12 +lmbench,sched,0.064904,lat_ctx,18,512,12 +lmbench,sched,0.064904,lat_ctx,19,64,12 +lmbench,sched,0.064904,lat_ctx,20,8,12 +lmbench,sched,0.034818,lat_ctx,30,1024,12 +lmbench,sched,0.034818,lat_ctx,30,512,12 +lmbench,sched,0.034818,lat_ctx,34,64,12 +lmbench,sched,0.034818,lat_ctx,37,8,12 +lmbench,sched,0.019003,lat_ctx,43,1024,12 +lmbench,sched,0.019003,lat_ctx,43,512,12 +lmbench,sched,0.019003,lat_ctx,48,64,12 +lmbench,sched,0.019003,lat_ctx,53,8,12 +lmbench,sched,0.010617,lat_ctx,57,1024,12 +lmbench,sched,0.010617,lat_ctx,57,512,12 +lmbench,sched,0.010617,lat_ctx,63,64,12 +lmbench,sched,0.010617,lat_ctx,65,8,12 +lmbench,sched,0.006726,lat_ctx,70,1024,12 +lmbench,sched,0.006726,lat_ctx,70,512,12 +lmbench,sched,0.006726,lat_ctx,75,64,12 +lmbench,sched,0.006726,lat_ctx,77,8,12 +lmbench,sched,0.003729,lat_ctx,83,1024,12 +lmbench,sched,0.003729,lat_ctx,83,512,12 +lmbench,sched,0.003729,lat_ctx,80,64,12 +lmbench,sched,0.003729,lat_ctx,80,8,12 +lmbench,sched,0.001972,lat_ctx,96,1024,12 +lmbench,sched,0.001972,lat_ctx,96,512,12 +lmbench,sched,0.001972,lat_ctx,91,64,12 +lmbench,sched,0.001972,lat_ctx,86,8,12 +lmbench,sched,0.001084,lat_ctx,109,1024,12 +lmbench,sched,0.001084,lat_ctx,109,512,12 +lmbench,sched,0.001084,lat_ctx,105,64,12 +lmbench,sched,0.001084,lat_ctx,95,8,12 +lmbench,sched,0.000791,lat_ctx,122,1024,12 +lmbench,sched,0.000791,lat_ctx,122,512,12 +lmbench,sched,0.000791,lat_ctx,120,64,12 +lmbench,sched,0.000791,lat_ctx,102,8,12 diff --git a/testcase/lmbench/lmbench-tune.csv b/testcase/lmbench/lmbench-tune.csv new file mode 100644 index 0000000000000000000000000000000000000000..716220b41abbb09accf395507e9a5563c3c167c8 --- /dev/null +++ b/testcase/lmbench/lmbench-tune.csv @@ -0,0 +1,42 @@ +# lmbench lat_ctx 用例稳定性参数配置 +# 格式: 用例名称,warmup,run_loop,result_select_percent +tperf-lmbench-np12-pa5-sk1024-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa6-sk512-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa6-sk64-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa8-sk8-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa17-sk1024-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa18-sk512-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa19-sk64-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa20-sk8-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa30-sk1024-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa30-sk512-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa34-sk64-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa37-sk8-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa43-sk1024-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa43-sk512-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa48-sk64-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa53-sk8-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa57-sk1024-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa57-sk512-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa63-sk64-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa65-sk8-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa70-sk1024-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa70-sk512-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa75-sk64-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa77-sk8-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa83-sk1024-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa83-sk512-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa80-sk64-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa80-sk8-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa96-sk1024-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa96-sk512-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa91-sk64-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa86-sk8-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa109-sk1024-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa109-sk512-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa105-sk64-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa95-sk8-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa122-sk1024-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa122-sk512-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa120-sk64-sulat_ctx,1,1,90 +tperf-lmbench-np12-pa102-sk8-sulat_ctx,1,1,90 diff --git a/testcase/lmbench/lmbench.py b/testcase/lmbench/lmbench.py new file mode 100644 index 0000000000000000000000000000000000000000..b89f5df20036b456bbbc4a05887298d60a437cc9 --- /dev/null +++ b/testcase/lmbench/lmbench.py @@ -0,0 +1,62 @@ +#!/usr/bin/python3 +# coding: utf-8 +# Desc: lmbench lat_ctx 工具类,供 parse-csv2case.py 通用框架调用 +# +# 内部委托给 lib.ts_common.PerfLMbench,确保生成的 case +# 与老 case (tperf-lmbench-lat_ctx-*.py) 行为完全一致。 +# +# CSV 参数列名与 __init__ 参数名的对应关系: +# subtest → subtest (lat_ctx) +# -P= → parallelism +# -s= → size_kb +# num_procs → num_procs + +import os +import sys + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) + +from common.lib.benchmark import TSTPerf # noqa: E402 +from lib.ts_common import PerfLMbench # noqa: E402 + + +class PerfLmbench(TSTPerf): + """lmbench lat_ctx 工具类 — 委托给 PerfLMbench + + 接收 parse-csv2case.py 传入的 CSV 字符串参数, + 拼接为 general_opt 后委托给 PerfLMbench。 + """ + + def __init__( + self, + tc_name: str, + subtest: str = "lat_ctx", + parallelism: str = "1", + size_kb: str = "8", + num_procs: str = "12", + ): + super().__init__() + general_opt = f"-P {parallelism} -s {size_kb} {num_procs}" + self._impl = PerfLMbench( + name=subtest, + testname=tc_name, + label="L0:sched", + general_opt=general_opt, + ) + + def prepare(self): + return self._impl.prepare() + + def benchmark(self): + return self._impl.benchmark() + + def parse_test_data(self): + return self._impl.parse_test_data() + + def cleanup(self): + return self._impl.cleanup() diff --git a/testcase/lmbench/tperf-lmbench-np12-pa102-sk8-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa102-sk8-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..f1a3b1fe51b26909de95f3340b3b99e8b6969bdb --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa102-sk8-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 3d208af0b2797a9c + @用例名称: tperf-lmbench-np12-pa102-sk8-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=102,size_kb=8,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="102", + size_kb="8", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=102,size_kb=8,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa105-sk64-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa105-sk64-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..ecc6b5b41bfa5b68a62473bca09c5529969074d9 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa105-sk64-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 9731a83722aefc9e + @用例名称: tperf-lmbench-np12-pa105-sk64-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=105,size_kb=64,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="105", + size_kb="64", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=105,size_kb=64,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa109-sk1024-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa109-sk1024-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..fd6aac0429483975d5a143c0c9b633035f6cccac --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa109-sk1024-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 06632d97b61cbfb3 + @用例名称: tperf-lmbench-np12-pa109-sk1024-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=109,size_kb=1024,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="109", + size_kb="1024", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=109,size_kb=1024,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa109-sk512-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa109-sk512-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..83b2538e0cfd2d8cff4ff14dc54a8f03cae65484 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa109-sk512-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 792aee31a98e5e61 + @用例名称: tperf-lmbench-np12-pa109-sk512-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=109,size_kb=512,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="109", + size_kb="512", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=109,size_kb=512,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa120-sk64-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa120-sk64-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..bcc47c2f072794a6a33891816187178f9e6ca099 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa120-sk64-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 42c2119f97c9519f + @用例名称: tperf-lmbench-np12-pa120-sk64-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=120,size_kb=64,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="120", + size_kb="64", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=120,size_kb=64,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa122-sk1024-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa122-sk1024-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..24ba0b1b143400aa9b884fa080e7800178126b41 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa122-sk1024-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 188f6412d6c650d2 + @用例名称: tperf-lmbench-np12-pa122-sk1024-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=122,size_kb=1024,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="122", + size_kb="1024", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=122,size_kb=1024,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa122-sk512-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa122-sk512-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..1c2c716e91bce60c5de9ee4111836f94e17a076b --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa122-sk512-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 714c7ba3f5c43ef4 + @用例名称: tperf-lmbench-np12-pa122-sk512-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=122,size_kb=512,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="122", + size_kb="512", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=122,size_kb=512,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa17-sk1024-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa17-sk1024-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..eb5788868d4fe1a3545b779c7f25bf109381b86d --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa17-sk1024-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: f4c09e4e2f674a8c + @用例名称: tperf-lmbench-np12-pa17-sk1024-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=17,size_kb=1024,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="17", + size_kb="1024", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=17,size_kb=1024,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa18-sk512-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa18-sk512-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..5efcf15bb1548b52977f66d96c81f58c898b3ac8 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa18-sk512-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: d4e9643301199975 + @用例名称: tperf-lmbench-np12-pa18-sk512-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=18,size_kb=512,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="18", + size_kb="512", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=18,size_kb=512,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa19-sk64-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa19-sk64-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..5f9db79d39c526a75c796f732f59a6e607a29108 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa19-sk64-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 6419d410af62d4e2 + @用例名称: tperf-lmbench-np12-pa19-sk64-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=19,size_kb=64,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="19", + size_kb="64", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=19,size_kb=64,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa20-sk8-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa20-sk8-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..df54c2803e24c5fdb987c324c1e4e3a0d1d2d6d0 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa20-sk8-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: ae475517791803fd + @用例名称: tperf-lmbench-np12-pa20-sk8-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=20,size_kb=8,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="20", + size_kb="8", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=20,size_kb=8,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa30-sk1024-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa30-sk1024-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..538c50e1b8d3dc36b395a42230c90c230373bfaf --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa30-sk1024-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 7da05d96e64e5f60 + @用例名称: tperf-lmbench-np12-pa30-sk1024-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=30,size_kb=1024,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="30", + size_kb="1024", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=30,size_kb=1024,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa30-sk512-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa30-sk512-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..62244a27bc5553253a01387d0467f2f7008a629d --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa30-sk512-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 9f8ec86afdf4bb97 + @用例名称: tperf-lmbench-np12-pa30-sk512-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=30,size_kb=512,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="30", + size_kb="512", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=30,size_kb=512,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa34-sk64-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa34-sk64-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..e81ad921c6b537f13fef8e169cddf642fb668cba --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa34-sk64-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 89efcb7e6482ee03 + @用例名称: tperf-lmbench-np12-pa34-sk64-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=34,size_kb=64,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="34", + size_kb="64", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=34,size_kb=64,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa37-sk8-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa37-sk8-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..18ccd85b33b259a51e1110e2dc7df9ac7577fd21 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa37-sk8-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: a735a55a1654c08f + @用例名称: tperf-lmbench-np12-pa37-sk8-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=37,size_kb=8,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="37", + size_kb="8", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=37,size_kb=8,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa43-sk1024-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa43-sk1024-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..da540f89262386e3fd3f96d603c048ad8dddcc1d --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa43-sk1024-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 21e9b24761fabe71 + @用例名称: tperf-lmbench-np12-pa43-sk1024-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=43,size_kb=1024,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="43", + size_kb="1024", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=43,size_kb=1024,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa43-sk512-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa43-sk512-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..4e5132682ec5142e00a04f02c7bdaa1593df79d6 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa43-sk512-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 117504c6b4d0fce8 + @用例名称: tperf-lmbench-np12-pa43-sk512-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=43,size_kb=512,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="43", + size_kb="512", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=43,size_kb=512,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa48-sk64-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa48-sk64-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..3e5603382a651224417bd92679162f7387218119 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa48-sk64-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: a456caeecdf33082 + @用例名称: tperf-lmbench-np12-pa48-sk64-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=48,size_kb=64,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="48", + size_kb="64", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=48,size_kb=64,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa5-sk1024-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa5-sk1024-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..64184e54e81d250f282e58906f58adb5c382fbe3 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa5-sk1024-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 3ab3bf3073e0d6ea + @用例名称: tperf-lmbench-np12-pa5-sk1024-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=5,size_kb=1024,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="5", + size_kb="1024", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=5,size_kb=1024,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa53-sk8-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa53-sk8-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..37b870edc955d0dc03f97a60f5f899902e627aa8 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa53-sk8-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 5f6bcebabd787438 + @用例名称: tperf-lmbench-np12-pa53-sk8-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=53,size_kb=8,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="53", + size_kb="8", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=53,size_kb=8,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa57-sk1024-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa57-sk1024-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..fb923fcf0f50f198545ff52813d7d767426b6b0a --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa57-sk1024-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 5f1de802ce293194 + @用例名称: tperf-lmbench-np12-pa57-sk1024-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=57,size_kb=1024,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="57", + size_kb="1024", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=57,size_kb=1024,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa57-sk512-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa57-sk512-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..9dc46e6acb8156fd44b6cdb63bc153440494d4eb --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa57-sk512-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 7e1ce58072645e1f + @用例名称: tperf-lmbench-np12-pa57-sk512-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=57,size_kb=512,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="57", + size_kb="512", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=57,size_kb=512,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa6-sk512-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa6-sk512-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..2ceed360555f952f8c75ab7fad89a8c281266e36 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa6-sk512-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 2ead21de8c748618 + @用例名称: tperf-lmbench-np12-pa6-sk512-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=6,size_kb=512,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="6", + size_kb="512", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=6,size_kb=512,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa6-sk64-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa6-sk64-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..08482cdf21cce70e60dcbd827ac3f7e7315ba0fb --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa6-sk64-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: d7a5cb886559bcf9 + @用例名称: tperf-lmbench-np12-pa6-sk64-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=6,size_kb=64,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="6", + size_kb="64", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=6,size_kb=64,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa63-sk64-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa63-sk64-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..aeaaa6a0a885e856e2823c0acebea7389f9ddce1 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa63-sk64-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: bd9fa75a758e6879 + @用例名称: tperf-lmbench-np12-pa63-sk64-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=63,size_kb=64,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="63", + size_kb="64", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=63,size_kb=64,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa65-sk8-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa65-sk8-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..f45d870bb89727b13bcedacab2f1124436b55fb8 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa65-sk8-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 7584a1067dfa13c3 + @用例名称: tperf-lmbench-np12-pa65-sk8-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=65,size_kb=8,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="65", + size_kb="8", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=65,size_kb=8,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa70-sk1024-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa70-sk1024-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..26d498f5b008578fc6fbbf0f249738891c46357d --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa70-sk1024-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: c8eda097886521a5 + @用例名称: tperf-lmbench-np12-pa70-sk1024-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=70,size_kb=1024,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="70", + size_kb="1024", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=70,size_kb=1024,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa70-sk512-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa70-sk512-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..e35c3adf830840c06db2cd096c54b762157f3564 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa70-sk512-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: ee5081672557d2a2 + @用例名称: tperf-lmbench-np12-pa70-sk512-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=70,size_kb=512,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="70", + size_kb="512", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=70,size_kb=512,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa75-sk64-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa75-sk64-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..f92194320db73650e3701a425d7a07d669c9cbba --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa75-sk64-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 99a7eade4897a00e + @用例名称: tperf-lmbench-np12-pa75-sk64-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=75,size_kb=64,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="75", + size_kb="64", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=75,size_kb=64,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa77-sk8-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa77-sk8-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..77ed3e26f96a3b17ea8acd7060f2c7c7065466da --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa77-sk8-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 0890a3550eba7d06 + @用例名称: tperf-lmbench-np12-pa77-sk8-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=77,size_kb=8,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="77", + size_kb="8", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=77,size_kb=8,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa8-sk8-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa8-sk8-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..daa2b8f9a20efdfe433dd1e92d6337e31b4be840 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa8-sk8-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 1578accfd453fd3a + @用例名称: tperf-lmbench-np12-pa8-sk8-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=8,size_kb=8,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="8", + size_kb="8", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=8,size_kb=8,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa80-sk64-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa80-sk64-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..7b3d8518f2d5418366b8bfb02739220d2213589c --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa80-sk64-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: dc45408ba4e07aa9 + @用例名称: tperf-lmbench-np12-pa80-sk64-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=80,size_kb=64,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="80", + size_kb="64", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=80,size_kb=64,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa80-sk8-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa80-sk8-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..85de27b193ae65d4a590e81926c241858a57f8ce --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa80-sk8-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: e055c86d6f8725ff + @用例名称: tperf-lmbench-np12-pa80-sk8-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=80,size_kb=8,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="80", + size_kb="8", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=80,size_kb=8,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa83-sk1024-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa83-sk1024-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..0ea6e0054eac2dd3d91f3c0d6d07db95aa6e1aa7 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa83-sk1024-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 01385f2735b8db72 + @用例名称: tperf-lmbench-np12-pa83-sk1024-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=83,size_kb=1024,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="83", + size_kb="1024", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=83,size_kb=1024,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa83-sk512-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa83-sk512-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..9beaba2ae4fbec0529963c8be873e64f511e7768 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa83-sk512-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 472616f13233e114 + @用例名称: tperf-lmbench-np12-pa83-sk512-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=83,size_kb=512,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="83", + size_kb="512", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=83,size_kb=512,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa86-sk8-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa86-sk8-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..2d2f9891a718a8dffc3c07762d3ec9577426bb97 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa86-sk8-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 7a9b4921fcec1d5d + @用例名称: tperf-lmbench-np12-pa86-sk8-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=86,size_kb=8,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="86", + size_kb="8", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=86,size_kb=8,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa91-sk64-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa91-sk64-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..cb0d6c0a1bb84304c438ea2624af647bf5043adb --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa91-sk64-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: 5a5d7cbfae32ec63 + @用例名称: tperf-lmbench-np12-pa91-sk64-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=91,size_kb=64,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="91", + size_kb="64", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=91,size_kb=64,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa95-sk8-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa95-sk8-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..8e4c22a6eb19205fa857b211f4f1de1262e2b829 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa95-sk8-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: e483ff524d229727 + @用例名称: tperf-lmbench-np12-pa95-sk8-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=95,size_kb=8,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="95", + size_kb="8", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=95,size_kb=8,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa96-sk1024-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa96-sk1024-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..be87ed38c9958c706cee68857525825ca7bae155 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa96-sk1024-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: e81187f8eeeeb537 + @用例名称: tperf-lmbench-np12-pa96-sk1024-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=96,size_kb=1024,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="96", + size_kb="1024", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=96,size_kb=1024,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv) diff --git a/testcase/lmbench/tperf-lmbench-np12-pa96-sk512-sulat_ctx.py b/testcase/lmbench/tperf-lmbench-np12-pa96-sk512-sulat_ctx.py new file mode 100755 index 0000000000000000000000000000000000000000..473541d7393c8ad14a46a24b720c628687e446a1 --- /dev/null +++ b/testcase/lmbench/tperf-lmbench-np12-pa96-sk512-sulat_ctx.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python3 +# coding: utf-8 + +import os.path +import sys + + +_suite_top_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..") +while _suite_top_dir != "/": + if os.path.isfile(os.path.join(_suite_top_dir, "tsuite")): + break + _suite_top_dir = os.path.dirname(_suite_top_dir) +sys.path.append(_suite_top_dir) +from lib.ts_common import MyTestCase # noqa: E402 +from testcase.lmbench.lmbench import PerfLmbench # noqa: E402 + + +class PythonTestCase(MyTestCase): + """ + @用例ID: ee62a8e47f254280 + @用例名称: tperf-lmbench-np12-pa96-sk512-sulat_ctx + @用例级别: 3 + @用例标签: + @扩展属性: + @用例类型: + @自动化: 1 + @超时时间: 0 + @用例描述: 使用lmbench测试sched性能,参数:subtest=lat_ctx,parallelism=96,size_kb=512,num_procs=12 + """ + + def tc_setup(self, *args): + self.msg("this is tc_setup") + # @预置条件: 系统支持性能测试工具lmbench运行 + # @预置条件: 系统参数配置正确,符合性能测试运行要求 + self.perf_tool = PerfLmbench( + tc_name=self.tc_name, + subtest="lat_ctx", + parallelism="96", + size_kb="512", + num_procs="12", + ) + + def do_test(self, *args): + self.msg("this is do_test") + + # @测试步骤: 使用lmbench工具测试性能,参数:subtest=lat_ctx,parallelism=96,size_kb=512,num_procs=12 + # @预期结果: 测试正常,性能数据采集正常 + self.perf_tool.run( + warmup=1, + run_loop=5, + result_select_percent=90, + ) + self.perf_tool.report(testcase=self) + self.assert_true(len(self.perf_tool.results) > 0) + + def tc_teardown(self, *args): + self.msg("this is tc_teardown") + + +if __name__ == "__main__": + PythonTestCase().tst_main(sys.argv)