github.com/kubiko/snapd@v0.0.0-20201013125620-d4f3094d9ddf/cmd/libsnap-confine-private/test-utils.h (about) 1 /* 2 * Copyright (C) 2017 Canonical Ltd 3 * 4 * This program is free software: you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License version 3 as 6 * published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details. 12 * 13 * You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 * 16 */ 17 18 #ifndef SNAP_CONFINE_TEST_UTILS_H 19 #define SNAP_CONFINE_TEST_UTILS_H 20 21 /** 22 * Shell-out to "rm -rf -- $dir" as long as $dir is in /tmp. 23 */ 24 void rm_rf_tmp(const char *dir); 25 26 /** 27 * Create an argc + argv pair out of a NULL terminated argument list. 28 **/ 29 void 30 __attribute__((sentinel)) test_argc_argv(int *argcp, char ***argvp, ...); 31 32 #endif