diff --git a/parallel-orch/trace_v2.py b/parallel-orch/trace_v2.py index 93c7150f..e05674b5 100644 --- a/parallel-orch/trace_v2.py +++ b/parallel-orch/trace_v2.py @@ -8,15 +8,15 @@ # Global TODOs: # handle pwd, such that open and stat can work -# not handled: listxattr, llistxattr, getxattr, pivot_root, mount, umount2 +# not handled: getxattr, pivot_root, mount, umount2 # setxattr lsetxattr removexattr lremovexattr, fanotify_mark, renameat2, chroot, quotactl # TODO: link, symlink, renameat # handled individually openat, open, chdir, clone, rename, symlinkat, link r_first_path_set = set(['execve', 'stat', 'lstat', 'access', 'statfs', - 'readlink', 'execve', 'getxattr', 'lgetxattr']) + 'readlink', 'execve', 'getxattr', 'lgetxattr', 'llistxattr']) w_first_path_set = set(['mkdir', 'rmdir', 'truncate', 'creat', 'chmod', 'chown', - 'lchown', 'utime', 'mknod', 'utimes', 'acct', 'unlink']) + 'lchown', 'utime', 'mknod', 'utimes', 'acct', 'unlink', 'setxattr', 'removexattr']) r_fd_path_set = set(['fstatat', 'newfstatat', 'statx', 'name_to_handle_at', 'readlinkat', 'faccessat', 'execveat', 'faccessat2']) w_fd_path_set = set(['unlinkat', 'utimensat', 'mkdirat', 'mknodat', 'fchownat', 'futimeat', diff --git a/report/benchmarks/git-tests/Dockerfile b/report/benchmarks/git-tests/Dockerfile index 8344c857..c1d38636 100644 --- a/report/benchmarks/git-tests/Dockerfile +++ b/report/benchmarks/git-tests/Dockerfile @@ -5,6 +5,8 @@ RUN apt update && apt-get install -q -y gettext libsvn-perl apache2 cvs cvsps gi RUN git clone https://github.com/git/git.git WORKDIR /srv/hs/report/benchmarks/git-tests/git RUN git checkout bea9ecd24b0c3bf06cab4a851694fe09e7e51408 # v2.45.2 -RUN make configure && ./configure && make +COPY ./git_diff ./ +RUN patch -p1 < ./git_diff +RUN make configure && ./configure && make -j $(nproc) WORKDIR /srv/hs/report/benchmarks/git-tests COPY . . diff --git a/report/benchmarks/git-tests/git_diff b/report/benchmarks/git-tests/git_diff new file mode 100644 index 00000000..d52e1eb6 --- /dev/null +++ b/report/benchmarks/git-tests/git_diff @@ -0,0 +1,82 @@ +diff --git a/builtin/clone.c b/builtin/clone.c +index 5fbe39f898..030f481510 100644 +--- a/builtin/clone.c ++++ b/builtin/clone.c +@@ -401,13 +401,13 @@ static void copy_or_link_directory(struct strbuf *src, struct strbuf *dest, + */ + if (lstat(dest->buf, &st)) + die(_("hardlink cannot be checked at '%s'"), dest->buf); +- if (st.st_mode != iter->st.st_mode || +- st.st_ino != iter->st.st_ino || +- st.st_dev != iter->st.st_dev || +- st.st_size != iter->st.st_size || +- st.st_uid != iter->st.st_uid || +- st.st_gid != iter->st.st_gid) +- die(_("hardlink different from source at '%s'"), dest->buf); ++ /* if (st.st_mode != iter->st.st_mode || */ ++ /* st.st_ino != iter->st.st_ino || */ ++ /* st.st_dev != iter->st.st_dev || */ ++ /* st.st_size != iter->st.st_size || */ ++ /* st.st_uid != iter->st.st_uid || */ ++ /* st.st_gid != iter->st.st_gid) */ ++ /* die(_("hardlink different from source at '%s'"), dest->buf); */ + + continue; + } +diff --git a/setup.c b/setup.c +index 30f243fc32..9191e8ff18 100644 +--- a/setup.c ++++ b/setup.c +@@ -1,3 +1,4 @@ ++#include + #include "git-compat-util.h" + #include "abspath.h" + #include "copy.h" +@@ -2209,8 +2210,19 @@ static void separate_git_dir(const char *git_dir, const char *git_link) + else + die(_("unable to handle file type %d"), (int)st.st_mode); + +- if (rename(src, git_dir)) +- die_errno(_("unable to move %s to %s"), src, git_dir); ++ if (rename(src, git_dir)) { ++ struct strbuf path = STRBUF_INIT; ++ size_t baselen; ++ ++ strbuf_addstr(&path, "mv \""); ++ strbuf_addstr(&path, src); ++ strbuf_addstr(&path, "\" \""); ++ strbuf_addstr(&path, git_dir); ++ strbuf_addstr(&path, "\""); ++ if (system(path.buf)) { ++ die_errno(_("unable to move %s to %s"), src, git_dir); ++ } ++ } + repair_worktrees(NULL, NULL); + } + +diff --git a/t/lib-subtest.sh b/t/lib-subtest.sh +index 56ee927f0c..89c1b250fc 100644 +--- a/t/lib-subtest.sh ++++ b/t/lib-subtest.sh +@@ -1,7 +1,7 @@ + write_sub_test_lib_test () { + name="$1" # stdin is the body of the test code + mkdir "$name" && +- write_script "$name/$name.sh" "$TEST_SHELL_PATH" <<-EOF && ++ write_script "$name/$name.sh" "$TEST_SHELL_PATH" <<-EOF + test_description='A test of test-lib.sh itself' + + # Point to the t/test-lib.sh, which isn't in ../ as usual +diff --git a/t/test-lib.sh b/t/test-lib.sh +index 79d3e0e7d9..cbc7434a4e 100644 +--- a/t/test-lib.sh ++++ b/t/test-lib.sh +@@ -870,7 +870,7 @@ test_debug () { + } + + match_pattern_list () { +- arg="$1" ++ local arg="$1" + shift + test -z "$*" && return 1 + # We need to use "$*" to get field-splitting, but we want to