All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Cervesato <andrea.cervesato@suse.de>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3 9/9] Remove obsolete userns_helper.h from userns suite
Date: Fri, 25 Mar 2022 10:36:26 +0100	[thread overview]
Message-ID: <20220325093626.11114-10-andrea.cervesato@suse.de> (raw)
In-Reply-To: <20220325093626.11114-1-andrea.cervesato@suse.de>

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

diff --git a/testcases/kernel/containers/userns/userns_helper.h b/testcases/kernel/containers/userns/userns_helper.h
deleted file mode 100644
index 12b491f62..000000000
--- a/testcases/kernel/containers/userns/userns_helper.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) Huawei Technologies Co., Ltd., 2015
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- * 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.
- */
-
-#include "../libclone/libclone.h"
-#include "test.h"
-#include "safe_macros.h"
-#include <stdbool.h>
-
-#define UID_MAP 0
-#define GID_MAP 1
-
-static int dummy_child(void *v)
-{
-	(void) v;
-	return 0;
-}
-
-static int check_newuser(void)
-{
-	int pid, status;
-
-	if (tst_kvercmp(3, 8, 0) < 0)
-		tst_brkm(TCONF, NULL, "CLONE_NEWUSER not supported");
-
-	pid = do_clone_unshare_test(T_CLONE, CLONE_NEWUSER, dummy_child, NULL);
-	if (pid == -1)
-		tst_brkm(TCONF | TERRNO, NULL, "CLONE_NEWUSER not supported");
-	SAFE_WAIT(NULL, &status);
-
-	return 0;
-}
-
-LTP_ATTRIBUTE_UNUSED static int updatemap(int cpid, bool type, int idnum,
-	int parentmappid, void (*cleanup)(void))
-{
-	char path[BUFSIZ];
-	char content[BUFSIZ];
-	int fd;
-
-	if (type == UID_MAP)
-		sprintf(path, "/proc/%d/uid_map", cpid);
-	else if (type == GID_MAP)
-		sprintf(path, "/proc/%d/gid_map", cpid);
-	else
-		tst_brkm(TBROK, cleanup, "invalid type parameter");
-
-	sprintf(content, "%d %d 1", idnum, parentmappid);
-	fd = SAFE_OPEN(cleanup, path, O_WRONLY, 0644);
-	SAFE_WRITE(cleanup, 1, fd, content, strlen(content));
-	SAFE_CLOSE(cleanup, fd);
-	return 0;
-}
-- 
2.35.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2022-03-25  9:38 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-25  9:36 [LTP] [PATCH v3 0/9] Rewrite userns testing suite using new LTP API Andrea Cervesato
2022-03-25  9:36 ` [LTP] [PATCH v3 1/9] Rewrite userns01.c " Andrea Cervesato
2022-03-25 10:24   ` Petr Vorel
2022-03-25 15:43   ` Cyril Hrubis
2022-03-25  9:36 ` [LTP] [PATCH v3 2/9] Rewrite userns02.c " Andrea Cervesato
2022-03-25 10:25   ` Petr Vorel
2022-03-25 10:27   ` Petr Vorel
2022-03-25 10:28     ` Petr Vorel
2022-03-25 15:58   ` Cyril Hrubis
2022-03-28 20:50     ` Petr Vorel
2022-03-25  9:36 ` [LTP] [PATCH v3 3/9] Rewrite userns03.c " Andrea Cervesato
2022-03-25 10:28   ` Petr Vorel
2022-03-25 16:29   ` Cyril Hrubis
2022-03-25  9:36 ` [LTP] [PATCH v3 4/9] " Andrea Cervesato
2022-03-25 10:29   ` Petr Vorel
2022-03-25 10:30   ` Petr Vorel
2022-03-29 10:48   ` Cyril Hrubis
2022-03-25  9:36 ` [LTP] [PATCH v3 5/9] Rewrite userns05.c " Andrea Cervesato
2022-03-25 10:31   ` Petr Vorel
2022-03-29 12:36   ` Cyril Hrubis
2022-03-25  9:36 ` [LTP] [PATCH v3 6/9] Rewrite userns06.c " Andrea Cervesato
2022-03-25 10:32   ` Petr Vorel
2022-03-29 12:35   ` Cyril Hrubis
2022-03-25  9:36 ` [LTP] [PATCH v3 7/9] Rewrite userns07.c " Andrea Cervesato
2022-03-25 10:33   ` Petr Vorel
2022-03-29 14:27   ` Cyril Hrubis
2022-03-25  9:36 ` [LTP] [PATCH v3 8/9] Remove libclone dependency from userns suite Andrea Cervesato
2022-03-25 10:33   ` Petr Vorel
2022-03-25  9:36 ` Andrea Cervesato [this message]
2022-03-25 10:34   ` [LTP] [PATCH v3 9/9] Remove obsolete userns_helper.h " Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220325093626.11114-10-andrea.cervesato@suse.de \
    --to=andrea.cervesato@suse.de \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.