aboutsummaryrefslogtreecommitdiff
path: root/tests/test_utils.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-05-11 15:24:53 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-05-11 15:34:45 -0400
commitb7a60c5bed989a52a53b8b697203f55367f55a89 (patch)
tree993173328bdf96eb469c2412241f202cdbc5cf53 /tests/test_utils.c
parent58d3ca17dcd3f8b3aeb50b8e4f24afc76d33ff26 (diff)
downloadstasis-b7a60c5bed989a52a53b8b697203f55367f55a89.tar.gz
Replace msg, perror, and fprintf with SYS message macrosuse-sys-macros
Diffstat (limited to 'tests/test_utils.c')
-rw-r--r--tests/test_utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_utils.c b/tests/test_utils.c
index 119dea3..696e7ff 100644
--- a/tests/test_utils.c
+++ b/tests/test_utils.c
@@ -276,7 +276,7 @@ void test_file_readlines() {
const char *data = "I am\na file\nwith multiple lines\nsee?\n";
FILE *fp = fopen(filename, "w");
if (!fp) {
- perror(filename);
+ SYSERROR("unable to open file: %s, %s", filename, strerror(errno));
return;
}
if (fwrite(data, sizeof(*data), strlen(data), fp) != strlen(data)) {
@@ -375,7 +375,7 @@ void test_rmtree() {
snprintf(path, sizeof(path), "%s/%s", root, tree[i]);
snprintf(mockfile, sizeof(mockfile), "%s/%zu.txt", path, i);
if (mkdir(path, 0755)) {
- perror(path);
+ SYSERROR("mkdir failed: %s, %s", path, strerror(errno));
STASIS_ASSERT(false, NULL);
}
touch(mockfile);