From 4d58651a7a7d462553f049d629b569fd7fcc1460 Mon Sep 17 00:00:00 2001 From: Pengfei Xu Date: Mon, 6 Nov 2023 15:20:26 +0800 Subject: [PATCH 1/2] ifs_common.sh: fix the atom core judgement problem Fix the atom core judgement, [[ $() ]] should be removed, it is always judged to be true. Signed-off-by: Pengfei Xu --- ifs/ifs_common.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ifs/ifs_common.sh b/ifs/ifs_common.sh index ad7d6a10..4b0a4231 100755 --- a/ifs/ifs_common.sh +++ b/ifs/ifs_common.sh @@ -177,14 +177,14 @@ cpuid_check_atom() { cpu_num=$(grep -c "processor" /proc/cpuinfo) cpu_id=$((cpu_num - 1)) # Check if CPU0 is ATOM - [[ $(taskset -c 0 "$cpu_check" 1a 0 0 0 a 29) ]] || { + taskset -c 0 "$cpu_check" 1a 0 0 0 a 29 && { test_print_trc "CPU0 CPUID(EAX=0x1a),EAX bit29 is 1:ATOM" IS_ATOM="$TRUE" return 0 } # Check max CPU ID is ATOM - [[ $(taskset -c "$cpu_id" "$cpu_check" 1a 0 0 0 a 29) ]] || { + taskset -c "$cpu_id" "$cpu_check" 1a 0 0 0 a 29 && { test_print_trc "CPU num:$cpu_id CPUID(EAX=0x1a),EAX bit29 is 1:ATOM" IS_ATOM="$TRUE" return 0 From 5ffe1297308325ee34588bd4d2a0e2d358d5f51b Mon Sep 17 00:00:00 2001 From: Pengfei Xu Date: Mon, 6 Nov 2023 16:19:44 +0800 Subject: [PATCH 2/2] ifs: skip ATOM offline CPU and scan sibling CPU tests and add interval time 1. Skip ATOM offline CPU and scan sibling CPU tests, because ATOM CPU doesn't have sibling CPU. 2. Add the interval time as spec mentioned. Signed-off-by: Pengfei Xu --- ifs/ifs_common.sh | 2 ++ ifs/ifs_tests.sh | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ifs/ifs_common.sh b/ifs/ifs_common.sh index 4b0a4231..5e06f42a 100755 --- a/ifs/ifs_common.sh +++ b/ifs/ifs_common.sh @@ -974,6 +974,8 @@ ifs_scan_loop() { for ((i=1; i<=times; i++)); do test_print_trc "Scan loop times:$i" + # SPEC: Target 100ms at lowest frequency for all test content on a given core. + sleep 0.1 # If there is bin app, execute the app in target CPU [[ -n "$bin" ]] && { taskset -c "$cpu_num" "$bin" & diff --git a/ifs/ifs_tests.sh b/ifs/ifs_tests.sh index 379897bb..3b2fb938 100755 --- a/ifs/ifs_tests.sh +++ b/ifs/ifs_tests.sh @@ -92,6 +92,7 @@ run_ifs_tests() { ;; legacy_twice_run) online_all_cpu + modprobe -r "$IFS_NAME" enable_ifs_trace do_cmd "echo $BATCH_NUM > ${IFS_PATH}/${BATCH}" # Need to wait after boot up 1800s, then could test ifs @@ -132,13 +133,12 @@ run_ifs_tests() { ;; "$IFS_OFFLINE") online_all_cpu - enable_ifs_trace is_atom [[ "$IS_ATOM" == "$TRUE" ]] && { - if [[ "$BATCH_NUM" -eq 3 ]]; then - skip_test "It's an atom CPU, no sibling CPU for ifs testing." - fi + skip_test "It's an atom CPU, no sibling CPU for ifs testing." } + modprobe -r "$IFS_NAME" + enable_ifs_trace do_cmd "echo $BATCH_NUM > ${IFS_PATH}/${BATCH}" init_log "${NAME}_${BATCH_NUM}"