File tree Expand file tree Collapse file tree 2 files changed +18
-13
lines changed
Expand file tree Collapse file tree 2 files changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -227,23 +227,23 @@ steps:
227227
228228 echo "+++ Run coredump checks"
229229
230- # Ensure that all files are above 5k (e.g. not empty tar/zstd streams)
230+ # Ensure that all files are above 20k (e.g. not empty tar/zstd streams)
231231 for f in *.core*; do
232- echo -n "Check that $${f} is > 5kb : "
233- (( "$$(stat -c%s "$${f}")" > 5120 ))
232+ echo -n "Check that $${f} is > 20kb : "
233+ (( "$$(stat -c%s "$${f}")" > 20480 ))
234234 echo "✔️"
235235 done
236236
237- echo -n "Seven corefiles overall: "
238- [[ "$$(ls *.core* | wc -l)" == "7 " ]]
237+ echo -n "Eight corefiles overall: "
238+ [[ "$$(ls *.core* | wc -l)" == "8 " ]]
239239 echo "✔️"
240240
241241 echo -n "Three zstd julia corefiles: "
242242 [[ "$$(ls julia-*.core.zst | wc -l)" == "3" ]]
243243 echo "✔️"
244244
245- echo -n "One raw bash corefile: "
246- [[ "$$(ls bash-*.core | wc -l)" == "1 " ]]
245+ echo -n "Two raw bash corefile: "
246+ [[ "$$(ls bash-*.core | wc -l)" == "2 " ]]
247247 echo "✔️"
248248
249249 echo -n "One raw bash bundled bash corefile: "
Original file line number Diff line number Diff line change @@ -26,15 +26,20 @@ function compressed_bundle_names() {
2626
2727function compress_bundle() {
2828 local COREFILE=" ${1} "
29+ local BUNDLE_NAME=" $( compressed_bundle_names " ${COREFILE} " ) "
30+
31+ # Skip out early if we're not doing anything
32+ if [[ " ${COREFILE} " == " ${BUNDLE_NAME} " ]]; then
33+ return
34+ fi
2935
30- # We are going to use `tar` to bundle together one or more files:
31- declare -a FILE_LIST
3236 if [[ " ${CREATE_BUNDLE} " == " true" ]]; then
37+ # Pass the file list off to `tar` and compress it
38+ declare -a FILE_LIST
3339 readarray -t FILE_LIST < <( collect_bundle_files " ${COREFILE} " )
40+ tar hc " ${FILE_LIST[@]} " | compress > " ${BUNDLE_NAME} "
3441 else
35- FILE_LIST=( " ${COREFILE} " )
42+ # Compress the file directly
43+ compress < " ${COREFILE} " > " ${BUNDLE_NAME} "
3644 fi
37-
38- # Pass the file list off to `tar` and compress it
39- tar hc " ${FILE_LIST[@]} " | compress > " $( compressed_bundle_names " ${COREFILE} " ) "
4045}
You can’t perform that action at this time.
0 commit comments