aboutsummaryrefslogtreecommitdiff
path: root/tests/test_utils.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@users.noreply.github.com>2026-05-11 15:47:09 -0400
committerGitHub <noreply@github.com>2026-05-11 15:47:09 -0400
commit4649a889a916aa377ebd3ca8f3daa9ac703baa34 (patch)
tree993173328bdf96eb469c2412241f202cdbc5cf53 /tests/test_utils.c
parent58d3ca17dcd3f8b3aeb50b8e4f24afc76d33ff26 (diff)
parentb7a60c5bed989a52a53b8b697203f55367f55a89 (diff)
downloadstasis-4649a889a916aa377ebd3ca8f3daa9ac703baa34.tar.gz
Merge pull request #143 from jhunkeler/use-sys-macros
Replace msg, perror, and fprintf with SYS message 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);