]> git.ipfire.org Git - pakfire.git/commitdiff
tests: Bind-mount the test command to the jail
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 25 Sep 2023 13:58:33 +0000 (13:58 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 25 Sep 2023 13:58:33 +0000 (13:58 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tests/testsuite.c

index 519e0f2bd5282fa19293ccc8658ad81c35206d29..06714d4ed47dd470bffad8ac935ecbdc4ae326eb 100644 (file)
@@ -25,6 +25,7 @@
 #include "testsuite.h"
 
 #include <pakfire/logging.h>
+#include <pakfire/mount.h>
 #include <pakfire/pakfire.h>
 #include <pakfire/util.h>
 
@@ -70,7 +71,7 @@ static int test_run(int i, struct test* t) {
        }
 
        // Copy command into environment
-       r = pakfire_copy_in(t->pakfire, TEST_STUB_COMMAND, "/command");
+       r = pakfire_bind(t->pakfire, TEST_STUB_COMMAND, "/command", 0);
        if (r) {
                LOG("ERROR: Could not copy command: %m\n");
                goto ERROR;