* [LTP] [PATCH 1/2] Include lapi/posix_clocks.h in tst_safe_clocks.h
@ 2019-02-25 23:43 Petr Vorel
2019-02-25 23:43 ` [LTP] [PATCH 2/2] lapi/posix_clocks.h: Include <time.h> before definitions Petr Vorel
2019-02-26 15:27 ` [LTP] [PATCH 1/2] Include lapi/posix_clocks.h in tst_safe_clocks.h Jan Stancek
0 siblings, 2 replies; 4+ messages in thread
From: Petr Vorel @ 2019-02-25 23:43 UTC (permalink / raw)
To: ltp
Although this not needed, users of tst_safe_clocks.h usually need also
posix clock flags and it's safer to load them automatically so fixes
like 938a1023d are not needed any more.
+ minor copyright formatting cleanup.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
include/tst_safe_clocks.h | 8 +++++---
testcases/kernel/syscalls/clock_gettime/clock_gettime01.c | 1 -
testcases/kernel/syscalls/clock_gettime/clock_gettime02.c | 1 -
testcases/kernel/syscalls/clock_settime/clock_settime02.c | 1 -
testcases/kernel/syscalls/statx/statx06.c | 1 -
5 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/include/tst_safe_clocks.h b/include/tst_safe_clocks.h
index 553f8464a..d5cd83394 100644
--- a/include/tst_safe_clocks.h
+++ b/include/tst_safe_clocks.h
@@ -1,11 +1,13 @@
-// SPDX-License-Identifier: GPL-2.0 or later
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
- * Copyright (c) Zilogic Systems Pvt. Ltd., 2018
- * Email : code@zilogic.com
+ * Copyright (c) 2019, Linux Test Project
+ * Copyright (c) Zilogic Systems Pvt. Ltd., 2018
+ * Email : code@zilogic.com
*/
#include <time.h>
#include "tst_test.h"
+#include "lapi/posix_clocks.h"
static inline void safe_clock_getres(const char *file, const int lineno,
clockid_t clk_id, struct timespec *res)
diff --git a/testcases/kernel/syscalls/clock_gettime/clock_gettime01.c b/testcases/kernel/syscalls/clock_gettime/clock_gettime01.c
index f8028f0f6..d365823b2 100644
--- a/testcases/kernel/syscalls/clock_gettime/clock_gettime01.c
+++ b/testcases/kernel/syscalls/clock_gettime/clock_gettime01.c
@@ -18,7 +18,6 @@
#include "config.h"
#include "tst_timer.h"
-#include "lapi/posix_clocks.h"
#include "tst_safe_clocks.h"
#include "tst_test.h"
#include "lapi/syscalls.h"
diff --git a/testcases/kernel/syscalls/clock_gettime/clock_gettime02.c b/testcases/kernel/syscalls/clock_gettime/clock_gettime02.c
index c08f0f0de..2a29a71e6 100644
--- a/testcases/kernel/syscalls/clock_gettime/clock_gettime02.c
+++ b/testcases/kernel/syscalls/clock_gettime/clock_gettime02.c
@@ -21,7 +21,6 @@
#include "config.h"
#include "tst_test.h"
#include "lapi/syscalls.h"
-#include "lapi/posix_clocks.h"
#include "tst_timer.h"
#include "tst_safe_clocks.h"
diff --git a/testcases/kernel/syscalls/clock_settime/clock_settime02.c b/testcases/kernel/syscalls/clock_settime/clock_settime02.c
index a6df4940a..8db417b6b 100644
--- a/testcases/kernel/syscalls/clock_settime/clock_settime02.c
+++ b/testcases/kernel/syscalls/clock_settime/clock_settime02.c
@@ -11,7 +11,6 @@
#include "config.h"
#include "tst_test.h"
#include "lapi/syscalls.h"
-#include "lapi/posix_clocks.h"
#include "tst_timer.h"
#include "tst_safe_clocks.h"
diff --git a/testcases/kernel/syscalls/statx/statx06.c b/testcases/kernel/syscalls/statx/statx06.c
index 524022499..831f73092 100644
--- a/testcases/kernel/syscalls/statx/statx06.c
+++ b/testcases/kernel/syscalls/statx/statx06.c
@@ -45,7 +45,6 @@
#include "lapi/stat.h"
#include "lapi/mount.h"
#include "lapi/fcntl.h"
-#include "lapi/posix_clocks.h"
#define MOUNT_POINT "mount_ext"
#define TEST_FILE MOUNT_POINT"/test_file.txt"
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [LTP] [PATCH 2/2] lapi/posix_clocks.h: Include <time.h> before definitions
2019-02-25 23:43 [LTP] [PATCH 1/2] Include lapi/posix_clocks.h in tst_safe_clocks.h Petr Vorel
@ 2019-02-25 23:43 ` Petr Vorel
2019-02-26 15:27 ` [LTP] [PATCH 1/2] Include lapi/posix_clocks.h in tst_safe_clocks.h Jan Stancek
1 sibling, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2019-02-25 23:43 UTC (permalink / raw)
To: ltp
+ minor formatting fixes (include guards, copyright).
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
include/lapi/posix_clocks.h | 24 +++++++-----------------
1 file changed, 7 insertions(+), 17 deletions(-)
diff --git a/include/lapi/posix_clocks.h b/include/lapi/posix_clocks.h
index 7819bb9c0..0d1f0e99c 100644
--- a/include/lapi/posix_clocks.h
+++ b/include/lapi/posix_clocks.h
@@ -1,23 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
+ * Copyright (c) 2019, Linux Test Project
* Copyright (c) 2013 Cyril Hrubis <chrubis@suse.cz>
- *
- * 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 would 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef __POSIX_CLOCK_IDS_H__
-#define __POSIX_CLOCK_IDS_H__
+#include <time.h>
+
+#ifndef POSIX_CLOCKS_H__
+#define POSIX_CLOCKS_H__
#ifndef CLOCK_MONOTONIC_RAW
# define CLOCK_MONOTONIC_RAW 4
@@ -43,4 +33,4 @@
# define CLOCK_BOOTTIME_ALARM 9
#endif
-#endif /* __POSIX_CLOCK_IDS_H__ */
+#endif /* POSIX_CLOCKS_H__ */
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [LTP] [PATCH 1/2] Include lapi/posix_clocks.h in tst_safe_clocks.h
2019-02-25 23:43 [LTP] [PATCH 1/2] Include lapi/posix_clocks.h in tst_safe_clocks.h Petr Vorel
2019-02-25 23:43 ` [LTP] [PATCH 2/2] lapi/posix_clocks.h: Include <time.h> before definitions Petr Vorel
@ 2019-02-26 15:27 ` Jan Stancek
2019-02-26 17:57 ` Petr Vorel
1 sibling, 1 reply; 4+ messages in thread
From: Jan Stancek @ 2019-02-26 15:27 UTC (permalink / raw)
To: ltp
----- Original Message -----
> Although this not needed, users of tst_safe_clocks.h usually need also
> posix clock flags and it's safer to load them automatically so fixes
> like 938a1023d are not needed any more.
>
> + minor copyright formatting cleanup.
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
Both look good to me, ack.
Regards,
Jan
> ---
> include/tst_safe_clocks.h | 8 +++++---
> testcases/kernel/syscalls/clock_gettime/clock_gettime01.c | 1 -
> testcases/kernel/syscalls/clock_gettime/clock_gettime02.c | 1 -
> testcases/kernel/syscalls/clock_settime/clock_settime02.c | 1 -
> testcases/kernel/syscalls/statx/statx06.c | 1 -
> 5 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/include/tst_safe_clocks.h b/include/tst_safe_clocks.h
> index 553f8464a..d5cd83394 100644
> --- a/include/tst_safe_clocks.h
> +++ b/include/tst_safe_clocks.h
> @@ -1,11 +1,13 @@
> -// SPDX-License-Identifier: GPL-2.0 or later
> +// SPDX-License-Identifier: GPL-2.0-or-later
> /*
> - * Copyright (c) Zilogic Systems Pvt. Ltd., 2018
> - * Email : code@zilogic.com
> + * Copyright (c) 2019, Linux Test Project
> + * Copyright (c) Zilogic Systems Pvt. Ltd., 2018
> + * Email : code@zilogic.com
> */
>
> #include <time.h>
> #include "tst_test.h"
> +#include "lapi/posix_clocks.h"
>
> static inline void safe_clock_getres(const char *file, const int lineno,
> clockid_t clk_id, struct timespec *res)
> diff --git a/testcases/kernel/syscalls/clock_gettime/clock_gettime01.c
> b/testcases/kernel/syscalls/clock_gettime/clock_gettime01.c
> index f8028f0f6..d365823b2 100644
> --- a/testcases/kernel/syscalls/clock_gettime/clock_gettime01.c
> +++ b/testcases/kernel/syscalls/clock_gettime/clock_gettime01.c
> @@ -18,7 +18,6 @@
>
> #include "config.h"
> #include "tst_timer.h"
> -#include "lapi/posix_clocks.h"
> #include "tst_safe_clocks.h"
> #include "tst_test.h"
> #include "lapi/syscalls.h"
> diff --git a/testcases/kernel/syscalls/clock_gettime/clock_gettime02.c
> b/testcases/kernel/syscalls/clock_gettime/clock_gettime02.c
> index c08f0f0de..2a29a71e6 100644
> --- a/testcases/kernel/syscalls/clock_gettime/clock_gettime02.c
> +++ b/testcases/kernel/syscalls/clock_gettime/clock_gettime02.c
> @@ -21,7 +21,6 @@
> #include "config.h"
> #include "tst_test.h"
> #include "lapi/syscalls.h"
> -#include "lapi/posix_clocks.h"
> #include "tst_timer.h"
> #include "tst_safe_clocks.h"
>
> diff --git a/testcases/kernel/syscalls/clock_settime/clock_settime02.c
> b/testcases/kernel/syscalls/clock_settime/clock_settime02.c
> index a6df4940a..8db417b6b 100644
> --- a/testcases/kernel/syscalls/clock_settime/clock_settime02.c
> +++ b/testcases/kernel/syscalls/clock_settime/clock_settime02.c
> @@ -11,7 +11,6 @@
> #include "config.h"
> #include "tst_test.h"
> #include "lapi/syscalls.h"
> -#include "lapi/posix_clocks.h"
> #include "tst_timer.h"
> #include "tst_safe_clocks.h"
>
> diff --git a/testcases/kernel/syscalls/statx/statx06.c
> b/testcases/kernel/syscalls/statx/statx06.c
> index 524022499..831f73092 100644
> --- a/testcases/kernel/syscalls/statx/statx06.c
> +++ b/testcases/kernel/syscalls/statx/statx06.c
> @@ -45,7 +45,6 @@
> #include "lapi/stat.h"
> #include "lapi/mount.h"
> #include "lapi/fcntl.h"
> -#include "lapi/posix_clocks.h"
>
> #define MOUNT_POINT "mount_ext"
> #define TEST_FILE MOUNT_POINT"/test_file.txt"
> --
> 2.20.1
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [LTP] [PATCH 1/2] Include lapi/posix_clocks.h in tst_safe_clocks.h
2019-02-26 15:27 ` [LTP] [PATCH 1/2] Include lapi/posix_clocks.h in tst_safe_clocks.h Jan Stancek
@ 2019-02-26 17:57 ` Petr Vorel
0 siblings, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2019-02-26 17:57 UTC (permalink / raw)
To: ltp
Hi Jan,
> Both look good to me, ack.
Thanks a lot for your review! Merged.
> Regards,
> Jan
Kind regards,
Petr
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-02-26 17:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-25 23:43 [LTP] [PATCH 1/2] Include lapi/posix_clocks.h in tst_safe_clocks.h Petr Vorel
2019-02-25 23:43 ` [LTP] [PATCH 2/2] lapi/posix_clocks.h: Include <time.h> before definitions Petr Vorel
2019-02-26 15:27 ` [LTP] [PATCH 1/2] Include lapi/posix_clocks.h in tst_safe_clocks.h Jan Stancek
2019-02-26 17:57 ` Petr Vorel
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.