Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
a2d3d2d3
Commit
a2d3d2d3
authored
Apr 12, 2016
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3738 from ethomson/test_as_root
tests: skip the unreadable file tests as root
parents
0e00eecf
bbd65ad2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
tests/iterator/workdir.c
+5
-0
tests/status/worktree.c
+3
-0
No files found.
tests/iterator/workdir.c
View file @
a2d3d2d3
...
...
@@ -673,6 +673,11 @@ void test_iterator_workdir__skips_unreadable_dirs(void)
if
(
!
cl_is_chmod_supported
())
return
;
#ifndef GIT_WIN32
if
(
geteuid
()
==
0
)
cl_skip
();
#endif
g_repo
=
cl_git_sandbox_init
(
"empty_standard_repo"
);
cl_must_pass
(
p_mkdir
(
"empty_standard_repo/r"
,
0777
));
...
...
tests/status/worktree.c
View file @
a2d3d2d3
...
...
@@ -1048,6 +1048,9 @@ void test_status_worktree__unreadable(void)
git_status_options
opts
=
GIT_STATUS_OPTIONS_INIT
;
status_entry_counts
counts
=
{
0
};
if
(
geteuid
()
==
0
)
cl_skip
();
/* Create directory with no read permission */
cl_git_pass
(
git_futils_mkdir_r
(
"empty_standard_repo/no_permission"
,
0777
));
cl_git_mkfile
(
"empty_standard_repo/no_permission/foo"
,
"dummy"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment