@@ -232,11 +232,13 @@ task:
232
232
CCACHE_DIR : /home/postgres/cache
233
233
234
234
PATH : /usr/sbin:$PATH
235
+ CORE_DUMP_DIR : /var/crash
235
236
236
237
matrix :
237
238
- name : NetBSD - Meson
238
239
only_if : $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*netbsd.*'
239
240
env :
241
+ OS_NAME : netbsd
240
242
IMAGE_FAMILY : pg-ci-netbsd-postgres
241
243
PKGCONFIG_PATH : ' /usr/lib/pkgconfig:/usr/pkg/lib/pkgconfig'
242
244
# initdb fails with: 'invalid locale settings' error on NetBSD.
@@ -253,12 +255,15 @@ task:
253
255
- name : OpenBSD - Meson
254
256
only_if : $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*openbsd.*'
255
257
env :
258
+ OS_NAME : openbsd
256
259
IMAGE_FAMILY : pg-ci-openbsd-postgres
257
260
PKGCONFIG_PATH : ' /usr/lib/pkgconfig:/usr/local/lib/pkgconfig'
258
261
UUID : -Duuid=e2fs
259
262
TCL : -Dtcl_version=tcl86
260
263
setup_additional_packages_script : |
261
264
#pkg_add -I ...
265
+ # Always core dump to ${CORE_DUMP_DIR}
266
+ set_core_dump_script : sysctl -w kern.nosuidcoredump=2
262
267
<< : *openbsd_task_template
263
268
264
269
sysinfo_script : |
@@ -276,6 +281,10 @@ task:
276
281
chown -R postgres:users /home/postgres
277
282
mkdir -p ${CCACHE_DIR}
278
283
chown -R postgres:users ${CCACHE_DIR}
284
+ setup_core_files_script : |
285
+ mkdir -p ${CORE_DUMP_DIR}
286
+ chmod -R 770 ${CORE_DUMP_DIR}
287
+ chown -R postgres:users ${CORE_DUMP_DIR}
279
288
280
289
# -Duuid=bsd is not set since 'bsd' uuid option
281
290
# is not working on NetBSD & OpenBSD. See
@@ -306,6 +315,12 @@ task:
306
315
307
316
on_failure :
308
317
<< : *on_failure_meson
318
+ cores_script : |
319
+ # Although we try to configure the OS to core dump inside
320
+ # ${CORE_DUMP_DIR}, they may not obey this. So, move core files to the
321
+ # ${CORE_DUMP_DIR} directory.
322
+ find build/ -type f -name '*.core' -exec mv '{}' ${CORE_DUMP_DIR} \;
323
+ src/tools/ci/cores_backtrace.sh ${OS_NAME} ${CORE_DUMP_DIR}
309
324
310
325
311
326
# configure feature flags, shared between the task running the linux tests and
0 commit comments