summaryrefslogtreecommitdiff
path: root/Makefile-libglnx.am
diff options
context:
space:
mode:
authorPhilip Withnall <withnall@endlessm.com>2017-09-26 12:55:39 +0100
committerPhilip Withnall <withnall@endlessm.com>2017-09-26 15:08:04 +0100
commite30154431d7eea6397e5502b175ba3b50330140f (patch)
tree79a0cfb620375c85c3efd9f97b100f91ce8d5605 /Makefile-libglnx.am
parent32a4293101ffe6f7dcbcf2856849b3549d468ea1 (diff)
downloadlibglnx-e30154431d7eea6397e5502b175ba3b50330140f.tar.gz
shutil: Fix assertion failure in glnx_shutil_mkdir_p_at()
If the directory for @dfd is deleted after being opened, glnx_shutil_mkdir_p_at() would fail with an assertion failure. Fix that, and make it return an ENOENT error instead. Add a unit test. Signed-off-by: Philip Withnall <withnall@endlessm.com> Reviewed-by: Colin Walters <walters@verbum.org> Reviewed-by: Jonathan Lebon <jlebon@redhat.com> https://github.com/ostreedev/ostree/issues/1215
Diffstat (limited to 'Makefile-libglnx.am')
-rw-r--r--Makefile-libglnx.am6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile-libglnx.am b/Makefile-libglnx.am
index de6e49b..158063c 100644
--- a/Makefile-libglnx.am
+++ b/Makefile-libglnx.am
@@ -53,7 +53,7 @@ libglnx_la_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags)
libglnx_la_LDFLAGS = -avoid-version -Bsymbolic-functions -export-symbols-regex "^glnx_" -no-undefined -export-dynamic
libglnx_la_LIBADD = $(libglnx_libs)
-libglnx_tests = test-libglnx-xattrs test-libglnx-fdio test-libglnx-errors test-libglnx-macros
+libglnx_tests = test-libglnx-xattrs test-libglnx-fdio test-libglnx-errors test-libglnx-macros test-libglnx-shutil
TESTS += $(libglnx_tests)
check_PROGRAMS += $(libglnx_tests)
@@ -72,3 +72,7 @@ test_libglnx_errors_LDADD = $(libglnx_libs) libglnx.la
test_libglnx_macros_SOURCES = $(libglnx_srcpath)/tests/test-libglnx-macros.c
test_libglnx_macros_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags)
test_libglnx_macros_LDADD = $(libglnx_libs) libglnx.la
+
+test_libglnx_shutil_SOURCES = $(libglnx_srcpath)/tests/test-libglnx-shutil.c
+test_libglnx_shutil_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags)
+test_libglnx_shutil_LDADD = $(libglnx_libs) libglnx.la