summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-04-06 18:58:55 +0200
committerSven Eden <yamakuzure@gmx.net>2018-08-24 16:47:08 +0200
commit9d1ff89d622fd4d8b3be210996cfa73943d81e03 (patch)
tree102f525976d4d49adff59adba7ca7c0d9e825a14 /src/test
parent5642683e0db55c457dcd03df1290334a238194e2 (diff)
tree-wide: drop license boilerplate
Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/meson.build13
-rw-r--r--src/test/test-alloc-util.c13
-rw-r--r--src/test/test-cgroup.c13
-rw-r--r--src/test/test-conf-files.c13
-rw-r--r--src/test/test-conf-parser.c33
-rw-r--r--src/test/test-copy.c13
-rw-r--r--src/test/test-dlopen.c13
-rw-r--r--src/test/test-ellipsize.c13
-rw-r--r--src/test/test-escape.c13
-rw-r--r--src/test/test-exec-util.c13
-rw-r--r--src/test/test-extract-word.c13
-rw-r--r--src/test/test-fd-util.c13
-rw-r--r--src/test/test-fs-util.c13
-rw-r--r--src/test/test-hash.c13
-rw-r--r--src/test/test-hashmap-plain.c13
-rw-r--r--src/test/test-hashmap.c13
-rw-r--r--src/test/test-helper.h13
-rw-r--r--src/test/test-hexdecoct.c13
-rw-r--r--src/test/test-id128.c13
-rw-r--r--src/test/test-io-util.c13
-rw-r--r--src/test/test-ipcrm.c13
-rw-r--r--src/test/test-list.c13
-rw-r--r--src/test/test-locale-util.c13
-rw-r--r--src/test/test-log.c13
-rw-r--r--src/test/test-parse-util.c13
-rw-r--r--src/test/test-path-util.c13
-rw-r--r--src/test/test-prioq.c13
-rw-r--r--src/test/test-proc-cmdline.c13
-rw-r--r--src/test/test-process-util.c41
-rw-r--r--src/test/test-random-util.c13
-rw-r--r--src/test/test-selinux.c13
-rw-r--r--src/test/test-set.c13
-rw-r--r--src/test/test-signal-util.c25
-rw-r--r--src/test/test-siphash24.c13
-rw-r--r--src/test/test-sizeof.c13
-rw-r--r--src/test/test-stat-util.c13
-rw-r--r--src/test/test-string-util.c13
-rw-r--r--src/test/test-strip-tab-ansi.c13
-rw-r--r--src/test/test-unaligned.c13
-rw-r--r--src/test/test-user-util.c13
-rw-r--r--src/test/test-utf8.c13
-rw-r--r--src/test/test-util.c13
-rw-r--r--src/test/test-verbs.c13
43 files changed, 44 insertions, 575 deletions
diff --git a/src/test/meson.build b/src/test/meson.build
index 823fcb15c..9cede5ad1 100644
--- a/src/test/meson.build
+++ b/src/test/meson.build
@@ -1,19 +1,6 @@
# SPDX-License-Identifier: LGPL-2.1+
#
# Copyright 2017 Zbigniew Jędrzejewski-Szmek
-#
-# elogind is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# elogind 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 elogind; If not, see <http://www.gnu.org/licenses/>.
awkscript = 'test-hashmap-ordered.awk'
test_hashmap_ordered_c = custom_target(
diff --git a/src/test/test-alloc-util.c b/src/test/test-alloc-util.c
index 50ccf4700..fa3bb9f44 100644
--- a/src/test/test-alloc-util.c
+++ b/src/test/test-alloc-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2010 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
//#include <stdint.h>
diff --git a/src/test/test-cgroup.c b/src/test/test-cgroup.c
index 232577a70..fbf3beb97 100644
--- a/src/test/test-cgroup.c
+++ b/src/test/test-cgroup.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2010 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <string.h>
diff --git a/src/test/test-conf-files.c b/src/test/test-conf-files.c
index de91efac7..4bc92faca 100644
--- a/src/test/test-conf-files.c
+++ b/src/test/test-conf-files.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2014 Michael Marineau
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <stdarg.h>
diff --git a/src/test/test-conf-parser.c b/src/test/test-conf-parser.c
index c36204197..acd543e51 100644
--- a/src/test/test-conf-parser.c
+++ b/src/test/test-conf-parser.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2015 Ronny Chevalier
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "conf-parser.h"
@@ -307,11 +294,6 @@ static const char* const config_file[] = {
"3\n",
"[Section]\n"
- "setting1=1\\\n" /* continuation with extra trailing backslash at the end */
- "2\\\n"
- "3\\\n",
-
- "[Section]\n"
"setting1=1\\\\\\\n" /* continuation with trailing escape symbols */
"\\\\2\n", /* note that C requires one level of escaping, so the
* parser gets "…1 BS BS BS NL BS BS 2 NL", which
@@ -328,11 +310,6 @@ static const char* const config_file[] = {
"foobar",
"[Section]\n"
- "setting1=" /* a line above LINE_MAX length, with continuation */
- x1000("ABCD") "\\\n" /* and an extra trailing backslash */
- "foobar\\\n",
-
- "[Section]\n"
"setting1=" /* a line above the allowed limit: 9 + 1050000 + 1 */
x1000(x1000("x") x10("abcde")) "\n",
@@ -385,27 +362,27 @@ static void test_config_parse(unsigned i, const char *s) {
assert_se(streq(setting1, "1"));
break;
- case 4 ... 5:
+ case 4:
assert_se(r == 0);
assert_se(streq(setting1, "1 2 3"));
break;
- case 6:
+ case 5:
assert_se(r == 0);
assert_se(streq(setting1, "1\\\\ \\\\2"));
break;
- case 7:
+ case 6:
assert_se(r == 0);
assert_se(streq(setting1, x1000("ABCD")));
break;
- case 8 ... 9:
+ case 7:
assert_se(r == 0);
assert_se(streq(setting1, x1000("ABCD") " foobar"));
break;
- case 10 ... 11:
+ case 8 ... 9:
assert_se(r == -ENOBUFS);
assert_se(setting1 == NULL);
break;
diff --git a/src/test/test-copy.c b/src/test/test-copy.c
index 574c22611..7337a8ae6 100644
--- a/src/test/test-copy.c
+++ b/src/test/test-copy.c
@@ -3,19 +3,6 @@
This file is part of systemd
Copyright 2014 Ronny Chevalier
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <unistd.h>
diff --git a/src/test/test-dlopen.c b/src/test/test-dlopen.c
index dd43da559..151d2d72b 100644
--- a/src/test/test-dlopen.c
+++ b/src/test/test-dlopen.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2016 Zbigniew Jędrzejewski-Szmek
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <dlfcn.h>
diff --git a/src/test/test-ellipsize.c b/src/test/test-ellipsize.c
index 421774c07..ba4b043fc 100644
--- a/src/test/test-ellipsize.c
+++ b/src/test/test-ellipsize.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2013 Shawn Landden
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <stdio.h>
diff --git a/src/test/test-escape.c b/src/test/test-escape.c
index 811562992..839c33d5d 100644
--- a/src/test/test-escape.c
+++ b/src/test/test-escape.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2010 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "alloc-util.h"
diff --git a/src/test/test-exec-util.c b/src/test/test-exec-util.c
index 02d745439..118720313 100644
--- a/src/test/test-exec-util.c
+++ b/src/test/test-exec-util.c
@@ -4,19 +4,6 @@
Copyright 2010 Lennart Poettering
Copyright 2013 Thomas H.P. Andersen
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <errno.h>
diff --git a/src/test/test-extract-word.c b/src/test/test-extract-word.c
index 9b00cb596..16c265549 100644
--- a/src/test/test-extract-word.c
+++ b/src/test/test-extract-word.c
@@ -4,19 +4,6 @@
Copyright 2010 Lennart Poettering
Copyright 2013 Thomas H.P. Andersen
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <errno.h>
diff --git a/src/test/test-fd-util.c b/src/test/test-fd-util.c
index f4b73f695..f266e580b 100644
--- a/src/test/test-fd-util.c
+++ b/src/test/test-fd-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2010 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <fcntl.h>
diff --git a/src/test/test-fs-util.c b/src/test/test-fs-util.c
index 35bb699c3..639342dbb 100644
--- a/src/test/test-fs-util.c
+++ b/src/test/test-fs-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2010 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <unistd.h>
diff --git a/src/test/test-hash.c b/src/test/test-hash.c
index d84a6a885..79d9668a1 100644
--- a/src/test/test-hash.c
+++ b/src/test/test-hash.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2016 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <errno.h>
diff --git a/src/test/test-hashmap-plain.c b/src/test/test-hashmap-plain.c
index d130f5832..cbcdf4e84 100644
--- a/src/test/test-hashmap-plain.c
+++ b/src/test/test-hashmap-plain.c
@@ -3,19 +3,6 @@
This file is part of systemd
Copyright 2013 Daniel Buch
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "alloc-util.h"
diff --git a/src/test/test-hashmap.c b/src/test/test-hashmap.c
index ad0b7390e..9a22fc905 100644
--- a/src/test/test-hashmap.c
+++ b/src/test/test-hashmap.c
@@ -3,19 +3,6 @@
This file is part of systemd
Copyright 2013 Daniel Buch
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "hashmap.h"
diff --git a/src/test/test-helper.h b/src/test/test-helper.h
index 1ee93f5c5..01674e6d4 100644
--- a/src/test/test-helper.h
+++ b/src/test/test-helper.h
@@ -5,19 +5,6 @@
This file is part of systemd.
Copyright 2013 Holger Hans Peter Freyther
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "sd-daemon.h"
diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c
index b7e925fce..74b8e3b68 100644
--- a/src/test/test-hexdecoct.c
+++ b/src/test/test-hexdecoct.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2010 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <errno.h>
diff --git a/src/test/test-id128.c b/src/test/test-id128.c
index dba728376..8ea805315 100644
--- a/src/test/test-id128.c
+++ b/src/test/test-id128.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2011 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <string.h>
diff --git a/src/test/test-io-util.c b/src/test/test-io-util.c
index 9ed9864f2..c553729f4 100644
--- a/src/test/test-io-util.c
+++ b/src/test/test-io-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2010 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <fcntl.h>
diff --git a/src/test/test-ipcrm.c b/src/test/test-ipcrm.c
index d4ca6bdce..3a00c9354 100644
--- a/src/test/test-ipcrm.c
+++ b/src/test/test-ipcrm.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2014 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "clean-ipc.h"
diff --git a/src/test/test-list.c b/src/test/test-list.c
index 25ffd8fb8..c30803b55 100644
--- a/src/test/test-list.c
+++ b/src/test/test-list.c
@@ -3,19 +3,6 @@
This file is part of systemd
Copyright 2013 Jan Janssen
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "list.h"
diff --git a/src/test/test-locale-util.c b/src/test/test-locale-util.c
index 4467bdd48..01497b16f 100644
--- a/src/test/test-locale-util.c
+++ b/src/test/test-locale-util.c
@@ -3,19 +3,6 @@
This file is part of systemd
Copyright 2014 Ronny Chevalier
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
diff --git a/src/test/test-log.c b/src/test/test-log.c
index 7aa80e351..fe2e805b7 100644
--- a/src/test/test-log.c
+++ b/src/test/test-log.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2012 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <stddef.h>
diff --git a/src/test/test-parse-util.c b/src/test/test-parse-util.c
index 95d29c378..8209b98c3 100644
--- a/src/test/test-parse-util.c
+++ b/src/test/test-parse-util.c
@@ -4,19 +4,6 @@
Copyright 2010 Lennart Poettering
Copyright 2013 Thomas H.P. Andersen
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <errno.h>
diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c
index b2b5fd19f..057c06e8c 100644
--- a/src/test/test-path-util.c
+++ b/src/test/test-path-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2013 Zbigniew Jędrzejewski-Szmek
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <stdio.h>
diff --git a/src/test/test-prioq.c b/src/test/test-prioq.c
index f558384a1..e88166ee2 100644
--- a/src/test/test-prioq.c
+++ b/src/test/test-prioq.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2013 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <stdlib.h>
diff --git a/src/test/test-proc-cmdline.c b/src/test/test-proc-cmdline.c
index faa1f8920..f3cf12114 100644
--- a/src/test/test-proc-cmdline.c
+++ b/src/test/test-proc-cmdline.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2010 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "alloc-util.h"
diff --git a/src/test/test-process-util.c b/src/test/test-process-util.c
index d6821f83e..c5931c522 100644
--- a/src/test/test-process-util.c
+++ b/src/test/test-process-util.c
@@ -4,19 +4,6 @@
Copyright 2010 Lennart Poettering
Copyright 2013 Thomas H.P. Andersen
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <sched.h>
@@ -551,8 +538,33 @@ static void test_pid_to_ptr(void) {
#endif
}
-int main(int argc, char *argv[]) {
+static void test_ioprio_class_from_to_string_one(const char *val, int expected) {
+ assert_se(ioprio_class_from_string(val) == expected);
+ if (expected >= 0) {
+ _cleanup_free_ char *s = NULL;
+ unsigned ret;
+
+ assert_se(ioprio_class_to_string_alloc(expected, &s) == 0);
+ /* We sometimes get a class number and sometimes a number back */
+ assert_se(streq(s, val) ||
+ safe_atou(val, &ret) == 0);
+ }
+}
+static void test_ioprio_class_from_to_string(void) {
+ test_ioprio_class_from_to_string_one("none", IOPRIO_CLASS_NONE);
+ test_ioprio_class_from_to_string_one("realtime", IOPRIO_CLASS_RT);
+ test_ioprio_class_from_to_string_one("best-effort", IOPRIO_CLASS_BE);
+ test_ioprio_class_from_to_string_one("idle", IOPRIO_CLASS_IDLE);
+ test_ioprio_class_from_to_string_one("0", 0);
+ test_ioprio_class_from_to_string_one("1", 1);
+ test_ioprio_class_from_to_string_one("7", 7);
+ test_ioprio_class_from_to_string_one("8", 8);
+ test_ioprio_class_from_to_string_one("9", -1);
+ test_ioprio_class_from_to_string_one("-1", -1);
+}
+
+int main(int argc, char *argv[]) {
log_set_max_level(LOG_DEBUG);
log_parse_environment();
log_open();
@@ -583,6 +595,7 @@ int main(int argc, char *argv[]) {
test_getpid_measure();
test_safe_fork();
test_pid_to_ptr();
+ test_ioprio_class_from_to_string();
return 0;
}
diff --git a/src/test/test-random-util.c b/src/test/test-random-util.c
index d7ccc91f9..386249883 100644
--- a/src/test/test-random-util.c
+++ b/src/test/test-random-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2017 Zbigniew Jędrzejewski-Szmek
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "hexdecoct.h"
diff --git a/src/test/test-selinux.c b/src/test/test-selinux.c
index c888c09b2..d760e9687 100644
--- a/src/test/test-selinux.c
+++ b/src/test/test-selinux.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2016 Zbigniew Jędrzejewski-Szmek
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <sys/stat.h>
diff --git a/src/test/test-set.c b/src/test/test-set.c
index 0a29a6262..11884de1f 100644
--- a/src/test/test-set.c
+++ b/src/test/test-set.c
@@ -3,19 +3,6 @@
This file is part of systemd
Copyright 2014 Zbigniew Jędrzejewski-Szmek
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "set.h"
diff --git a/src/test/test-signal-util.c b/src/test/test-signal-util.c
index 3f8eb325c..562f286cc 100644
--- a/src/test/test-signal-util.c
+++ b/src/test/test-signal-util.c
@@ -3,29 +3,27 @@
This file is part of systemd.
Copyright 2016 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <signal.h>
#include <unistd.h>
+//#include "log.h"
#include "macro.h"
#include "signal-util.h"
/// Additional includes needed by elogind
#include "process-util.h"
+#define info(sig) log_info(#sig " = " STRINGIFY(sig) " = %d", sig)
+
+static void test_rt_signals(void) {
+ info(SIGRTMIN);
+ info(SIGRTMAX);
+
+ /* We use signals SIGRTMIN+0 to SIGRTMIN+24 unconditionally */
+ assert(SIGRTMAX - SIGRTMIN >= 24);
+}
+
static void test_block_signals(void) {
sigset_t ss;
@@ -63,6 +61,7 @@ static void test_ignore_signals(void) {
}
int main(int argc, char *argv[]) {
+ test_rt_signals();
test_block_signals();
test_ignore_signals();
diff --git a/src/test/test-siphash24.c b/src/test/test-siphash24.c
index 7469457be..47bf28ff0 100644
--- a/src/test/test-siphash24.c
+++ b/src/test/test-siphash24.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2015 Tom Gundersen
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "siphash24.h"
diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c
index ad0c2ceff..103c96955 100644
--- a/src/test/test-sizeof.c
+++ b/src/test/test-sizeof.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2016 Zbigniew Jędrzejewski-Szmek
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <stdio.h>
diff --git a/src/test/test-stat-util.c b/src/test/test-stat-util.c
index bcb9a658f..d3a98ec66 100644
--- a/src/test/test-stat-util.c
+++ b/src/test/test-stat-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2010 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <fcntl.h>
diff --git a/src/test/test-string-util.c b/src/test/test-string-util.c
index 0f841e5d7..48e418f48 100644
--- a/src/test/test-string-util.c
+++ b/src/test/test-string-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2015 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "alloc-util.h"
diff --git a/src/test/test-strip-tab-ansi.c b/src/test/test-strip-tab-ansi.c
index 838a6e4db..fff3fcd0d 100644
--- a/src/test/test-strip-tab-ansi.c
+++ b/src/test/test-strip-tab-ansi.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2012 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <stdio.h>
diff --git a/src/test/test-unaligned.c b/src/test/test-unaligned.c
index 00445fa30..a39480341 100644
--- a/src/test/test-unaligned.c
+++ b/src/test/test-unaligned.c
@@ -3,19 +3,6 @@
This file is part of systemd
Copyright 2014 Tom Gundersen
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "sparse-endian.h"
diff --git a/src/test/test-user-util.c b/src/test/test-user-util.c
index 2b4daf172..0b5dc945a 100644
--- a/src/test/test-user-util.c
+++ b/src/test/test-user-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2015 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "alloc-util.h"
diff --git a/src/test/test-utf8.c b/src/test/test-utf8.c
index c04c99dca..a7bbc9b42 100644
--- a/src/test/test-utf8.c
+++ b/src/test/test-utf8.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2013 Dave Reisner
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "alloc-util.h"
diff --git a/src/test/test-util.c b/src/test/test-util.c
index 81dba9af4..9d31d5a86 100644
--- a/src/test/test-util.c
+++ b/src/test/test-util.c
@@ -4,19 +4,6 @@
Copyright 2010 Lennart Poettering
Copyright 2013 Thomas H.P. Andersen
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <errno.h>
diff --git a/src/test/test-verbs.c b/src/test/test-verbs.c
index 88276a21e..fb1bbf341 100644
--- a/src/test/test-verbs.c
+++ b/src/test/test-verbs.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2014 systemd developers
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "macro.h"