public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v2] syscalls/renameat: Remove renameat fallback definition
@ 2023-09-15  9:36 Yang Xu
  2023-09-21  6:08 ` Petr Vorel
  2023-10-16  8:03 ` Petr Vorel
  0 siblings, 2 replies; 6+ messages in thread
From: Yang Xu @ 2023-09-15  9:36 UTC (permalink / raw)
  To: ltp

Looking at man renameat, it was added into kernel 2.6.16 and since the
oldest kernel we support is 3.10 (see doc/supported-kernel-libc-versions
.txt) we can as well completely drop this fallback definition.

Reviewed-by: Xiao Yang <yangx.jy@fujitsu.com>
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 configure.ac                                  |  1 -
 include/lapi/renameat.h                       | 23 -------------------
 .../kernel/syscalls/renameat/renameat01.c     |  1 -
 3 files changed, 25 deletions(-)
 delete mode 100644 include/lapi/renameat.h

diff --git a/configure.ac b/configure.ac
index 662c4c058..30a6f56e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -135,7 +135,6 @@ AC_CHECK_FUNCS_ONCE([ \
     rand_r \
     readlinkat \
     recvmmsg \
-    renameat \
     renameat2 \
     sched_getcpu \
     sendmmsg \
diff --git a/include/lapi/renameat.h b/include/lapi/renameat.h
deleted file mode 100644
index abf4c1d6e..000000000
--- a/include/lapi/renameat.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- * Copyright (c) International Business Machines  Corp., 2007
- * Copyright (c) 2014 Fujitsu Ltd.
- */
-
-#ifndef LAPI_RENAMEAT_H__
-#define LAPI_RENAMEAT_H__
-
-#include <sys/types.h>
-#include "config.h"
-#include "lapi/syscalls.h"
-
-#if !defined(HAVE_RENAMEAT)
-static inline int renameat(int olddirfd, const char *oldpath, int newdirfd,
-                           const char *newpath)
-{
-	return tst_syscall(__NR_renameat, olddirfd, oldpath, newdirfd,
-					newpath);
-}
-#endif
-
-#endif /* LAPI_RENAMEAT_H__ */
diff --git a/testcases/kernel/syscalls/renameat/renameat01.c b/testcases/kernel/syscalls/renameat/renameat01.c
index 3de103563..c318a7971 100644
--- a/testcases/kernel/syscalls/renameat/renameat01.c
+++ b/testcases/kernel/syscalls/renameat/renameat01.c
@@ -50,7 +50,6 @@
 #include "test.h"
 #include "safe_macros.h"
 #include "lapi/fcntl.h"
-#include "lapi/renameat.h"
 
 #define MNTPOINT "mntpoint"
 #define TESTDIR "testdir"
-- 
2.39.1


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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH v2] syscalls/renameat: Remove renameat fallback definition
  2023-09-15  9:36 [LTP] [PATCH v2] syscalls/renameat: Remove renameat fallback definition Yang Xu
@ 2023-09-21  6:08 ` Petr Vorel
  2023-09-21  7:02   ` Yang Xu (Fujitsu)
  2023-10-16  8:03 ` Petr Vorel
  1 sibling, 1 reply; 6+ messages in thread
From: Petr Vorel @ 2023-09-21  6:08 UTC (permalink / raw)
  To: Yang Xu; +Cc: Richard Palethorpe, ltp

Hi all,

> Looking at man renameat, it was added into kernel 2.6.16 and since the
> oldest kernel we support is 3.10 (see doc/supported-kernel-libc-versions
> .txt) we can as well completely drop this fallback definition.

Yang asked [1] also for removing entry in include/lapi/syscalls/aarch64.in and
others, but I think we should keep it there.

I'd definitely keep this till the release, but then it should be safe to remove
this old fallback.

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr

[1] https://lore.kernel.org/ltp/040088ba-20f1-711f-3fe5-6d1d4782a015@fujitsu.com/

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH v2] syscalls/renameat: Remove renameat fallback definition
  2023-09-21  6:08 ` Petr Vorel
@ 2023-09-21  7:02   ` Yang Xu (Fujitsu)
  2023-10-13 10:13     ` Yang Xu (Fujitsu)
  0 siblings, 1 reply; 6+ messages in thread
From: Yang Xu (Fujitsu) @ 2023-09-21  7:02 UTC (permalink / raw)
  To: Petr Vorel; +Cc: Richard Palethorpe, ltp@lists.linux.it

Hi Petr

Thanks for your review.

>Yang asked [1] also for removing entry in include/lapi/syscalls/aarch64.in and others, but I think we should keep it there.

Of course, we should ensure user still can use different variants to test function ie use glibc call or syscall(syscall_number) when they have
special aims , so I only remove these old fallback and not remove syscall number in ltp lapi/syscalls/*.in file.

Especially, these syscalls/*in files should be consistent with these libc header in file as far as possible IMO.

>I'd definitely keep this till the release, but then it should be safe to remove this old fallback.
This sounds great.

Best Regards
Yang Xu

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH v2] syscalls/renameat: Remove renameat fallback definition
  2023-09-21  7:02   ` Yang Xu (Fujitsu)
@ 2023-10-13 10:13     ` Yang Xu (Fujitsu)
  2023-10-16  7:38       ` Petr Vorel
  0 siblings, 1 reply; 6+ messages in thread
From: Yang Xu (Fujitsu) @ 2023-10-13 10:13 UTC (permalink / raw)
  To: Petr Vorel; +Cc: Richard Palethorpe, ltp@lists.linux.it

HI



Ping.



Best Regards

Yang Xu


Hi Petr

Thanks for your review.



Yang asked [1] also for removing entry in include/lapi/syscalls/aarch64.in and others, but I think we should keep it there.



Of course, we should ensure user still can use different variants to test function ie use glibc call or syscall(syscall_number) when they have
special aims , so I only remove these old fallback and not remove syscall number in ltp lapi/syscalls/*.in file.

Especially, these syscalls/*in files should be consistent with these libc header in file as far as possible IMO.



I'd definitely keep this till the release, but then it should be safe to remove this old fallback.


This sounds great.

Best Regards
Yang Xu



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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH v2] syscalls/renameat: Remove renameat fallback definition
  2023-10-13 10:13     ` Yang Xu (Fujitsu)
@ 2023-10-16  7:38       ` Petr Vorel
  0 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2023-10-16  7:38 UTC (permalink / raw)
  To: Yang Xu (Fujitsu); +Cc: Richard Palethorpe, ltp@lists.linux.it

Hi Xu,

merged, thanks!

Kind regards,
Petr

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH v2] syscalls/renameat: Remove renameat fallback definition
  2023-09-15  9:36 [LTP] [PATCH v2] syscalls/renameat: Remove renameat fallback definition Yang Xu
  2023-09-21  6:08 ` Petr Vorel
@ 2023-10-16  8:03 ` Petr Vorel
  1 sibling, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2023-10-16  8:03 UTC (permalink / raw)
  To: Yang Xu; +Cc: ltp

Hi Xu,

> Looking at man renameat, it was added into kernel 2.6.16 and since the
> oldest kernel we support is 3.10 (see doc/supported-kernel-libc-versions
> .txt) we can as well completely drop this fallback definition.

BTW although man is correct, the lapi function was IMHO done due missing libc
support. It was added in glibc 2.4, thus not sure why the support was added in
2014, probably to support the oldest distros.

Also, without kernel support the function would not work at all,
therefore it is irrelevant when readlinkat was added into kernel.

Thus I dared to update the commit message.

Kind regards,
Petr

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-10-16  8:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-15  9:36 [LTP] [PATCH v2] syscalls/renameat: Remove renameat fallback definition Yang Xu
2023-09-21  6:08 ` Petr Vorel
2023-09-21  7:02   ` Yang Xu (Fujitsu)
2023-10-13 10:13     ` Yang Xu (Fujitsu)
2023-10-16  7:38       ` Petr Vorel
2023-10-16  8:03 ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox