From 7454908690615b73d57b7e09c22eddfb3a3836a8 Mon Sep 17 00:00:00 2001 From: Gabriela Cervantes Date: Tue, 30 Jul 2024 21:25:48 +0000 Subject: [PATCH] metrics: Update memory tests to use grep -F This PR updates the memory tests like fast footprint to use grep -F instead of fgrep as this command has been deprecated. Signed-off-by: Gabriela Cervantes --- tests/metrics/density/fast_footprint.sh | 4 ++-- tests/metrics/density/footprint_data.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/metrics/density/fast_footprint.sh b/tests/metrics/density/fast_footprint.sh index 9c84f57fc5..74298fcd35 100755 --- a/tests/metrics/density/fast_footprint.sh +++ b/tests/metrics/density/fast_footprint.sh @@ -179,7 +179,7 @@ EOF function grab_slab() { # Grabbing slab total from meminfo is easier than doing the math # on slabinfo - item=$(fgrep "Slab:" /proc/meminfo | awk '{print $2}') + item=$(grep -F "Slab:" /proc/meminfo | awk '{print $2}') ((item*=1024)) local json="$(cat << EOF @@ -213,7 +213,7 @@ function grab_system() { local free_decr=$((base_mem_free-item)) # Anon pages - local anon=$(fgrep "AnonPages:" /proc/meminfo | awk '{print $2}') + local anon=$(grep -F "AnonPages:" /proc/meminfo | awk '{print $2}') ((anon*=1024)) # Mapped pages diff --git a/tests/metrics/density/footprint_data.sh b/tests/metrics/density/footprint_data.sh index f5fc113411..925f2aca22 100755 --- a/tests/metrics/density/footprint_data.sh +++ b/tests/metrics/density/footprint_data.sh @@ -163,7 +163,7 @@ EOF function grab_slab() { # Grabbing slab total from meminfo is easier than doing the math # on slabinfo - item=$(fgrep "Slab:" /proc/meminfo | awk '{print $2}') + item=$(grep -F "Slab:" /proc/meminfo | awk '{print $2}') ((item*=1024)) local json="$(cat << EOF @@ -196,7 +196,7 @@ function grab_system() { local free_decr=$((base_mem_free-item)) # Anon pages - local anon=$(fgrep "AnonPages:" /proc/meminfo | awk '{print $2}') + local anon=$(grep -F "AnonPages:" /proc/meminfo | awk '{print $2}') ((anon*=1024)) # Mapped pages