Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uadk_tool: add comp test #643

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

uadk_tool: add comp test #643

wants to merge 14 commits into from

Conversation

tq444
Copy link

@tq444 tq444 commented Nov 21, 2024

Hao Fang (14):
uadk_tool: test: change the comp_test directory to uadk_tool
uadk_tool: test: unified the log print
uadk_tool: test: remove comp test unused cmd
uadk_tool: test: comp test remove the --ilist/olist cmd
uadk_tool: test: remove unuse functions in comp_lib.h
uadk_tool: test: reduce duplicate code in hw_blk_compress
uadk_tool: test: comp test remove poll_thread_func
uadk_tool: test: comp test remove the number in function name
uadk_tool: test: comp test remove the batch mode
uadk_tool: test: comp test remove the send_thread_func
uadk_tool: comp test: move info.in_buf alloction into
create_send_tdata
uadk_tool: comp test: simplified the test_hw function
uadk_tool: comp test: unified the test cmd format
uadk_tool: comp test: some fixes found with checkpatch

uadk_tool/Makefile.am | 11 +-
uadk_tool/benchmark/sec_uadk_benchmark.c | 6 +
uadk_tool/benchmark/uadk_benchmark.h | 2 +-
uadk_tool/test/comp_lib.c | 1410 ++++++++++++++++++++++
uadk_tool/test/comp_lib.h | 300 +++++
uadk_tool/test/comp_main.c | 1393 +++++++++++++++++++++
uadk_tool/test/comp_main.h | 11 +
uadk_tool/test/uadk_test.c | 8 +-
8 files changed, 3133 insertions(+), 8 deletions(-)
create mode 100644 uadk_tool/test/comp_lib.c
create mode 100644 uadk_tool/test/comp_lib.h
create mode 100644 uadk_tool/test/comp_main.c
create mode 100644 uadk_tool/test/comp_main.h

Now the uadk_tool is the unified test tool but comp test is still in
the test/hisi_zip_test, and out of maintained for a long time.

Change the directory is the first step for refactoring the test tool.

Use this cmd for help:
uadk_tool test --m zip --help

Signed-off-by: Hao Fang <fanghao11@huawei.com>
Signed-off-by: Qi Tao <taoqi10@huawei.com>
Add DEBUG_LOG macro to control dbg print.

Use the COMP_TST_PRT() to unified the err log print.

Signed-off-by: Hao Fang <fanghao11@huawei.com>
Signed-off-by: Qi Tao <taoqi10@huawei.com>
Remove the -F/-n/-v cmd.

Signed-off-by: Hao Fang <fanghao11@huawei.com>
Signed-off-by: Qi Tao <taoqi10@huawei.com>
The cmd --ilist and --olist just use for compress file in block mode, but
the block mode can be verified by the memory buffer compress testcase.

Just remove the self defined protocol will simplified the tool.

Signed-off-by: Hao Fang <fanghao11@huawei.com>
Signed-off-by: Qi Tao <taoqi10@huawei.com>
Signed-off-by: Hao Fang <fanghao11@huawei.com>
Signed-off-by: Qi Tao <taoqi10@huawei.com>
hw_blk_compress/hw_stream_compress can do the
double direction compress.

Signed-off-by: Hao Fang <fanghao11@huawei.com>
Signed-off-by: Qi Tao <taoqi10@huawei.com>
Remove the poll_thread_func() and rename poll2_thread_func()
as the poll_thread_func().

Signed-off-by: Hao Fang <fanghao11@huawei.com>
Signed-off-by: Qi Tao <taoqi10@huawei.com>
The devil numbers in function name is hard to read.

Signed-off-by: Hao Fang <fanghao11@huawei.com>
Signed-off-by: Qi Tao <taoqi10@huawei.com>
Signed-off-by: Hao Fang <fanghao11@huawei.com>
Signed-off-by: Qi Tao <taoqi10@huawei.com>
Remove the redundant send_thread_func(), the kill and zlib test case
is still reserved can be added in other function flow.

Signed-off-by: Hao Fang <fanghao11@huawei.com>
Signed-off-by: Qi Tao <taoqi10@huawei.com>
Signed-off-by: Hao Fang <fanghao11@huawei.com>
Signed-off-by: Qi Tao <taoqi10@huawei.com>
Function wraped like: uadk_res_init(), prepare_src_data(),
perfdata_print().

And alloc/free of data memory are optimized.

Signed-off-by: Hao Fang <fanghao11@huawei.com>
Signed-off-by: Qi Tao <taoqi10@huawei.com>
The old format:
Such as:
  uadk_tool --m zip -b 8192 -s 8192000 -t 8
New:
  uadk_tool --m zip --blksize 8192 --size 8192000 --thread 8

Signed-off-by: Hao Fang <fanghao11@huawei.com>
Signed-off-by: Qi Tao <taoqi10@huawei.com>
1.fixes found with chechpatch.
2.code format alignment.

Signed-off-by: Hao Fang <fanghao11@huawei.com>
Signed-off-by: Qi Tao <taoqi10@huawei.com>
@haofang111
Copy link
Collaborator

/lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants