Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Assignment Mini Libc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Operating Systems
Assignment Mini Libc
Commits
567bd2e4
Commit
567bd2e4
authored
2 years ago
by
Razvan Deaconescu
Browse files
Options
Downloads
Patches
Plain Diff
tests: Remove tests making use of root user
Signed-off-by:
Razvan Deaconescu
<
razvan.deaconescu@upb.ro
>
parent
5a1879fb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#10143
passed
2 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_io.c
+16
-36
16 additions, 36 deletions
tests/test_io.c
with
16 additions
and
36 deletions
tests/test_io.c
+
16
−
36
View file @
567bd2e4
...
...
@@ -24,15 +24,6 @@ static int test_open_non_existent_file(void)
return
fd
==
-
1
&&
errno
==
ENOENT
;
}
static
int
test_open_invalid_access_mode
(
void
)
{
int
fd
;
fd
=
open
(
RDONLY_FILE
,
O_WRONLY
);
return
fd
==
-
1
&&
errno
==
EACCES
;
}
static
int
test_open_file_as_directory
(
void
)
{
int
fd
;
...
...
@@ -240,15 +231,6 @@ static int test_lseek_combined(void)
return
r
==
400
;
}
static
int
test_truncate_read_only_file
(
void
)
{
int
r
;
r
=
truncate
(
RDONLY_FILE
,
10
);
return
r
==
-
1
&&
errno
==
EACCES
;
}
static
int
test_truncate_invalid_size
(
void
)
{
int
r
;
...
...
@@ -411,24 +393,22 @@ static int test_fstat_regular_file(void)
}
static
struct
graded_test
io_tests
[]
=
{
{
test_open_non_existent_file
,
"test_open_non_existent_file"
,
8
},
{
test_open_invalid_access_mode
,
"test_open_invalid_access_mode"
,
8
},
{
test_open_file_as_directory
,
"test_open_file_as_directory"
,
8
},
{
test_open_directory_for_writing
,
"test_open_directory_for_writing"
,
8
},
{
test_open_force_invalid_creation
,
"test_open_force_invalid_creation"
,
8
},
{
test_open_close_existent_file
,
"test_open_close_existent_file"
,
8
},
{
test_open_close_create_file
,
"test_open_close_create_file"
,
8
},
{
test_open_read_write_only_mode
,
"test_open_read_write_only_mode"
,
8
},
{
test_open_write_read_only_mode
,
"test_open_write_read_only_mode"
,
8
},
{
test_lseek_invalid_fd
,
"test_lseek_invalid_fd"
,
8
},
{
test_lseek_invalid_whence
,
"test_lseek_invalid_whence"
,
8
},
{
test_lseek_invalid_offset
,
"test_lseek_invalid_offset"
,
8
},
{
test_lseek_set
,
"test_lseek_set"
,
8
},
{
test_lseek_cur
,
"test_lseek_cur"
,
8
},
{
test_lseek_end
,
"test_lseek_end"
,
8
},
{
test_lseek_combined
,
"test_lseek_combined"
,
8
},
{
test_truncate_read_only_file
,
"test_truncate_read_only_file"
,
8
},
{
test_truncate_invalid_size
,
"test_truncate_invalid_size"
,
8
},
{
test_open_non_existent_file
,
"test_open_non_existent_file"
,
9
},
{
test_open_file_as_directory
,
"test_open_file_as_directory"
,
9
},
{
test_open_directory_for_writing
,
"test_open_directory_for_writing"
,
9
},
{
test_open_force_invalid_creation
,
"test_open_force_invalid_creation"
,
9
},
{
test_open_close_existent_file
,
"test_open_close_existent_file"
,
9
},
{
test_open_close_create_file
,
"test_open_close_create_file"
,
9
},
{
test_open_read_write_only_mode
,
"test_open_read_write_only_mode"
,
9
},
{
test_open_write_read_only_mode
,
"test_open_write_read_only_mode"
,
9
},
{
test_lseek_invalid_fd
,
"test_lseek_invalid_fd"
,
9
},
{
test_lseek_invalid_whence
,
"test_lseek_invalid_whence"
,
9
},
{
test_lseek_invalid_offset
,
"test_lseek_invalid_offset"
,
9
},
{
test_lseek_set
,
"test_lseek_set"
,
9
},
{
test_lseek_cur
,
"test_lseek_cur"
,
9
},
{
test_lseek_end
,
"test_lseek_end"
,
9
},
{
test_lseek_combined
,
"test_lseek_combined"
,
9
},
{
test_truncate_invalid_size
,
"test_truncate_invalid_size"
,
9
},
{
test_truncate_directory
,
"test_truncate_directory"
,
8
},
{
test_truncate_non_existent_file
,
"test_truncate_non_existent_file"
,
8
},
{
test_truncate_file
,
"test_truncate_file"
,
8
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment