public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] syscalls/renameat: Remove renameat fallback definition
@ 2023-08-24 11:10 Yang Xu
  2023-08-24 11:10 ` [LTP] [PATCH 2/2] syscalls/renameat2: Remove renameat2 " Yang Xu
  2023-08-25  9:24 ` [LTP] [PATCH 1/2] syscalls/renameat: Remove renameat " Xiao Yang
  0 siblings, 2 replies; 5+ messages in thread
From: Yang Xu @ 2023-08-24 11:10 UTC (permalink / raw)
  To: ltp

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

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] 5+ messages in thread

* [LTP] [PATCH 2/2] syscalls/renameat2: Remove renameat2 fallback definition
  2023-08-24 11:10 [LTP] [PATCH 1/2] syscalls/renameat: Remove renameat fallback definition Yang Xu
@ 2023-08-24 11:10 ` Yang Xu
  2023-08-25  9:25   ` Xiao Yang
  2023-08-25  9:24 ` [LTP] [PATCH 1/2] syscalls/renameat: Remove renameat " Xiao Yang
  1 sibling, 1 reply; 5+ messages in thread
From: Yang Xu @ 2023-08-24 11:10 UTC (permalink / raw)
  To: ltp

Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 .../kernel/syscalls/renameat2/renameat2.h     | 35 -------------------
 .../kernel/syscalls/renameat2/renameat201.c   |  2 +-
 .../kernel/syscalls/renameat2/renameat202.c   |  2 +-
 3 files changed, 2 insertions(+), 37 deletions(-)
 delete mode 100644 testcases/kernel/syscalls/renameat2/renameat2.h

diff --git a/testcases/kernel/syscalls/renameat2/renameat2.h b/testcases/kernel/syscalls/renameat2/renameat2.h
deleted file mode 100644
index c4688ed53..000000000
--- a/testcases/kernel/syscalls/renameat2/renameat2.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2015 Cedric Hnyda <chnyda@suse.com>
- *
- * 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 RENAMEAT2_H
-#define RENAMEAT2_H
-
-#include <sys/types.h>
-#include "config.h"
-#include "lapi/syscalls.h"
-
-#if !defined(HAVE_RENAMEAT2)
-int renameat2(int olddirfd, const char *oldpath, int newdirfd,
-				const char *newpath, unsigned int flags)
-{
-	return tst_syscall(__NR_renameat2, olddirfd, oldpath, newdirfd,
-						newpath, flags);
-}
-#endif
-
-#endif /* RENAMEAT2_H */
diff --git a/testcases/kernel/syscalls/renameat2/renameat201.c b/testcases/kernel/syscalls/renameat2/renameat201.c
index 9832b1cdb..ff1747b8d 100644
--- a/testcases/kernel/syscalls/renameat2/renameat201.c
+++ b/testcases/kernel/syscalls/renameat2/renameat201.c
@@ -37,7 +37,7 @@
 #include "test.h"
 #include "safe_macros.h"
 #include "lapi/fcntl.h"
-#include "renameat2.h"
+#include <errno.h>
 
 #define TEST_DIR "test_dir/"
 #define TEST_DIR2 "test_dir2/"
diff --git a/testcases/kernel/syscalls/renameat2/renameat202.c b/testcases/kernel/syscalls/renameat2/renameat202.c
index 0c1457022..ef3df3e91 100644
--- a/testcases/kernel/syscalls/renameat2/renameat202.c
+++ b/testcases/kernel/syscalls/renameat2/renameat202.c
@@ -26,7 +26,7 @@
 #include "test.h"
 #include "safe_macros.h"
 #include "lapi/fcntl.h"
-#include "renameat2.h"
+#include <errno.h>
 
 #define TEST_DIR "test_dir/"
 #define TEST_DIR2 "test_dir2/"
-- 
2.39.1


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

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

* Re: [LTP] [PATCH 1/2] syscalls/renameat: Remove renameat fallback definition
  2023-08-24 11:10 [LTP] [PATCH 1/2] syscalls/renameat: Remove renameat fallback definition Yang Xu
  2023-08-24 11:10 ` [LTP] [PATCH 2/2] syscalls/renameat2: Remove renameat2 " Yang Xu
@ 2023-08-25  9:24 ` Xiao Yang
  2023-09-05  8:58   ` Richard Palethorpe
  1 sibling, 1 reply; 5+ messages in thread
From: Xiao Yang @ 2023-08-25  9:24 UTC (permalink / raw)
  To: Yang Xu, ltp

Hi Xu,

1) Please explain why you drop the fallback definition by adding a 
commit message.
2) I think the related code in the following file can also be removed:
configure.ac
include/lapi/syscalls/aarch64.in
include/lapi/syscalls/arc.in
include/lapi/syscalls/arm.in
include/lapi/syscalls/hppa.in
include/lapi/syscalls/i386.in
include/lapi/syscalls/ia64.in
include/lapi/syscalls/loongarch.in
include/lapi/syscalls/mips_n32.in
include/lapi/syscalls/mips_n64.in
include/lapi/syscalls/mips_o32.in
include/lapi/syscalls/powerpc.in
include/lapi/syscalls/powerpc64.in
include/lapi/syscalls/s390.in
include/lapi/syscalls/s390x.in
include/lapi/syscalls/sh.in
include/lapi/syscalls/sparc.in
include/lapi/syscalls/sparc64.in
include/lapi/syscalls/x86_64.in

Other than those, it looks good to me.
Reviewed-by: Xiao Yang <yangx.jy@fujitsu.com>

Best Regards,
Xiao Yang

On 2023/8/24 19:10, Yang Xu wrote:
> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
> ---
>   include/lapi/renameat.h                       | 23 -------------------
>   .../kernel/syscalls/renameat/renameat01.c     |  1 -
>   2 files changed, 24 deletions(-)
>   delete mode 100644 include/lapi/renameat.h
> 
> 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"

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

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

* Re: [LTP] [PATCH 2/2] syscalls/renameat2: Remove renameat2 fallback definition
  2023-08-24 11:10 ` [LTP] [PATCH 2/2] syscalls/renameat2: Remove renameat2 " Yang Xu
@ 2023-08-25  9:25   ` Xiao Yang
  0 siblings, 0 replies; 5+ messages in thread
From: Xiao Yang @ 2023-08-25  9:25 UTC (permalink / raw)
  To: Yang Xu, ltp

Hi Xu,

The same comment as I said on renameat01.c.
Reviewed-by: Xiao Yang <yangx.jy@fujitsu.com>

Best Regards,
Xiao Yang

On 2023/8/24 19:10, Yang Xu wrote:
> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
> ---
>   .../kernel/syscalls/renameat2/renameat2.h     | 35 -------------------
>   .../kernel/syscalls/renameat2/renameat201.c   |  2 +-
>   .../kernel/syscalls/renameat2/renameat202.c   |  2 +-
>   3 files changed, 2 insertions(+), 37 deletions(-)
>   delete mode 100644 testcases/kernel/syscalls/renameat2/renameat2.h
> 
> diff --git a/testcases/kernel/syscalls/renameat2/renameat2.h b/testcases/kernel/syscalls/renameat2/renameat2.h
> deleted file mode 100644
> index c4688ed53..000000000
> --- a/testcases/kernel/syscalls/renameat2/renameat2.h
> +++ /dev/null
> @@ -1,35 +0,0 @@
> -/*
> - * Copyright (c) 2015 Cedric Hnyda <chnyda@suse.com>
> - *
> - * 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 RENAMEAT2_H
> -#define RENAMEAT2_H
> -
> -#include <sys/types.h>
> -#include "config.h"
> -#include "lapi/syscalls.h"
> -
> -#if !defined(HAVE_RENAMEAT2)
> -int renameat2(int olddirfd, const char *oldpath, int newdirfd,
> -				const char *newpath, unsigned int flags)
> -{
> -	return tst_syscall(__NR_renameat2, olddirfd, oldpath, newdirfd,
> -						newpath, flags);
> -}
> -#endif
> -
> -#endif /* RENAMEAT2_H */
> diff --git a/testcases/kernel/syscalls/renameat2/renameat201.c b/testcases/kernel/syscalls/renameat2/renameat201.c
> index 9832b1cdb..ff1747b8d 100644
> --- a/testcases/kernel/syscalls/renameat2/renameat201.c
> +++ b/testcases/kernel/syscalls/renameat2/renameat201.c
> @@ -37,7 +37,7 @@
>   #include "test.h"
>   #include "safe_macros.h"
>   #include "lapi/fcntl.h"
> -#include "renameat2.h"
> +#include <errno.h>
>   
>   #define TEST_DIR "test_dir/"
>   #define TEST_DIR2 "test_dir2/"
> diff --git a/testcases/kernel/syscalls/renameat2/renameat202.c b/testcases/kernel/syscalls/renameat2/renameat202.c
> index 0c1457022..ef3df3e91 100644
> --- a/testcases/kernel/syscalls/renameat2/renameat202.c
> +++ b/testcases/kernel/syscalls/renameat2/renameat202.c
> @@ -26,7 +26,7 @@
>   #include "test.h"
>   #include "safe_macros.h"
>   #include "lapi/fcntl.h"
> -#include "renameat2.h"
> +#include <errno.h>
>   
>   #define TEST_DIR "test_dir/"
>   #define TEST_DIR2 "test_dir2/"

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

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

* Re: [LTP] [PATCH 1/2] syscalls/renameat: Remove renameat fallback definition
  2023-08-25  9:24 ` [LTP] [PATCH 1/2] syscalls/renameat: Remove renameat " Xiao Yang
@ 2023-09-05  8:58   ` Richard Palethorpe
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Palethorpe @ 2023-09-05  8:58 UTC (permalink / raw)
  To: Xiao Yang; +Cc: ltp

Hello,

Xiao Yang <yangx.jy@fujitsu.com> writes:

> Hi Xu,
>
> 1) Please explain why you drop the fallback definition by adding a
> commit message.

Yes, I don't want to remove this code unless there is a good argument
why it is safe.

Especially as the code is small and not causing any issues that I am
aware of.

Setting this to changes requested

> 2) I think the related code in the following file can also be removed:
> configure.ac
> include/lapi/syscalls/aarch64.in
> include/lapi/syscalls/arc.in
> include/lapi/syscalls/arm.in
> include/lapi/syscalls/hppa.in
> include/lapi/syscalls/i386.in
> include/lapi/syscalls/ia64.in
> include/lapi/syscalls/loongarch.in
> include/lapi/syscalls/mips_n32.in
> include/lapi/syscalls/mips_n64.in
> include/lapi/syscalls/mips_o32.in
> include/lapi/syscalls/powerpc.in
> include/lapi/syscalls/powerpc64.in
> include/lapi/syscalls/s390.in
> include/lapi/syscalls/s390x.in
> include/lapi/syscalls/sh.in
> include/lapi/syscalls/sparc.in
> include/lapi/syscalls/sparc64.in
> include/lapi/syscalls/x86_64.in
>
> Other than those, it looks good to me.
> Reviewed-by: Xiao Yang <yangx.jy@fujitsu.com>
>
> Best Regards,
> Xiao Yang
>
> On 2023/8/24 19:10, Yang Xu wrote:
>> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
>> ---
>>   include/lapi/renameat.h                       | 23 -------------------
>>   .../kernel/syscalls/renameat/renameat01.c     |  1 -
>>   2 files changed, 24 deletions(-)
>>   delete mode 100644 include/lapi/renameat.h
>> 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"


-- 
Thank you,
Richard.

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

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

end of thread, other threads:[~2023-09-05  9:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-24 11:10 [LTP] [PATCH 1/2] syscalls/renameat: Remove renameat fallback definition Yang Xu
2023-08-24 11:10 ` [LTP] [PATCH 2/2] syscalls/renameat2: Remove renameat2 " Yang Xu
2023-08-25  9:25   ` Xiao Yang
2023-08-25  9:24 ` [LTP] [PATCH 1/2] syscalls/renameat: Remove renameat " Xiao Yang
2023-09-05  8:58   ` Richard Palethorpe

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