Skip to content

Commit 6654e7d

Browse files
committed
CI: Various Improvements to CI
* XPMEM build failure due to use of deprecated paging macros #1206 * pud_large() and pmd_large() are not supported in newer Linux kernels * Stubbed out pud_large() and pmd_large() referenced in xpmem_vaddr_to_pte_offset() via CI build script * xpmem_vaddr_to_pte_offset() not used by SOS, so tests are not impacted * Added timeout for SOS tests * Added core dump artifact uploading and logging support * Updated OFI testing to version 2.1.x * Disabled failing Portals 4 tests #1208 Signed-off-by: Mark F. Brown <mark.f.brown@intel.com>
1 parent 8f925b0 commit 6654e7d

File tree

3 files changed

+198
-43
lines changed

3 files changed

+198
-43
lines changed

.github/scripts/gdb_dump_info.cmd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
set pagination off
2+
info threads
3+
list
4+
thread apply all backtrace 50
5+
detach
6+
quit

.github/scripts/scan_core.sh

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/bin/bash
2+
# Copyright(c) 2025 Intel Corporation. All rights reserved.
3+
4+
CORE_DIR="/tmp/core"
5+
CORE_OUTPUT=$(mktemp /tmp/debug.XXXXXX)
6+
CORE_ARCHIVE=${GITHUB_WORKSPACE}/archives
7+
CORE_ARCHIVE_DUMP=${CORE_ARCHIVE}/core_files
8+
9+
case $1 in
10+
init)
11+
echo "notice: enabling core dump artifacts support"
12+
mkdir "${CORE_ARCHIVE}" ${CORE_DIR}
13+
if [ ! -e "${CORE_ARCHIVE}" ] || [ ! -e "${CORE_DIR}" ]; then
14+
echo "error: creating core archive"
15+
exit 2
16+
fi
17+
18+
sudo bash -c 'echo '"${CORE_DIR}"'/%E.%p.core > /proc/sys/kernel/core_pattern'
19+
echo "set debuginfod enabled on" > "${HOME}"/.gdbinit
20+
;;
21+
scan)
22+
echo "notice: scanning for core dump files"
23+
mkdir -p "${CORE_ARCHIVE}" "${CORE_ARCHIVE_DUMP}"
24+
25+
if [ ! -e "${CORE_ARCHIVE}" ] || [ ! -e "${CORE_ARCHIVE_DUMP}" ]; then
26+
echo "error: creating core archive"
27+
exit 2
28+
fi
29+
30+
core_list=$(find ${CORE_DIR} -name '*.core' -type f -printf '%f;')
31+
IFS=';'
32+
for core in ${core_list}
33+
do
34+
exe=$(echo "${core}" | sed 's/\.[0-9]*\.core$//' | sed 's/\!/\//g')
35+
echo -e "\n---\nDumping core dump info for: ${exe}\n---\n" >> "${CORE_OUTPUT}"
36+
gdb --batch -x "${GITHUB_WORKSPACE}"/.github/scripts/gdb_dump_info.cmd -c "${CORE_DIR}"/"${core}" "${exe}" >> "${CORE_OUTPUT}"
37+
# copy core file to artifact location
38+
core_file_demangled=$(echo "${CORE_DIR}"/"${core}" | sed 's/\!/\//g')
39+
core_file=$(basename "$core_file_demangled")
40+
cp "${CORE_DIR}"/"${core}" "${CORE_ARCHIVE_DUMP}"/"${core_file}"
41+
done
42+
43+
if [ "${core_list}" == "" ]; then
44+
echo "notice: no core dump files found"
45+
exit 0
46+
fi
47+
48+
echo "notice: core dump files detected"
49+
cat "${CORE_OUTPUT}"
50+
51+
cd "${GITHUB_WORKSPACE}" || exit 3
52+
tar -cvzf "${CORE_ARCHIVE}"/sos_test.tar.gz build
53+
cp "${CORE_OUTPUT}" "${CORE_ARCHIVE}"/output.txt
54+
;;
55+
*)
56+
echo "error: invalid parameter specified"
57+
exit 1
58+
;;
59+
esac

0 commit comments

Comments
 (0)