[LTP] [PATCH v2 5/6] Removed obsolete mountns_helper.h

Andrea Cervesato andrea.cervesato@suse.de
Mon Feb 28 14:32:55 CET 2022


After refactoring mountns testing suite, helper is no longer needed
since it has been replaced by mountns.h

Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.de>
---
 .../containers/mountns/mountns_helper.h       | 61 -------------------
 1 file changed, 61 deletions(-)
 delete mode 100644 testcases/kernel/containers/mountns/mountns_helper.h

diff --git a/testcases/kernel/containers/mountns/mountns_helper.h b/testcases/kernel/containers/mountns/mountns_helper.h
deleted file mode 100644
index 4b4538eb8..000000000
--- a/testcases/kernel/containers/mountns/mountns_helper.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Copyright (c) 2014 Red Hat, Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of version 2 the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "libclone.h"
-#include "test.h"
-#include "safe_macros.h"
-
-#define DIRA "A"
-#define DIRB "B"
-
-static int dummy_child(void *v)
-{
-	(void) v;
-	return 0;
-}
-
-static int check_newns(void)
-{
-	int pid, status;
-
-	if (tst_kvercmp(2, 4, 19) < 0)
-		tst_brkm(TCONF, NULL, "CLONE_NEWNS not supported");
-
-	pid = do_clone_unshare_test(T_CLONE, CLONE_NEWNS, dummy_child, NULL);
-	if (pid == -1)
-		tst_brkm(TCONF | TERRNO, NULL, "CLONE_NEWNS not supported");
-	SAFE_WAIT(NULL, &status);
-
-	return 0;
-}
-
-static void cleanup(void)
-{
-	umount(DIRA);
-	umount(DIRB);
-	tst_rmdir();
-}
-
-static void setup(void)
-{
-	tst_require_root();
-	check_newns();
-	tst_tmpdir();
-	TST_CHECKPOINT_INIT(tst_rmdir);
-	SAFE_MKDIR(cleanup, DIRA, 0777);
-	SAFE_MKDIR(cleanup, DIRB, 0777);
-	SAFE_TOUCH(cleanup, DIRA"/A", 0, NULL);
-	SAFE_TOUCH(cleanup, DIRB"/B", 0, NULL);
-}
-- 
2.35.1



More information about the ltp mailing list