diff --git a/test/tracepointtest/Kconfig b/test/tracepointtest/Kconfig index fd45a965a1f0a1bee26b254b6b5607926dfe4513..f397380e6191c231eafa4fefc66d3696b48d2bc7 100644 --- a/test/tracepointtest/Kconfig +++ b/test/tracepointtest/Kconfig @@ -22,8 +22,4 @@ source "drivers/tracepointtest/vendordomprotectpkey_test/Kconfig" source "drivers/tracepointtest/tracepoint_test/Kconfig" -source "drivers/tracepointtest/vendoramlemmcpartition_test/Kconfig" - -source "drivers/tracepointtest/vendorfakebootpartition_test/Kconfig" - endmenu diff --git a/test/tracepointtest/Makefile b/test/tracepointtest/Makefile index 9624dbe920ad33048487d77474c3e28fdb10eb1e..4eb15ee17040b3622612cbce674d8cbc641fec43 100644 --- a/test/tracepointtest/Makefile +++ b/test/tracepointtest/Makefile @@ -17,5 +17,3 @@ obj-$(CONFIG_TRACEPOINT_MMAP) += vendordommap_test/ obj-$(CONFIG_TRACEPOINT_MPROTECT_PKEY) += vendordomprotectpkey_test/ obj-$(CONFIG_TRACEPOINT_TEST) += tracepoint_test/ -obj-$(CONFIG_TRACEPOINT_AML_EMMC_PARTITION) += vendoramlemmcpartition_test/ -obj-$(CONFIG_TRACEPOINT_FAKE_BOOT_PARTITION) += vendorfakebootpartition_test/ diff --git a/test/tracepointtest/rockchip_linux_defconfig b/test/tracepointtest/rockchip_linux_defconfig index 013b51a1d97e59a06be3bf4f0a9dc87bd6f03fb1..39aa610a08dfb59213ee3da66b130d84f3b9931f 100644 --- a/test/tracepointtest/rockchip_linux_defconfig +++ b/test/tracepointtest/rockchip_linux_defconfig @@ -19,5 +19,3 @@ CONFIG_VENDOR_HOOKS=y CONFIG_TRACEPOINT_MMAP=m CONFIG_TRACEPOINT_MPROTECT_PKEY=m CONFIG_TRACEPOINT_TEST=m -CONFIG_TRACEPOINT_AML_EMMC_PARTITION=m -CONFIG_TRACEPOINT_FAKE_BOOT_PARTITION=m diff --git a/test/tracepointtest/tracepoint.sh b/test/tracepointtest/tracepoint.sh index 1d8c5529067556d01ebf894af7c3c7573b90f3ad..c573776045b2d1fa5b96e3b67f13dbf66152c7da 100755 --- a/test/tracepointtest/tracepoint.sh +++ b/test/tracepointtest/tracepoint.sh @@ -67,12 +67,10 @@ modify_config() { modify_files() { KCONFIG=${DRIVERS_DIR}/Kconfig MAKEFILE=${DRIVERS_DIR}/Makefile - VENDOR_HOOKS=${DRIVERS_DIR}/hooks/vendor_hooks.c TMPFILE=${DRIVERS_DIR}/tmp cp -f ${KCONFIG} ${KCONFIG}_tmpfile cp -f ${MAKEFILE} ${MAKEFILE}_tmpfile - cp -f ${VENDOR_HOOKS} ${VENDOR_HOOKS}_tmpfile if [ -e ${TMPFILE} ]; then rm -f ${TMPFILE} @@ -92,14 +90,6 @@ modify_files() { done <${MAKEFILE} echo "obj-y += tracepointtest/" >>${TMPFILE} mv ${TMPFILE} ${MAKEFILE} - - while read line; do - echo "$line" >>${TMPFILE} - done <${VENDOR_HOOKS} - echo "#include " >>${TMPFILE} - echo "EXPORT_TRACEPOINT_SYMBOL_GPL(vendor_aml_emmc_partition);" >>${TMPFILE} - echo "EXPORT_TRACEPOINT_SYMBOL_GPL(vendor_fake_boot_partition);" >>${TMPFILE} - mv ${TMPFILE} ${VENDOR_HOOKS} } compile() { @@ -118,14 +108,17 @@ compile() { } collect_ko() { - if [ -e ${OBJ_DIR}/kofiles ]; then - rm -f ${OBJ_DIR}/kofiles - mkdir -p ${OBJ_DIR}/kofiles + if [ -e ${OBJ_DIR}/tracepointtest/kofiles ]; then + rm -f ${OBJ_DIR}/tracepointtest/kofiles + mkdir -p ${OBJ_DIR}/tracepointtest/kofiles else - mkdir -p ${OBJ_DIR}/kofiles + mkdir -p ${OBJ_DIR}/tracepointtest/kofiles fi - find ${DRIVERS_TRACEPOINT_DIR} -name '*.ko' | xargs cp -t ${OBJ_DIR}/kofiles + find ${DRIVERS_TRACEPOINT_DIR} -name '*.ko' | xargs cp -t ${OBJ_DIR}/tracepointtest/kofiles + cp ${ROOT_FILE_DIR}/tracepointtestko.sh ${OBJ_DIR}/tracepointtest/ + cd ${OBJ_DIR} + tar -zcvf tracepointtest.tar.gz ./tracepointtest } restore() { diff --git a/test/tracepointtest/tracepoint_test/tracepoint_test.c b/test/tracepointtest/tracepoint_test/tracepoint_test.c index 99343d659ab0a684d4b17c6ad20a42a97e46fc6d..ab46395eac2a42fd9c0bf3955483eb7089f1c62b 100644 --- a/test/tracepointtest/tracepoint_test/tracepoint_test.c +++ b/test/tracepointtest/tracepoint_test/tracepoint_test.c @@ -24,8 +24,6 @@ static int tracepoint_test_init_module(void) pr_info("tracepoint test module init\n"); trace_vendor_do_mmap(NULL, NULL); trace_vendor_do_mprotect_pkey(NULL, NULL); - trace_vendor_aml_emmc_partition(NULL, NULL); - trace_vendor_fake_boot_partition(NULL, NULL); return 0; } diff --git a/test/tracepointtest/tracepointtestko.sh b/test/tracepointtest/tracepointtestko.sh index ebe8c0d0e51e965d8c12a38c816299b6de323e63..5e837f6b2ab8e169119566166e5409eeb1c4c2ba 100755 --- a/test/tracepointtest/tracepointtestko.sh +++ b/test/tracepointtest/tracepointtestko.sh @@ -26,7 +26,7 @@ ################################################################################ CURRENT_DIR=$(pwd) -KO_DIR=${CURRENT_DIR}/kofile +KO_DIR=${CURRENT_DIR}/kofiles insmod_ko() { for file in $(ls ${KO_DIR}); do @@ -43,7 +43,7 @@ insmod_ko() { exit 1 fi - arr=(vendor_do_mmap vendor_do_mprotect_pkey vendor_aml_emmc_partition vendor_fake_boot_partition) + arr=(vendor_do_mmap vendor_do_mprotect_pkey) for i in ${arr[@]}; do dmesg | grep $i >/dev/null if [ $? -eq 0 ]; then @@ -52,6 +52,12 @@ insmod_ko() { echo "tracepoint $i failed" fi done + + for file in $(ls ${KO_DIR}); do + rmmod ${KO_DIR}/${file} + echo "${KO_DIR}/${file} is removed" + done + } rmmod_ko() {