From 69de43835c3e55edca59b27f5e5bd0b6f9724001 Mon Sep 17 00:00:00 2001 From: lijiaming <1228575330@qq.com> Date: Mon, 29 Jul 2024 05:12:26 +0000 Subject: [PATCH 01/17] add suite2cases/secDetector.json. Signed-off-by: lijiaming <1228575330@qq.com> --- suite2cases/secDetector.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 suite2cases/secDetector.json diff --git a/suite2cases/secDetector.json b/suite2cases/secDetector.json new file mode 100644 index 000000000..957beb683 --- /dev/null +++ b/suite2cases/secDetector.json @@ -0,0 +1,8 @@ +{ + "path": "$OET_PATH/testcases/smoke-test/smoke-secDetector", + "cases": [ + { + "name": "os_test_secDetector_basic_test" + } + ] +} \ No newline at end of file -- Gitee From 4bb9e04242fb20958ea14e1932ce2b21900c19a3 Mon Sep 17 00:00:00 2001 From: lijiaming <1228575330@qq.com> Date: Mon, 29 Jul 2024 05:13:08 +0000 Subject: [PATCH 02/17] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20smoke-secDetector?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- testcases/smoke-test/smoke-secDetector/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 testcases/smoke-test/smoke-secDetector/.keep diff --git a/testcases/smoke-test/smoke-secDetector/.keep b/testcases/smoke-test/smoke-secDetector/.keep new file mode 100644 index 000000000..e69de29bb -- Gitee From bc975069fba7f76e230eabbf02c0ce96795cc0c5 Mon Sep 17 00:00:00 2001 From: lijiaming <1228575330@qq.com> Date: Mon, 29 Jul 2024 05:13:44 +0000 Subject: [PATCH 03/17] add testcases/smoke-test/smoke-secDetector/client.py. Signed-off-by: lijiaming <1228575330@qq.com> --- .../smoke-test/smoke-secDetector/client.py | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 testcases/smoke-test/smoke-secDetector/client.py diff --git a/testcases/smoke-test/smoke-secDetector/client.py b/testcases/smoke-test/smoke-secDetector/client.py new file mode 100644 index 000000000..b6222995b --- /dev/null +++ b/testcases/smoke-test/smoke-secDetector/client.py @@ -0,0 +1,42 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + +import ctypes +import time +import sys +import threading +from threading import Thread + +sys.path.append("./common") +from common import * + +def main(): + + topic = int(0x00FFFFFF) + + reader = thread_func_sub(topic) + + threadlist = [] + + tsub_read = Thread(target=thread_func_read,args=(reader,)) + tsub_read.start() + + threadlist.append(tsub_read) + + file_check() + time.sleep(1) + process_check() + time.sleep(1) + behav_check() + time.sleep(1) + + thread_func_unsub(topic, reader) + + for t in threadlist: + t.join() + + print("client end") + +if __name__ == '__main__': + main() + -- Gitee From 50bad408d5640b9b2e322d9a8d53882d109f7f81 Mon Sep 17 00:00:00 2001 From: lijiaming <1228575330@qq.com> Date: Mon, 29 Jul 2024 05:14:21 +0000 Subject: [PATCH 04/17] add testcases/smoke-test/smoke-secDetector/os_test_secDetector_basic_test.sh. Signed-off-by: lijiaming <1228575330@qq.com> --- .../os_test_secDetector_basic_test.sh | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 testcases/smoke-test/smoke-secDetector/os_test_secDetector_basic_test.sh diff --git a/testcases/smoke-test/smoke-secDetector/os_test_secDetector_basic_test.sh b/testcases/smoke-test/smoke-secDetector/os_test_secDetector_basic_test.sh new file mode 100644 index 000000000..43b192253 --- /dev/null +++ b/testcases/smoke-test/smoke-secDetector/os_test_secDetector_basic_test.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# Copyright (c), 2024-2024, HUAWEI tech. Co., Ltd. +# Description: secDetector basic test +# Author: lijiaming +# Create: 2024-07-29 +source ./common/common.sh +set +e + +function pre_test() { + secD_deploy + secD_start + useradd tester +} + +function run_test() { + python client.py > res.txt + grep 'event_name:sched_process_fork' res.txt + CHECK_RESULT $? + grep 'event_name:readfile' res.txt + CHECK_RESULT $? + grep 'event_name:execve_cmd' res.txt + CHECK_RESULT $? + grep 'event_name:createfile' res.txt + CHECK_RESULT $? + grep 'event_name:delfile' res.txt + CHECK_RESULT $? + grep 'event_name:commit_creds' res.txt + CHECK_RESULT $? + grep 'event_type=createpipe' res.txt + CHECK_RESULT $? + +} + +function post_test() { + rm -rf res.txt + userdel -r tester + secD_stop + secD_remove +} + +main "$@" -- Gitee From c81eabfbad09c5b7b2413a0126a04488edfb9692 Mon Sep 17 00:00:00 2001 From: lijiaming <1228575330@qq.com> Date: Mon, 29 Jul 2024 05:14:36 +0000 Subject: [PATCH 05/17] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20common?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- testcases/smoke-test/smoke-secDetector/common/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 testcases/smoke-test/smoke-secDetector/common/.keep diff --git a/testcases/smoke-test/smoke-secDetector/common/.keep b/testcases/smoke-test/smoke-secDetector/common/.keep new file mode 100644 index 000000000..e69de29bb -- Gitee From 4f028046209511add94ff14ea9396ddbdf121e76 Mon Sep 17 00:00:00 2001 From: lijiaming <1228575330@qq.com> Date: Mon, 29 Jul 2024 05:14:55 +0000 Subject: [PATCH 06/17] add testcases/smoke-test/smoke-secDetector/common. Signed-off-by: lijiaming <1228575330@qq.com> --- testcases/smoke-test/smoke-secDetector/common/common.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 testcases/smoke-test/smoke-secDetector/common/common.py diff --git a/testcases/smoke-test/smoke-secDetector/common/common.py b/testcases/smoke-test/smoke-secDetector/common/common.py new file mode 100644 index 000000000..e69de29bb -- Gitee From 593c77651ba0b6ded05c411f4c81d9ffa1150180 Mon Sep 17 00:00:00 2001 From: lijiaming <1228575330@qq.com> Date: Mon, 29 Jul 2024 05:15:37 +0000 Subject: [PATCH 07/17] update testcases/smoke-test/smoke-secDetector/common/common.py. Signed-off-by: lijiaming <1228575330@qq.com> --- .../smoke-secDetector/common/common.py | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/testcases/smoke-test/smoke-secDetector/common/common.py b/testcases/smoke-test/smoke-secDetector/common/common.py index e69de29bb..44d3ac3ad 100644 --- a/testcases/smoke-test/smoke-secDetector/common/common.py +++ b/testcases/smoke-test/smoke-secDetector/common/common.py @@ -0,0 +1,98 @@ +import ctypes +import time +import sys, os +import tempfile +import threading +import subprocess +from threading import Thread + +DATA_LEN = 1024 + +secDetectorsdklib = ctypes.cdll.LoadLibrary('/usr/lib64/secDetector/libsecDetectorsdk.so') + +g_cli_reader = ctypes.c_void_p +g_cli_reader_lock = threading.Lock() + +secDetectorsdklib.secSub.argtypes = [ctypes.c_int] +secDetectorsdklib.secSub.restype = ctypes.c_void_p +secDetectorsdklib.secUnsub.argtypes = [ctypes.c_void_p] +secDetectorsdklib.secUnsub.restype = None +secDetectorsdklib.secReadFrom.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_int] +secDetectorsdklib.secReadFrom.restype = None + +reader_state = False + +def thread_func_sub(num): + global reader_state + cli_reader = secDetectorsdklib.secSub(num) + if cli_reader == None: + print("sub fail") + else: + print("sub success") + print("client thread_func_sub end") + reader_state = True + + return cli_reader + + +def thread_func_read(cli_reader): + global reader_state + print("client thread_func_read start") + + data = ctypes.create_string_buffer(DATA_LEN) + data_len = ctypes.c_int(DATA_LEN) + #secDetectorsdklib.secReadFrom(cli_reader, data, data_len) + #print("client read data:{}".format(data.value.decode())) + + while reader_state: + if data.value.decode() == 'end': + print("client received end") + break + #time.sleep(1) + secDetectorsdklib.secReadFrom(cli_reader, data, data_len) + #print("client while read data:{}".format(data.value.decode())) + + print("client thread_func_read end") + print(time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))) + +def thread_func_unsub(num, cli_reader): + global reader_state + print("client thread_func_unsub start") + print(time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))) + secDetectorsdklib.secUnsub(cli_reader) + + print("client thread_func_unsub end") + print(time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))) + reader_state = False + +def file_check(): + fd, path = tempfile.mkstemp() + try: + with os.fdopen(fd, 'w+') as tmp: + # do stuff with temp file + tmp.write('stuff') + s = tmp.readline() + finally: + os.utime(path, (1602179630, 1602179630)) + os.remove(path) + +def process_check(): + os.system("id") + subprocess.run(["su", "tester", "-c", "id"]) + +def behav_check(): + os.system('id | grep uid') + + + +def expect_eq(left, right): + if left == right: + print("check success!!") + else: + print("check fail!!") + +def expect_ne(left, right): + if left == right: + print("check fail!!") + else: + print("check success!!") -- Gitee From 5ec514e33c877dc9e6066b1b81dc0daf37dcedbf Mon Sep 17 00:00:00 2001 From: lijiaming <1228575330@qq.com> Date: Mon, 29 Jul 2024 05:16:14 +0000 Subject: [PATCH 08/17] add testcases/smoke-test/smoke-secDetector/common/common.sh. Signed-off-by: lijiaming <1228575330@qq.com> --- .../smoke-secDetector/common/common.sh | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 testcases/smoke-test/smoke-secDetector/common/common.sh diff --git a/testcases/smoke-test/smoke-secDetector/common/common.sh b/testcases/smoke-test/smoke-secDetector/common/common.sh new file mode 100644 index 000000000..b023d79f2 --- /dev/null +++ b/testcases/smoke-test/smoke-secDetector/common/common.sh @@ -0,0 +1,28 @@ +#!/bin/bash +source "${OET_PATH}/libs/locallibs/common_lib.sh" + +# 部署secD +function secD_deploy() { + yum install -y gdb secDetector* + modprobe secDetector_core + modprobe secDetector_kmodule_baseline + modprobe secDetector_memory_corruption + modprobe secDetector_program_action +} + +# 移除secD +function secD_remove() { + modprobe -r secDetector_program_action + modprobe -r secDetector_memory_corruption + modprobe -r secDetector_kmodule_baseline + modprobe -r secDetector_core +} + +function secD_start() { + ulimit -l unlimited + secDetectord +} + +function secD_stop() { + pkill secDetectord +} -- Gitee From 844200d032517c5aff53b90120bd6923c5bdcb1c Mon Sep 17 00:00:00 2001 From: lijiaming <1228575330@qq.com> Date: Mon, 29 Jul 2024 05:19:05 +0000 Subject: [PATCH 09/17] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20te?= =?UTF-8?q?stcases/smoke-test/smoke-secDetector/.keep?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- testcases/smoke-test/smoke-secDetector/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 testcases/smoke-test/smoke-secDetector/.keep diff --git a/testcases/smoke-test/smoke-secDetector/.keep b/testcases/smoke-test/smoke-secDetector/.keep deleted file mode 100644 index e69de29bb..000000000 -- Gitee From 9944af546e32de03e58339c26aeafb4de2fe6d21 Mon Sep 17 00:00:00 2001 From: lijiaming <1228575330@qq.com> Date: Mon, 29 Jul 2024 05:19:14 +0000 Subject: [PATCH 10/17] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20te?= =?UTF-8?q?stcases/smoke-test/smoke-secDetector/common/.keep?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- testcases/smoke-test/smoke-secDetector/common/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 testcases/smoke-test/smoke-secDetector/common/.keep diff --git a/testcases/smoke-test/smoke-secDetector/common/.keep b/testcases/smoke-test/smoke-secDetector/common/.keep deleted file mode 100644 index e69de29bb..000000000 -- Gitee From 134a2736346bf5784ebdb74c9d44ae032a6eaba9 Mon Sep 17 00:00:00 2001 From: lijiaming <1228575330@qq.com> Date: Wed, 7 Aug 2024 01:17:22 +0000 Subject: [PATCH 11/17] update testcases/smoke-test/smoke-secDetector/common/common.py. Signed-off-by: lijiaming <1228575330@qq.com> --- testcases/smoke-test/smoke-secDetector/common/common.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/testcases/smoke-test/smoke-secDetector/common/common.py b/testcases/smoke-test/smoke-secDetector/common/common.py index 44d3ac3ad..1b6ecc28e 100644 --- a/testcases/smoke-test/smoke-secDetector/common/common.py +++ b/testcases/smoke-test/smoke-secDetector/common/common.py @@ -41,16 +41,12 @@ def thread_func_read(cli_reader): data = ctypes.create_string_buffer(DATA_LEN) data_len = ctypes.c_int(DATA_LEN) - #secDetectorsdklib.secReadFrom(cli_reader, data, data_len) - #print("client read data:{}".format(data.value.decode())) while reader_state: if data.value.decode() == 'end': print("client received end") break - #time.sleep(1) secDetectorsdklib.secReadFrom(cli_reader, data, data_len) - #print("client while read data:{}".format(data.value.decode())) print("client thread_func_read end") print(time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))) -- Gitee From 823ff36f2c9f2e00a664c779afc90639d41678eb Mon Sep 17 00:00:00 2001 From: lijiaming <1228575330@qq.com> Date: Wed, 7 Aug 2024 01:18:45 +0000 Subject: [PATCH 12/17] update testcases/smoke-test/smoke-secDetector/common/common.py. Signed-off-by: lijiaming <1228575330@qq.com> --- testcases/smoke-test/smoke-secDetector/common/common.py | 1 - 1 file changed, 1 deletion(-) diff --git a/testcases/smoke-test/smoke-secDetector/common/common.py b/testcases/smoke-test/smoke-secDetector/common/common.py index 1b6ecc28e..67548618b 100644 --- a/testcases/smoke-test/smoke-secDetector/common/common.py +++ b/testcases/smoke-test/smoke-secDetector/common/common.py @@ -65,7 +65,6 @@ def file_check(): fd, path = tempfile.mkstemp() try: with os.fdopen(fd, 'w+') as tmp: - # do stuff with temp file tmp.write('stuff') s = tmp.readline() finally: -- Gitee From 9f864dfbb7654996b9b135d3e96ed19058132654 Mon Sep 17 00:00:00 2001 From: lijiaming <1228575330@qq.com> Date: Wed, 7 Aug 2024 01:33:27 +0000 Subject: [PATCH 13/17] update testcases/smoke-test/smoke-secDetector/common/common.sh. Signed-off-by: lijiaming <1228575330@qq.com> --- testcases/smoke-test/smoke-secDetector/common/common.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testcases/smoke-test/smoke-secDetector/common/common.sh b/testcases/smoke-test/smoke-secDetector/common/common.sh index b023d79f2..097e5a390 100644 --- a/testcases/smoke-test/smoke-secDetector/common/common.sh +++ b/testcases/smoke-test/smoke-secDetector/common/common.sh @@ -1,4 +1,6 @@ #!/bin/bash +# shellcheck disable=SC1017 + source "${OET_PATH}/libs/locallibs/common_lib.sh" # 部署secD -- Gitee From 8bace5ef18eed9f73d9d8d8fe1e2734ce69716df Mon Sep 17 00:00:00 2001 From: lijiaming <1228575330@qq.com> Date: Wed, 7 Aug 2024 01:33:51 +0000 Subject: [PATCH 14/17] update testcases/smoke-test/smoke-secDetector/os_test_secDetector_basic_test.sh. Signed-off-by: lijiaming <1228575330@qq.com> --- .../smoke-secDetector/os_test_secDetector_basic_test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testcases/smoke-test/smoke-secDetector/os_test_secDetector_basic_test.sh b/testcases/smoke-test/smoke-secDetector/os_test_secDetector_basic_test.sh index 43b192253..ab94c5dc9 100644 --- a/testcases/smoke-test/smoke-secDetector/os_test_secDetector_basic_test.sh +++ b/testcases/smoke-test/smoke-secDetector/os_test_secDetector_basic_test.sh @@ -3,6 +3,8 @@ # Description: secDetector basic test # Author: lijiaming # Create: 2024-07-29 +# shellcheck disable=SC1017 + source ./common/common.sh set +e -- Gitee From adf7c74ce1b36fe9f622e692b8181ebb55ab68ee Mon Sep 17 00:00:00 2001 From: lijiaming <1228575330@qq.com> Date: Fri, 16 Aug 2024 01:39:55 +0000 Subject: [PATCH 15/17] update suite2cases/secDetector.json. Signed-off-by: lijiaming <1228575330@qq.com> --- suite2cases/secDetector.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suite2cases/secDetector.json b/suite2cases/secDetector.json index 957beb683..f79e8ea60 100644 --- a/suite2cases/secDetector.json +++ b/suite2cases/secDetector.json @@ -5,4 +5,4 @@ "name": "os_test_secDetector_basic_test" } ] -} \ No newline at end of file +} -- Gitee From 5a2e300a3894b7d8079c21564658bbd01e7688b2 Mon Sep 17 00:00:00 2001 From: lijiaming <1228575330@qq.com> Date: Mon, 21 Oct 2024 03:33:52 +0000 Subject: [PATCH 16/17] update testcases/smoke-test/smoke-secDetector/os_test_secDetector_basic_test.sh. Signed-off-by: lijiaming <1228575330@qq.com> --- .../smoke-secDetector/os_test_secDetector_basic_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/smoke-test/smoke-secDetector/os_test_secDetector_basic_test.sh b/testcases/smoke-test/smoke-secDetector/os_test_secDetector_basic_test.sh index ab94c5dc9..bd0259140 100644 --- a/testcases/smoke-test/smoke-secDetector/os_test_secDetector_basic_test.sh +++ b/testcases/smoke-test/smoke-secDetector/os_test_secDetector_basic_test.sh @@ -3,7 +3,7 @@ # Description: secDetector basic test # Author: lijiaming # Create: 2024-07-29 -# shellcheck disable=SC1017 +# shellcheck disable=SC1017,SC1091 source ./common/common.sh set +e -- Gitee From 23a32be045b438d5e98ee54a9b69f2ee26e14117 Mon Sep 17 00:00:00 2001 From: lijiaming <1228575330@qq.com> Date: Mon, 21 Oct 2024 20:42:53 +0800 Subject: [PATCH 17/17] unix format --- .../smoke-secDetector/common/common.sh | 60 ++++++------- .../os_test_secDetector_basic_test.sh | 86 +++++++++---------- 2 files changed, 73 insertions(+), 73 deletions(-) diff --git a/testcases/smoke-test/smoke-secDetector/common/common.sh b/testcases/smoke-test/smoke-secDetector/common/common.sh index 097e5a390..bfd864e04 100644 --- a/testcases/smoke-test/smoke-secDetector/common/common.sh +++ b/testcases/smoke-test/smoke-secDetector/common/common.sh @@ -1,30 +1,30 @@ -#!/bin/bash -# shellcheck disable=SC1017 - -source "${OET_PATH}/libs/locallibs/common_lib.sh" - -# 部署secD -function secD_deploy() { - yum install -y gdb secDetector* - modprobe secDetector_core - modprobe secDetector_kmodule_baseline - modprobe secDetector_memory_corruption - modprobe secDetector_program_action -} - -# 移除secD -function secD_remove() { - modprobe -r secDetector_program_action - modprobe -r secDetector_memory_corruption - modprobe -r secDetector_kmodule_baseline - modprobe -r secDetector_core -} - -function secD_start() { - ulimit -l unlimited - secDetectord -} - -function secD_stop() { - pkill secDetectord -} +#!/bin/bash +# shellcheck disable=SC1017 + +source "${OET_PATH}/libs/locallibs/common_lib.sh" + +# 部署secD +function secD_deploy() { + yum install -y gdb secDetector* + modprobe secDetector_core + modprobe secDetector_kmodule_baseline + modprobe secDetector_memory_corruption + modprobe secDetector_program_action +} + +# 移除secD +function secD_remove() { + modprobe -r secDetector_program_action + modprobe -r secDetector_memory_corruption + modprobe -r secDetector_kmodule_baseline + modprobe -r secDetector_core +} + +function secD_start() { + ulimit -l unlimited + secDetectord +} + +function secD_stop() { + pkill secDetectord +} diff --git a/testcases/smoke-test/smoke-secDetector/os_test_secDetector_basic_test.sh b/testcases/smoke-test/smoke-secDetector/os_test_secDetector_basic_test.sh index bd0259140..9c662268a 100644 --- a/testcases/smoke-test/smoke-secDetector/os_test_secDetector_basic_test.sh +++ b/testcases/smoke-test/smoke-secDetector/os_test_secDetector_basic_test.sh @@ -1,43 +1,43 @@ -#!/bin/bash -# Copyright (c), 2024-2024, HUAWEI tech. Co., Ltd. -# Description: secDetector basic test -# Author: lijiaming -# Create: 2024-07-29 -# shellcheck disable=SC1017,SC1091 - -source ./common/common.sh -set +e - -function pre_test() { - secD_deploy - secD_start - useradd tester -} - -function run_test() { - python client.py > res.txt - grep 'event_name:sched_process_fork' res.txt - CHECK_RESULT $? - grep 'event_name:readfile' res.txt - CHECK_RESULT $? - grep 'event_name:execve_cmd' res.txt - CHECK_RESULT $? - grep 'event_name:createfile' res.txt - CHECK_RESULT $? - grep 'event_name:delfile' res.txt - CHECK_RESULT $? - grep 'event_name:commit_creds' res.txt - CHECK_RESULT $? - grep 'event_type=createpipe' res.txt - CHECK_RESULT $? - -} - -function post_test() { - rm -rf res.txt - userdel -r tester - secD_stop - secD_remove -} - -main "$@" +#!/bin/bash +# Copyright (c), 2024-2024, HUAWEI tech. Co., Ltd. +# Description: secDetector basic test +# Author: lijiaming +# Create: 2024-07-29 +# shellcheck disable=SC1017,SC1091 + +source ./common/common.sh +set +e + +function pre_test() { + secD_deploy + secD_start + useradd tester +} + +function run_test() { + python client.py > res.txt + grep 'event_name:sched_process_fork' res.txt + CHECK_RESULT $? + grep 'event_name:readfile' res.txt + CHECK_RESULT $? + grep 'event_name:execve_cmd' res.txt + CHECK_RESULT $? + grep 'event_name:createfile' res.txt + CHECK_RESULT $? + grep 'event_name:delfile' res.txt + CHECK_RESULT $? + grep 'event_name:commit_creds' res.txt + CHECK_RESULT $? + grep 'event_type=createpipe' res.txt + CHECK_RESULT $? + +} + +function post_test() { + rm -rf res.txt + userdel -r tester + secD_stop + secD_remove +} + +main "$@" -- Gitee