mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Signed-off-by: Stéphane Rochoy <stephane.rochoy@stormshield.eu> Reviewed by: markj, oshogbo MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1546 (cherry picked from commit 3dc18af5770f9fc820343021d63dfc4cf09d9906)
25 lines
534 B
Bash
25 lines
534 B
Bash
#
|
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
#
|
|
# Copyright (c) 2025 Stéphane Rochoy <stephane.rochoy@stormshield.eu>
|
|
#
|
|
|
|
atf_test_case log_perror
|
|
log_perror_head()
|
|
{
|
|
atf_set "descr" "Test LOG_PERROR behavior"
|
|
}
|
|
log_perror_body()
|
|
{
|
|
atf_check -s exit:1 \
|
|
-o ignore \
|
|
-e save:savecore.err \
|
|
savecore -vC /dev/missing
|
|
grep -qE 'savecore [0-9]+ - - /dev/missing: No such file or directory' savecore.err \
|
|
|| atf_fail "missing/invalid error output"
|
|
}
|
|
|
|
atf_init_test_cases()
|
|
{
|
|
atf_add_test_case log_perror
|
|
}
|