diff --git a/src/import/meson.build b/src/import/meson.build
index e1670da817..4aec57373a 100644
--- a/src/import/meson.build
+++ b/src/import/meson.build
@@ -93,6 +93,10 @@ executables += [
'name' : 'systemd-import-generator',
'sources' : files('import-generator.c'),
},
+ test_template + {
+ 'sources' : files('test-tar-extract.c'),
+ 'type' : 'manual',
+ },
test_template + {
'sources' : files('test-qcow2.c'),
'objects' : ['systemd-importd'],
@@ -100,6 +104,7 @@ executables += [
'conditions' : ['HAVE_ZLIB'],
'type' : 'manual',
},
+
]
install_data('org.freedesktop.import1.conf',
diff --git a/src/import/test-tar-extract.c b/src/import/test-tar-extract.c
new file mode 100644
index 0000000000..f7fa06f044
--- /dev/null
+++ b/src/import/test-tar-extract.c
@@ -0,0 +1,37 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+#include "fd-util.h"
+#include "libarchive-util.h"
+#include "main-func.h"
+#include "tar-util.h"
+#include "tests.h"
+
+static int run(int argc, char **argv) {
+ int r;
+
+ test_setup_logging(LOG_DEBUG);
+
+ if (argc != 3)
+ return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
+ "Need two arguments exactly: