Skip to contentSkip to conversation

Add rename15 test

PATCH Superseded Andrea Cervesato 3 participants 3 messages Sep 11, 2024 – Sep 12, 2024

v4 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 Add rename15 test

From: Andrea Cervesato <[email protected]>

This test has been extracted from symlink01 and it verifies that rename() is working correctly on symlink() generated files, renaming symbolic link and checking if stat() information are preserved.

---
use lstat to make sure symlink exist and it has been created check if files are still there or they have been removed

 runtest/syscalls                            |   1 +
 testcases/kernel/syscalls/rename/.gitignore |   1 +
 testcases/kernel/syscalls/rename/rename15.c | 126 ++++++++++++++++++++
 3 files changed, 128 insertions(+)
 create mode 100644 testcases/kernel/syscalls/rename/rename15.c
runtest/syscalls +1 -0
index a9fc8c432..bc99e8272 100644
@@ -1196,6 +1196,7 @@ rename11 rename11
 rename12 rename12
 rename13 rename13
 rename14 rename14
+rename15 rename15
 
 #renameat test cases
 renameat01 renameat01
testcases/kernel/syscalls/rename/.gitignore +1 -0
index f95cf7d21..d17b80f09 100644
@@ -11,3 +11,4 @@
 /rename12
 /rename13
 /rename14
+/rename15
testcases/kernel/syscalls/rename/rename15.c new file +126 -0

126 lines not on this page · raw message

Signature · 5 lines
2.43.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#1 lore raw

testcases/kernel/syscalls/rename/rename15.c line 116

Quoted 4 lines · Andrea Cervesato
testcases/kernel/syscalls/rename/rename15.c new file +3 -0
+       oldname = tst_tmpdir_mkpath(OLDNAME);
+       newname = tst_tmpdir_mkpath(NEWNAME);
+       objname = tst_tmpdir_mkpath(OBJNAME);

Nit: the function has been renamed to tst_tmpdir_genpath, somebody who applies
this patch can help adjust it.

Signature · 5 lines
Regards,
Li Wang

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#2 lore raw

Sure, thanks for keeping us updated. Gonna fix the patch and send v5

Andrea

Quoted 14 lines · Li Wang

Andrea Cervesato <[email protected]> wrote:

    +       oldname = tst_tmpdir_mkpath(OLDNAME);
    +       newname = tst_tmpdir_mkpath(NEWNAME);
    +       objname = tst_tmpdir_mkpath(OBJNAME);

Nit: the function has been renamed to tst_tmpdir_genpath, somebody who applies this patch can help adjust it.

Signature · 2 lines
Regards,
Li Wang
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp