-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Stéphane Rochoy <[email protected]>
- Loading branch information
1 parent
3d688bd
commit e03cff4
Showing
2 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
ATF_TESTS_SH= livedump_test | ||
ATF_TESTS_SH= livedump_test log_test | ||
|
||
.include <bsd.test.mk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# | ||
# SPDX-License-Identifier: BSD-2-Clause | ||
# | ||
# Copyright (c) 2024 Stéphane Rochoy <[email protected]> | ||
# | ||
|
||
atf_test_case log_perror | ||
log_perror_head() | ||
{ | ||
atf_set "descr" "Test LOG_PERROR behavior" | ||
} | ||
log_perror_body() | ||
{ | ||
local savecore=${DESTDIR:-''}/sbin/savecore | ||
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" | ||
} | ||
log_perror_cleanup() | ||
{ | ||
rm savecore.err | ||
} | ||
|
||
atf_init_test_cases() | ||
{ | ||
atf_add_test_case log_perror | ||
} |