summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-04-19 12:13:23 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-04-19 12:13:23 +0200
commit5d13a15b1d0bd7d218100d204a84eaaaaeab932f (patch)
tree08d1ba916131ac128453713792cd8498b556de3a /src/test
parent6360b8ff8383bb69978e6278298b4a2bef329f25 (diff)
downloadsystemd-5d13a15b1d0bd7d218100d204a84eaaaaeab932f.tar.gz
systemd-5d13a15b1d0bd7d218100d204a84eaaaaeab932f.tar.bz2
systemd-5d13a15b1d0bd7d218100d204a84eaaaaeab932f.zip
tree-wide: drop spurious newlines (#8764)
Double newlines (i.e. one empty lines) are great to structure code. But let's avoid triple newlines (i.e. two empty lines), quadruple newlines, quintuple newlines, …, that's just spurious whitespace. It's an easy way to drop 121 lines of code, and keeps the coding style of our sources a bit tigther.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-exec-util.c1
-rw-r--r--src/test/test-fileio.c1
-rw-r--r--src/test/test-job-type.c1
-rw-r--r--src/test/test-libudev.c1
-rw-r--r--src/test/test-locale-util.c1
-rw-r--r--src/test/test-nss.c2
-rw-r--r--src/test/test-parse-util.c1
-rw-r--r--src/test/test-path.c1
-rw-r--r--src/test/test-stat-util.c1
-rw-r--r--src/test/test-string-util.c1
-rw-r--r--src/test/test-strv.c1
-rw-r--r--src/test/test-unit-file.c1
-rw-r--r--src/test/test-unit-name.c1
13 files changed, 0 insertions, 14 deletions
diff --git a/src/test/test-exec-util.c b/src/test/test-exec-util.c
index dcddbfd988..c5166c6954 100644
--- a/src/test/test-exec-util.c
+++ b/src/test/test-exec-util.c
@@ -236,7 +236,6 @@ const gather_stdout_callback_t gather_stdout[] = {
gather_stdout_three,
};
-
static void test_stdout_gathering(void) {
char template[] = "/tmp/test-exec-util.XXXXXXX";
const char *dirs[] = {template, NULL};
diff --git a/src/test/test-fileio.c b/src/test/test-fileio.c
index 443afd8a86..ba22e865fd 100644
--- a/src/test/test-fileio.c
+++ b/src/test/test-fileio.c
@@ -561,7 +561,6 @@ static void test_search_and_fopen(void) {
assert_se(r < 0);
}
-
static void test_search_and_fopen_nulstr(void) {
const char dirs[] = "/tmp/foo/bar\0/tmp\0";
char name[] = "/tmp/test-search_and_fopen.XXXXXX";
diff --git a/src/test/test-job-type.c b/src/test/test-job-type.c
index 57025208db..fefeecb948 100644
--- a/src/test/test-job-type.c
+++ b/src/test/test-job-type.c
@@ -83,6 +83,5 @@ int main(int argc, char*argv[]) {
}
}
-
return 0;
}
diff --git a/src/test/test-libudev.c b/src/test/test-libudev.c
index 8aa76e4d0a..599219e326 100644
--- a/src/test/test-libudev.c
+++ b/src/test/test-libudev.c
@@ -394,7 +394,6 @@ int main(int argc, char *argv[]) {
assert_not_reached("Unhandled option code.");
}
-
/* add sys path if needed */
if (!startswith(syspath, "/sys"))
syspath = strjoina("/sys/", syspath);
diff --git a/src/test/test-locale-util.c b/src/test/test-locale-util.c
index 5008630e01..d26e633466 100644
--- a/src/test/test-locale-util.c
+++ b/src/test/test-locale-util.c
@@ -5,7 +5,6 @@
Copyright 2014 Ronny Chevalier
***/
-
#include "locale-util.h"
#include "macro.h"
#include "strv.h"
diff --git a/src/test/test-nss.c b/src/test/test-nss.c
index 0b118b5b2c..f6dee45ac0 100644
--- a/src/test/test-nss.c
+++ b/src/test/test-nss.c
@@ -181,7 +181,6 @@ static void test_gethostbyname4_r(void *handle, const char *module, const char *
}
}
-
static void test_gethostbyname3_r(void *handle, const char *module, const char *name, int af) {
const char *fname;
_nss_gethostbyname3_r_t f;
@@ -401,7 +400,6 @@ static int test_one_module(const char* dir,
char **name;
int i;
-
log_info("======== %s ========", module);
handle = open_handle(streq(module, "dns") ? NULL : dir,
diff --git a/src/test/test-parse-util.c b/src/test/test-parse-util.c
index 19273b2e25..37dbb0ce7a 100644
--- a/src/test/test-parse-util.c
+++ b/src/test/test-parse-util.c
@@ -662,7 +662,6 @@ static void test_parse_nice(void) {
assert_se(parse_nice("19", &n) >= 0 && n == 19);
assert_se(parse_nice("+19", &n) >= 0 && n == 19);
-
assert_se(parse_nice("", &n) == -EINVAL);
assert_se(parse_nice("-", &n) == -EINVAL);
assert_se(parse_nice("+", &n) == -EINVAL);
diff --git a/src/test/test-path.c b/src/test/test-path.c
index 3d990407b3..ed53177dcc 100644
--- a/src/test/test-path.c
+++ b/src/test/test-path.c
@@ -102,7 +102,6 @@ static void check_stop_unlink(Manager *m, Unit *unit, const char *test_path, con
service_state_to_string(service->state),
service_result_to_string(service->result));
-
/* But we timeout if the service has not been started in the allocated time */
n = now(CLOCK_MONOTONIC);
if (ts + timeout < n) {
diff --git a/src/test/test-stat-util.c b/src/test/test-stat-util.c
index 5fff7c93a0..6c9c132612 100644
--- a/src/test/test-stat-util.c
+++ b/src/test/test-stat-util.c
@@ -48,7 +48,6 @@ static void test_is_symlink(void) {
assert_se(is_symlink(name_link) == 1);
assert_se(is_symlink("/a/file/which/does/not/exist/i/guess") < 0);
-
unlink(name);
unlink(name_link);
}
diff --git a/src/test/test-string-util.c b/src/test/test-string-util.c
index a04c1f9d3a..965e2c5028 100644
--- a/src/test/test-string-util.c
+++ b/src/test/test-string-util.c
@@ -135,7 +135,6 @@ static void test_strrep(void) {
assert_se(streq(zero, ""));
}
-
static void test_strappend(void) {
_cleanup_free_ char *t1, *t2, *t3, *t4;
diff --git a/src/test/test-strv.c b/src/test/test-strv.c
index fa658eb056..ffe7507355 100644
--- a/src/test/test-strv.c
+++ b/src/test/test-strv.c
@@ -89,7 +89,6 @@ static const char* const input_table_one_empty[] = {
NULL,
};
-
static void test_strv_find(void) {
assert_se(strv_find((char **)input_table_multiple, "three"));
assert_se(!strv_find((char **)input_table_multiple, "four"));
diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c
index 84b20267ad..6b72fc90fd 100644
--- a/src/test/test-unit-file.c
+++ b/src/test/test-unit-file.c
@@ -383,7 +383,6 @@ static void test_config_parse_exec(void) {
c1 = c1->command_next;
check_execcommand(c1, "/bin/grep", NULL, "\\w+\\K", NULL, false);
-
log_info("/* trailing backslash: \\ */");
/* backslash is invalid */
r = config_parse_exec(NULL, "fake", 4, "section", 1,
diff --git a/src/test/test-unit-name.c b/src/test/test-unit-name.c
index 061adc70d8..b45c152915 100644
--- a/src/test/test-unit-name.c
+++ b/src/test/test-unit-name.c
@@ -412,7 +412,6 @@ static void test_unit_name_escape(void) {
assert_se(streq(r, "ab\\x2b\\x2dc.a-bc\\x40foo.service"));
}
-
static void test_u_n_t_one(const char *name, const char *expected, int ret) {
_cleanup_free_ char *f = NULL;