Page MenuHomeFreeBSD

D39082.diff
No OneTemporary

D39082.diff

diff --git a/sys/fs/tarfs/tarfs_vfsops.c b/sys/fs/tarfs/tarfs_vfsops.c
--- a/sys/fs/tarfs/tarfs_vfsops.c
+++ b/sys/fs/tarfs/tarfs_vfsops.c
@@ -347,6 +347,11 @@
}
tnp = parent;
parent = tnp->parent;
+ cn.cn_nameptr = tnp->name;
+ cn.cn_namelen = tnp->namelen;
+ do_lookup = true;
+ TARFS_DPF(LOOKUP, "%s: back to %.*s/\n", __func__,
+ (int)tnp->namelen, tnp->name);
name += len;
namelen -= len;
continue;
diff --git a/tests/sys/fs/tarfs/mktar.c b/tests/sys/fs/tarfs/mktar.c
--- a/tests/sys/fs/tarfs/mktar.c
+++ b/tests/sys/fs/tarfs/mktar.c
@@ -41,7 +41,6 @@
#define PROGNAME "mktar"
#define SUBDIRNAME "directory"
-#define EMPTYDIRNAME "empty"
#define NORMALFILENAME "file"
#define SPARSEFILENAME "sparse_file"
#define HARDLINKNAME "hard_link"
@@ -128,11 +127,6 @@
if (mkdir(SUBDIRNAME, 0755) != 0)
err(1, "%s", SUBDIRNAME);
- /* create a second subdirectory which will remain empty */
- verbose("mkdir %s", EMPTYDIRNAME);
- if (mkdir(EMPTYDIRNAME, 0755) != 0)
- err(1, "%s", EMPTYDIRNAME);
-
/* create a normal file */
verbose("creating %s", NORMALFILENAME);
mknormalfile(NORMALFILENAME, 0644);
@@ -233,7 +227,7 @@
#if 0
"--options", "zstd:frame-per-file",
#endif
- "./" EMPTYDIRNAME "/../" NORMALFILENAME,
+ "./" SUBDIRNAME "/../" NORMALFILENAME,
"./" SPARSEFILENAME,
"./" HARDLINKNAME,
"./" SHORTLINKNAME,
@@ -262,8 +256,6 @@
(void)unlink(HARDLINKNAME);
verbose("rm %s", SPARSEFILENAME);
(void)unlink(SPARSEFILENAME);
- verbose("rmdir %s", EMPTYDIRNAME);
- (void)rmdir(EMPTYDIRNAME);
verbose("rmdir %s", SUBDIRNAME);
(void)rmdir(SUBDIRNAME);
verbose("cd -");
diff --git a/tests/sys/fs/tarfs/tarfs_test.sh b/tests/sys/fs/tarfs/tarfs_test.sh
--- a/tests/sys/fs/tarfs/tarfs_test.sh
+++ b/tests/sys/fs/tarfs/tarfs_test.sh
@@ -58,10 +58,14 @@
atf_check_equal "$(stat -f%d,%i "${mnt}"/sparse_file)" "$(stat -f%d,%i "${mnt}"/hard_link)"
atf_check_equal "$(stat -f%d,%i "${mnt}"/sparse_file)" "$(stat -L -f%d,%i "${mnt}"/short_link)"
atf_check_equal "$(stat -f%d,%i "${mnt}"/sparse_file)" "$(stat -L -f%d,%i "${mnt}"/long_link)"
- atf_check_equal "$(sha256 -q "${mnt}"/sparse_file)" ${sum}
- atf_check_equal "$(stat -f%p "${mnt}"/sparse_file)" 100644
- atf_check_equal "$(stat -f%l "${mnt}"/sparse_file)" 2
- atf_check_equal "$(stat -f%l "${mnt}"/hard_link)" 2
+ atf_check -o inline:"${sum}\n" sha256 -q "${mnt}"/sparse_file
+ atf_check -o inline:"2,40755\n" stat -f%l,%p "${mnt}"/directory
+ atf_check -o inline:"1,100644\n" stat -f%l,%p "${mnt}"/file
+ atf_check -o inline:"2,100644\n" stat -f%l,%p "${mnt}"/hard_link
+ atf_check -o inline:"1,120755\n" stat -f%l,%p "${mnt}"/long_link
+ atf_check -o inline:"1,120755\n" stat -f%l,%p "${mnt}"/short_link
+ atf_check -o inline:"2,100644\n" stat -f%l,%p "${mnt}"/sparse_file
+ atf_check -o inline:"3,40755\n" stat -f%l,%p "${mnt}"
}
tarfs_basic_cleanup() {
umount "${mnt}" || true

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 20, 5:39 AM (22 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14731418
Default Alt Text
D39082.diff (2 KB)

Event Timeline