]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
gunit: Adopt SPDX License tag
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Tue, 15 Mar 2022 11:09:27 +0000 (16:39 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Mon, 21 Mar 2022 16:05:20 +0000 (10:05 -0600)
Adopt SPDX license tag for all the source files, those already have
LGPL 2.1 boilerplate in them and those missing license information.
All the files in the project fall under project license, hence
explicitly adding LGPL-2.1-only identifier to the files missing license
information. Adopting SPDX license helps the compliance tools to
determine the license and also helps in reducing the repetitive license
boilerplate across source files.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
18 files changed:
gunit/001-path.cpp
gunit/002-cgroup_parse_rules_options.cpp
gunit/003-cg_get_cgroups_from_proc_cgroups.cpp
gunit/004-cgroup_compare_ignore_rule.cpp
gunit/005-cgroup_compare_wildcard_procname.cpp
gunit/006-cgroup_get_cgroup.cpp
gunit/007-cgroup_process_v1_mount.cpp
gunit/008-cgroup_process_v2_mount.cpp
gunit/009-cgroup_set_values_recursive.cpp
gunit/010-cgroup_chown_chmod_tasks.cpp
gunit/011-cgroupv2_subtree_control.cpp
gunit/012-cgroup_create_cgroup.cpp
gunit/013-cgroup_build_tasks_procs_path.cpp
gunit/014-cgroupv2_get_subtree_control.cpp
gunit/015-cgroupv2_controller_enabled.cpp
gunit/016-cgset_parse_r_flag.cpp
gunit/Makefile.am
gunit/gtest.cpp

index 2a8f7777f3f0d3163063f947dbca55650cc12162..dc83fe039eadbb96573627010510a27dbf26aa97 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1-only */
 /**
  * libcgroup googletest for cg_build_path()
  *
@@ -5,20 +6,6 @@
  * Author: Tom Hromatka <tom.hromatka@oracle.com>
  */
 
-/*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of version 2.1 of the GNU Lesser General Public License as
- * published by the Free Software Foundation.
- *
- * This library 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 Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, see <http://www.gnu.org/licenses>.
- */
-
 #include "gtest/gtest.h"
 
 #include "libcgroup-internal.h"
index b9ec477b6a36c5895e90e4527be7942a50cb2ec2..63d3c6263e0a6eaee0d170a4fcd03851b5d59d85 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1-only */
 /**
  * libcgroup googletest for cgroup_parse_rules_options()
  *
@@ -5,20 +6,6 @@
  * Author: Tom Hromatka <tom.hromatka@oracle.com>
  */
 
-/*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of version 2.1 of the GNU Lesser General Public License as
- * published by the Free Software Foundation.
- *
- * This library 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 Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, see <http://www.gnu.org/licenses>.
- */
-
 #include "gtest/gtest.h"
 
 #include "libcgroup-internal.h"
index 0b4d28919b40e67f0bbc06bb082bb257c1808c11..e03139f2048741ac5b63cf1c22a0c05795b61b2b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1-only */
 /**
  * libcgroup googletest for cg_get_cgroups_from_proc_cgroups()
  *
@@ -5,20 +6,6 @@
  * Author: Tom Hromatka <tom.hromatka@oracle.com>
  */
 
-/*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of version 2.1 of the GNU Lesser General Public License as
- * published by the Free Software Foundation.
- *
- * This library 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 Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, see <http://www.gnu.org/licenses>.
- */
-
 #include "gtest/gtest.h"
 
 #include "libcgroup-internal.h"
index 29341f280ee0448bc536ed77e74e6ef0db6bccd8..13d6f481f868305425de7cdcb3db1d6b8b4e660b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1-only */
 /**
  * libcgroup googletest for cgroup_compare_ignore_rule()
  *
@@ -5,20 +6,6 @@
  * Author: Tom Hromatka <tom.hromatka@oracle.com>
  */
 
-/*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of version 2.1 of the GNU Lesser General Public License as
- * published by the Free Software Foundation.
- *
- * This library 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 Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, see <http://www.gnu.org/licenses>.
- */
-
 #include "gtest/gtest.h"
 
 #include "libcgroup-internal.h"
index 62adf076073426bc18e08a0f75318ee52eb07c88..cea19eabe21c00a0d3adb3ad11b7de00950816e4 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1-only */
 /**
  * libcgroup googletest for cgroup_compare_wildcard_procname()
  *
@@ -5,20 +6,6 @@
  * Author: Tom Hromatka <tom.hromatka@oracle.com>
  */
 
-/*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of version 2.1 of the GNU Lesser General Public License as
- * published by the Free Software Foundation.
- *
- * This library 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 Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, see <http://www.gnu.org/licenses>.
- */
-
 #include "gtest/gtest.h"
 
 #include "libcgroup-internal.h"
index e5ee07fbb0208ca136d96cfc36644e2eadc1825e..08fcd46bf7b074317b1aaf6d5d5c1f86162f5d4f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1-only */
 /**
  * libcgroup googletest for cgroup_get_cgroup()
  *
@@ -5,20 +6,6 @@
  * Author: Tom Hromatka <tom.hromatka@oracle.com>
  */
 
-/*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of version 2.1 of the GNU Lesser General Public License as
- * published by the Free Software Foundation.
- *
- * This library 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 Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, see <http://www.gnu.org/licenses>.
- */
-
 #include <bits/stdc++.h>
 #include <string>
 #include <vector>
index 84a1f79981b577a8e60d8dd3fc861d11194485e0..f661e70aa9b55176c71bcc6c1cfcc764e07b239b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1-only */
 /**
  * libcgroup googletest for cgroup_process_v1_mnt()
  *
@@ -5,20 +6,6 @@
  * Author: Tom Hromatka <tom.hromatka@oracle.com>
  */
 
-/*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of version 2.1 of the GNU Lesser General Public License as
- * published by the Free Software Foundation.
- *
- * This library 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 Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, see <http://www.gnu.org/licenses>.
- */
-
 #include <mntent.h>
 
 #include "gtest/gtest.h"
index bc99db24ba9a1d010408332662b00b6b2e6f1649..845978939450fcdfb272acef014b01a7047b109e 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1-only */
 /**
  * libcgroup googletest for cgroup_process_v2_mnt()
  *
@@ -5,20 +6,6 @@
  * Author: Tom Hromatka <tom.hromatka@oracle.com>
  */
 
-/*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of version 2.1 of the GNU Lesser General Public License as
- * published by the Free Software Foundation.
- *
- * This library 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 Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, see <http://www.gnu.org/licenses>.
- */
-
 #include <ftw.h>
 #include <mntent.h>
 
index 64b0169bbe5b050d8f53c5da06f73279a0c2b7e0..91d76fbdbbd655f85c9a547412aeb1dfab3390bb 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1-only */
 /**
  * libcgroup googletest for cgroup_set_values_recursive()
  *
@@ -5,20 +6,6 @@
  * Author: Tom Hromatka <tom.hromatka@oracle.com>
  */
 
-/*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of version 2.1 of the GNU Lesser General Public License as
- * published by the Free Software Foundation.
- *
- * This library 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 Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, see <http://www.gnu.org/licenses>.
- */
-
 #include <ftw.h>
 
 #include "gtest/gtest.h"
index 964d99d73a6c4a8612b8a4cd48c5d985b187adc3..7ad351e3aba11869a0ebaaef1bef2f283be98464 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1-only */
 /**
  * libcgroup googletest for cgroup_chown_chmod_tasks()
  *
@@ -5,20 +6,6 @@
  * Author: Tom Hromatka <tom.hromatka@oracle.com>
  */
 
-/*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of version 2.1 of the GNU Lesser General Public License as
- * published by the Free Software Foundation.
- *
- * This library 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 Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, see <http://www.gnu.org/licenses>.
- */
-
 #include <ftw.h>
 
 #include "gtest/gtest.h"
index 9edede25f68c5ace77210fddb6eda5f5a2419038..05ab8f5a29cbd0a0edfc1950b64da73aa5c12f42 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1-only */
 /**
  * libcgroup googletest for cgroupv2_subtree_control()
  *
@@ -5,20 +6,6 @@
  * Author: Tom Hromatka <tom.hromatka@oracle.com>
  */
 
-/*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of version 2.1 of the GNU Lesser General Public License as
- * published by the Free Software Foundation.
- *
- * This library 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 Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, see <http://www.gnu.org/licenses>.
- */
-
 #include <ftw.h>
 
 #include "gtest/gtest.h"
index d3752c23c0d801f9849081972fa04a9a4c5d9045..cb26ca74a89f25dc31d3866d7baffbf5f0374fc5 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1-only */
 /**
  * libcgroup googletest for cgroup_create_cgroup()
  *
@@ -5,20 +6,6 @@
  * Author: Tom Hromatka <tom.hromatka@oracle.com>
  */
 
-/*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of version 2.1 of the GNU Lesser General Public License as
- * published by the Free Software Foundation.
- *
- * This library 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 Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, see <http://www.gnu.org/licenses>.
- */
-
 #include <dirent.h>
 #include <ftw.h>
 
index b86a68f56795d55193600d87143bde07765d523e..4445048bc55eb0e3ba350c59c24aee55691acfa0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1-only */
 /**
  * libcgroup googletest for cgroup_build_tasks_procs_path()
  *
@@ -5,20 +6,6 @@
  * Author: Tom Hromatka <tom.hromatka@oracle.com>
  */
 
-/*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of version 2.1 of the GNU Lesser General Public License as
- * published by the Free Software Foundation.
- *
- * This library 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 Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, see <http://www.gnu.org/licenses>.
- */
-
 #include "gtest/gtest.h"
 
 #include "libcgroup-internal.h"
index 66f3c52b00a429e5e1283f5d766fb633cbaad2b4..a0b8e226903a4e7d52e6904d2bd28dfb87ffe323 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1-only */
 /**
  * libcgroup googletest for cgroupv2_get_subtree_control()
  *
@@ -5,20 +6,6 @@
  * Author: Tom Hromatka <tom.hromatka@oracle.com>
  */
 
-/*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of version 2.1 of the GNU Lesser General Public License as
- * published by the Free Software Foundation.
- *
- * This library 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 Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, see <http://www.gnu.org/licenses>.
- */
-
 #include <fcntl.h>
 #include <ftw.h>
 #include <sys/stat.h>
index 3c291e5a70b4d1a537c38e9bdea59260c3d71a93..8dd8da69715b20fe790385b12a4dd92981f2d521 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1-only */
 /**
  * libcgroup googletest for cgroupv2_controller_enabled()
  *
@@ -5,20 +6,6 @@
  * Author: Tom Hromatka <tom.hromatka@oracle.com>
  */
 
-/*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of version 2.1 of the GNU Lesser General Public License as
- * published by the Free Software Foundation.
- *
- * This library 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 Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, see <http://www.gnu.org/licenses>.
- */
-
 #include <ftw.h>
 #include <sys/stat.h>
 #include <sys/types.h>
index 713535faf52e8c65c3719892ecca922276f129c8..728c98b693633679b84fd4203f674e62b28c4115 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1-only */
 /**
  * libcgroup googletest for parse_r_flag() in cgset
  *
@@ -5,20 +6,6 @@
  * Author: Tom Hromatka <tom.hromatka@oracle.com>
  */
 
-/*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of version 2.1 of the GNU Lesser General Public License as
- * published by the Free Software Foundation.
- *
- * This library 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 Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, see <http://www.gnu.org/licenses>.
- */
-
 #include <ftw.h>
 
 #include "gtest/gtest.h"
index 654002cd7496ba94202851acab840e914e1da1c6..1e58a4e058ad9750ca1be022c2a88b1c6d1a2896 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: LGPL-2.1-only
 #
 # libcgroup googletests Makefile.am
 #
@@ -5,20 +6,6 @@
 # Author: Tom Hromatka <tom.hromatka@oracle.com>
 #
 
-#
-# This library is free software; you can redistribute it and/or modify it
-# under the terms of version 2.1 of the GNU Lesser General Public License as
-# published by the Free Software Foundation.
-#
-# This library 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 Lesser General Public License
-# for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, see <http://www.gnu.org/licenses>.
-#
-
 AM_CPPFLAGS = -I$(top_srcdir)/include \
              -I$(top_srcdir)/src \
              -I$(top_srcdir)/src/tools \
index 1ff88c2477be739f288da8ae3615c8a5b7529265..b48200b09f9b05c5bb9f8929259a746356c4b6c7 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1-only */
 /**
  * libcgroup googletest main entry point
  *
@@ -5,20 +6,6 @@
  * Author: Tom Hromatka <tom.hromatka@oracle.com>
  */
 
-/*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of version 2.1 of the GNU Lesser General Public License as
- * published by the Free Software Foundation.
- *
- * This library 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 Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, see <http://www.gnu.org/licenses>.
- */
-
 #include "gtest/gtest.h"
 
 int main(int argc, char **argv)