1f08c3bdfSopenharmony_ci################################################################################
2f08c3bdfSopenharmony_ci##                                                                            ##
3f08c3bdfSopenharmony_ci## Copyright (c) International Business Machines  Corp., 2007                 ##
4f08c3bdfSopenharmony_ci##                                                                            ##
5f08c3bdfSopenharmony_ci## This program is free software;  you can redistribute it and#or modify      ##
6f08c3bdfSopenharmony_ci## it under the terms of the GNU General Public License as published by       ##
7f08c3bdfSopenharmony_ci## the Free Software Foundation; either version 2 of the License, or          ##
8f08c3bdfSopenharmony_ci## (at your option) any later version.                                        ##
9f08c3bdfSopenharmony_ci##                                                                            ##
10f08c3bdfSopenharmony_ci## This program is distributed in the hope that it will be useful, but        ##
11f08c3bdfSopenharmony_ci## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
12f08c3bdfSopenharmony_ci## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   ##
13f08c3bdfSopenharmony_ci## for more details.                                                          ##
14f08c3bdfSopenharmony_ci##                                                                            ##
15f08c3bdfSopenharmony_ci## You should have received a copy of the GNU General Public License          ##
16f08c3bdfSopenharmony_ci## along with this program;  if not, write to the Free Software               ##
17f08c3bdfSopenharmony_ci## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA    ##
18f08c3bdfSopenharmony_ci##                                                                            ##
19f08c3bdfSopenharmony_ci################################################################################
20f08c3bdfSopenharmony_ci
21f08c3bdfSopenharmony_ciPIDNS testcases Overview:
22f08c3bdfSopenharmony_ci
23f08c3bdfSopenharmony_ci A pid namespace is a view of particular set of tasks on the system. For processes, a process may have pid 1234 in one namespace, but have pid 1 in another.This allows processes to use process ids which are in use in other pid namespaces, without having to worry about what pids exist in other namespaces.
24f08c3bdfSopenharmony_ci
25f08c3bdfSopenharmony_ci"A process has a pid in every ancestor pid namespaces up to the initial pid namespace.  If process B is in a child namespace relative to process A, then process A will see process B by the pid which is valid in process A's pid namespace."
26f08c3bdfSopenharmony_ci
27f08c3bdfSopenharmony_ci"Another way of specifying process visibility, then is that process A will see all tasks which have a valid pid in process A's pid namespace."
28f08c3bdfSopenharmony_ci
29f08c3bdfSopenharmony_ci
30f08c3bdfSopenharmony_ci
31f08c3bdfSopenharmony_ciTestcases:
32f08c3bdfSopenharmony_ci
33f08c3bdfSopenharmony_ci1> Check the process id of container after cloning as 1.
34f08c3bdfSopenharmony_ci2> After creation of container the PID Namespace of the container should have the parent group id as 1 and also session id as 1.
35f08c3bdfSopenharmony_ci3> Create container: pass the parent namespacei id: mount /proc directory: check parent namespace id inside container: if it is exiting then PASS otherwise FAIL.
36f08c3bdfSopenharmony_ci
37f08c3bdfSopenharmony_ciCheck for PIDNS enablement: from 2.6.24 kernel version.
38