* [LTP] [PATCH] tst_wallclock: Prevent fail on read-only /etc/localtime
@ 2021-09-01 5:17 Joerg Vehlow
2021-09-01 8:00 ` Petr Vorel
0 siblings, 1 reply; 3+ messages in thread
From: Joerg Vehlow @ 2021-09-01 5:17 UTC (permalink / raw)
To: ltp
From: Joerg Vehlow <joerg.vehlow@aox-tech.de>
If /etc/localtime is readonly, the time should not
have changed anyway.
Signed-off-by: Joerg Vehlow <joerg.vehlow@aox-tech.de>
---
lib/tst_wallclock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/tst_wallclock.c b/lib/tst_wallclock.c
index 1244ea26b..ee53e2b7f 100644
--- a/lib/tst_wallclock.c
+++ b/lib/tst_wallclock.c
@@ -72,7 +72,7 @@ void tst_wallclock_restore(void)
* might not be enough because the current access time might be far
* in the future.
*/
- ret = access(localtime, F_OK);
+ ret = access(localtime, F_OK | W_OK);
if (!ret)
SAFE_TOUCH(localtime, 0, NULL);
}
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [LTP] [PATCH] tst_wallclock: Prevent fail on read-only /etc/localtime
2021-09-01 5:17 [LTP] [PATCH] tst_wallclock: Prevent fail on read-only /etc/localtime Joerg Vehlow
@ 2021-09-01 8:00 ` Petr Vorel
2021-09-09 11:40 ` Petr Vorel
0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2021-09-01 8:00 UTC (permalink / raw)
To: ltp
Hi Joerg,
good catch!
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH] tst_wallclock: Prevent fail on read-only /etc/localtime
@ 2021-09-09 11:40 ` Petr Vorel
0 siblings, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2021-09-09 11:40 UTC (permalink / raw)
To: Joerg Vehlow, Joerg Vehlow, egorenar, ltp
Hi Joerg, all,
merged, thanks!
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-09 11:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-01 5:17 [LTP] [PATCH] tst_wallclock: Prevent fail on read-only /etc/localtime Joerg Vehlow
2021-09-01 8:00 ` Petr Vorel
2021-09-09 11:40 ` Petr Vorel
2021-09-09 11:40 ` 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.