public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Avinesh Kumar <akumar@suse.de>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 3/6] Remove unnecessary header includes
Date: Fri, 17 Jun 2022 22:50:22 +0530	[thread overview]
Message-ID: <20220617172025.23975-4-akumar@suse.de> (raw)
In-Reply-To: <20220617172025.23975-1-akumar@suse.de>

Signed-off-by: Avinesh Kumar <akumar@suse.de>
---
 testcases/kernel/syscalls/utime/utime03.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/testcases/kernel/syscalls/utime/utime03.c b/testcases/kernel/syscalls/utime/utime03.c
index 2358fd70b..0c64518d2 100644
--- a/testcases/kernel/syscalls/utime/utime03.c
+++ b/testcases/kernel/syscalls/utime/utime03.c
@@ -18,11 +18,8 @@
  * - The user ID of the process has write access to the file.
  */
 
-#include <sys/types.h>
 #include <pwd.h>
 #include <utime.h>
-#include <sys/stat.h>
-#include <time.h>
 
 #include "tst_test.h"
 #include "tst_uid.h"
@@ -60,7 +57,7 @@ static void run(void)
 	struct stat statbuf;
 	time_t mintime, maxtime;
 
-	utbuf.modtime = time(0) - 5;
+	utbuf.modtime = tst_get_fs_timestamp() - 5;
 	utbuf.actime = utbuf.modtime + 1;
 	TST_EXP_PASS_SILENT(utime(TEMP_FILE, &utbuf));
 	SAFE_STAT(TEMP_FILE, &statbuf);
-- 
2.36.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2022-06-17 17:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-17 17:20 [LTP] [PATCH 0/6] Convert utime tests to new LTP API Avinesh Kumar
2022-06-17 17:20 ` [LTP] [PATCH 1/6] Rewrite utime01.c using " Avinesh Kumar
2022-06-21 10:17   ` Cyril Hrubis
2022-06-17 17:20 ` [LTP] [PATCH 2/6] Rewrite utime02.c " Avinesh Kumar
2022-06-21 10:19   ` Cyril Hrubis
2022-06-17 17:20 ` Avinesh Kumar [this message]
2022-06-21 10:24   ` [LTP] [PATCH 3/6] Remove unnecessary header includes Cyril Hrubis
2022-06-17 17:20 ` [LTP] [PATCH 4/6] Rewrite utime04.c using new LTP API Avinesh Kumar
2022-06-21 12:38   ` Cyril Hrubis
2022-06-17 17:20 ` [LTP] [PATCH 5/6] Rewrite utime05.c " Avinesh Kumar
2022-06-21 12:40   ` Cyril Hrubis
2022-06-17 17:20 ` [LTP] [PATCH 6/6] Rewrite utime06.c " Avinesh Kumar
2022-06-21 12:59   ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220617172025.23975-4-akumar@suse.de \
    --to=akumar@suse.de \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox