From 169e4e88f8bfab688667cc7fbc62f7b081b5790e Mon Sep 17 00:00:00 2001 From: Pranav Bhandarkar Date: Wed, 13 May 2026 11:32:07 -0500 Subject: [PATCH 1/2] Apply OvO patch to fix line wrapping in compiler timing output This change implements automatic patching for the OvO test suite to prevent line wrapping in compiler timing output logs. Changes: - Add bin/patches/ovo.patch: Sets COLUMNS=1000 to prevent line wrapping - Update bin/patches/patch-control-file_23.0.txt: Add OvO patch entry - Modify bin/run_ovo.sh: Apply patch before test execution and remove after completion The patch sets a wide terminal width (COLUMNS=1000) both as an environment variable and explicitly in make commands to ensure compiler timing output is not wrapped, making logs more readable. Co-Authored-By: Claude Sonnet 4 --- bin/patches/ovo.patch | 25 +++++++++++++++++++++++++ bin/patches/patch-control-file_23.0.txt | 1 + bin/run_ovo.sh | 6 ++++++ 3 files changed, 32 insertions(+) create mode 100644 bin/patches/ovo.patch diff --git a/bin/patches/ovo.patch b/bin/patches/ovo.patch new file mode 100644 index 0000000000..38b2452250 --- /dev/null +++ b/bin/patches/ovo.patch @@ -0,0 +1,25 @@ +diff --git a/ovo.sh b/ovo.sh +index 2da7d7ca..0f83db48 100755 +--- a/ovo.sh ++++ b/ovo.sh +@@ -10,6 +10,8 @@ fclean() { for dir in $(find_tests_folder $@); do make --silent -C "$dir" clean; + frun() { + SYNC=$(make -v | head -n1 | awk '$NF >= 4 {print "--output-sync"}') + if [ -n "$SYNC" ]; then NPROC=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null); fi ++ # Set wide terminal width to prevent line wrapping in compiler timing output ++ export COLUMNS=1000 + export MAKEFLAGS="${MAKEFLAGS:--j${NPROC:-1} $SYNC}" + + for dir in $(find_tests_folder $@); do +@@ -24,9 +26,9 @@ frun() { + set +x + } &> "$nresult"/env.log + # Compile in parallel +- make --no-print-directory -C "$dir" exe 2>&1 | tee "$nresult"/compilation.log ++ COLUMNS=1000 make --no-print-directory -C "$dir" exe 2>&1 | tee "$nresult"/compilation.log + # But Run serially +- make -j1 --no-print-directory -C "$dir" run 2>&1 | tee "$nresult"/runtime.log ++ COLUMNS=1000 make -j1 --no-print-directory -C "$dir" run 2>&1 | tee "$nresult"/runtime.log + done + } + diff --git a/bin/patches/patch-control-file_23.0.txt b/bin/patches/patch-control-file_23.0.txt index ba011601eb..d49acc5870 100644 --- a/bin/patches/patch-control-file_23.0.txt +++ b/bin/patches/patch-control-file_23.0.txt @@ -11,3 +11,4 @@ rocprofiler: rocprofiler-combined-no-aql-ok-fix-cov6.patch babelstream: babelstream-usm.patch llvm-project: ATD_ASO_full.patch UMT: umt.patch +OvO: ovo.patch diff --git a/bin/run_ovo.sh b/bin/run_ovo.sh index 8245a06ad8..bdf6b704c2 100755 --- a/bin/run_ovo.sh +++ b/bin/run_ovo.sh @@ -25,6 +25,9 @@ OMP_TARGET_OFFLOAD=mandatory export AOMP AOMP_GPU PATH CXX FC FFLAGS CXXFLAGS OMP_TARGET_OFFLOAD +# Apply OvO patch before running tests +patchrepo "$AOMP_REPOS_TEST/$AOMP_OVO_REPO_NAME" + cd $AOMP_REPOS_TEST/$AOMP_OVO_REPO_NAME rm -f ovo.run.log* HALF_THREADS=$(( AOMP_JOB_THREADS/2 )) @@ -46,3 +49,6 @@ if [ "$1" == "log" ]; then ./ovo.sh report --failed 2>&1 | tee $log ./ovo.sh report --passed 2>&1 | tee -a $log fi + +# Remove patch after test execution +removepatch "$AOMP_REPOS_TEST/$AOMP_OVO_REPO_NAME" From 0ca502f1d3871b838a34223a53105866af3bff3f Mon Sep 17 00:00:00 2001 From: Pranav Bhandarkar Date: Tue, 19 May 2026 16:29:24 -0500 Subject: [PATCH 2/2] Fix shellcheck issues in run_ovo.sh Address shellcheck warnings and style issues: - Replace backticks with $() for command substitution (SC2006) - Add double quotes to prevent globbing and word splitting (SC2086) - Add '|| exit' to cd command for proper error handling (SC2164) These changes improve script robustness and follow modern bash best practices. Co-Authored-By: Claude Sonnet 4 --- bin/run_ovo.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/run_ovo.sh b/bin/run_ovo.sh index bdf6b704c2..e9413a51a7 100755 --- a/bin/run_ovo.sh +++ b/bin/run_ovo.sh @@ -1,11 +1,11 @@ #!/bin/bash # --- Start standard header to set AOMP environment variables ---- -realpath=`realpath $0` -thisdir=`dirname $realpath` +realpath=$(realpath "$0") +thisdir=$(dirname "$realpath") export AOMP_USE_CCACHE=0 -. $thisdir/aomp_common_vars +. "$thisdir"/aomp_common_vars # --- end standard header ---- # Setup AOMP variables @@ -15,7 +15,7 @@ FLANG=${FLANG:-flang} # Use function to set and test AOMP_GPU setaompgpu -AOMP_GPU=${AOMP_GPU:-`$AOMP/bin/mygpu`} +AOMP_GPU=${AOMP_GPU:-$("$AOMP"/bin/mygpu)} PATH=$AOMP/bin:$PATH CXX=clang++ FC=$FLANG @@ -28,7 +28,7 @@ export AOMP AOMP_GPU PATH CXX FC FFLAGS CXXFLAGS OMP_TARGET_OFFLOAD # Apply OvO patch before running tests patchrepo "$AOMP_REPOS_TEST/$AOMP_OVO_REPO_NAME" -cd $AOMP_REPOS_TEST/$AOMP_OVO_REPO_NAME +cd "$AOMP_REPOS_TEST/$AOMP_OVO_REPO_NAME" || exit rm -f ovo.run.log* HALF_THREADS=$(( AOMP_JOB_THREADS/2 )) echo "Using $HALF_THREADS threads for make." @@ -37,7 +37,7 @@ export MAKEFLAGS=-j$HALF_THREADS ./ovo.sh run ./ovo.sh report --summary -date=${BLOG_DATE:-`date '+%Y-%m-%d'`} +date=${BLOG_DATE:-$(date '+%Y-%m-%d')} if [ "$1" == "log" ]; then if [ "$2" != "" ]; then prefix=$2 @@ -46,8 +46,8 @@ if [ "$1" == "log" ]; then log="ovo.run.log.$date" fi echo "Log enabled: $log" - ./ovo.sh report --failed 2>&1 | tee $log - ./ovo.sh report --passed 2>&1 | tee -a $log + ./ovo.sh report --failed 2>&1 | tee "$log" + ./ovo.sh report --passed 2>&1 | tee -a "$log" fi # Remove patch after test execution