Skip to content

Fix rename/renameat w/ hardlinks

Mark Hatle yocto-patches 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5run_tests.sh: Allow the user to specify specific tests to runrun_tests.sh+29 -30 replies
2/5tests: Add mv then hardlink testingtest/test-mv-hardlink.sh test/test-rename-hardlink.c test/test-rename-hardlink.sh +2 more+268 -00 replies
3/5renameat2/renameat: only ignore when both old and new path are not in PSEUDO_INCLUDE_PATHSmakewrappers ports/unix/guts/renameat.c+28 -80 replies
4/5rename: only ignore when both old and new path are not in PSEUDO_INCLUDE_PATHSports/unix/guts/rename.c+22 -40 replies
5/5Makefile.in: Bump version to 1.9.7Makefile.in+1 -10 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by.

PatchPaul Barker
1/5
2/5
3/5Helped-by
4/5Helped-by
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [pseudo][PATCH 0/5] Fix rename/renameat w/ hardlinks

Changqing Li found the issue related to the renaming followed by a hardlink causing failures. Created test case(s) based on Paul Barker's suggestion.

The test cases check both 'mv / ln', as well as specific calls to both rename and renameat2.

Due to these tests it was observed that rename had the same bug as renameat2, and the fix was applied there as well.

Changqing Li (1):
renameat2/renameat: only ignore when both old and new path are not in
PSEUDO_INCLUDE_PATHS

Mark Hatle (4):
run_tests.sh: Allow the user to specify specific tests to run
tests: Add mv then hardlink testing
rename: only ignore when both old and new path are not in
PSEUDO_INCLUDE_PATHS
Makefile.in: Bump version to 1.9.7

 Makefile.in                    |   2 +-
 makewrappers                   |   4 +-
 ports/unix/guts/rename.c       |  26 +++++++++--
 ports/unix/guts/renameat.c     |  32 ++++++++++---
 run_tests.sh                   |  32 +++++++++++--
 test/test-mv-hardlink.sh       |  52 +++++++++++++++++++++
 test/test-rename-hardlink.c    |  87 +++++++++++++++++++++++++++++++++++
 test/test-rename-hardlink.sh   |  14 ++++++
 test/test-renameat-hardlink.c  | 101 +++++++++++++++++++++++++++++++++++++++++
 test/test-renameat-hardlink.sh |  14 ++++++
 10 files changed, 348 insertions(+), 16 deletions(-)
 create mode 100755 test/test-mv-hardlink.sh
 create mode 100644 test/test-rename-hardlink.c
 create mode 100755 test/test-rename-hardlink.sh
 create mode 100644 test/test-renameat-hardlink.c
 create mode 100755 test/test-renameat-hardlink.sh
Signature · 1 line
1.8.3.1