Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
dCache
cta
Commits
65e9334a
Commit
65e9334a
authored
4 years ago
by
Michael Davis
Browse files
Options
Downloads
Patches
Plain Diff
[ci] Adds test for zero-length files
parent
7591a2bc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
continuousintegration/orchestration/tests/simple_client_ar.sh
+26
-1
26 additions, 1 deletion
...inuousintegration/orchestration/tests/simple_client_ar.sh
with
26 additions
and
1 deletion
continuousintegration/orchestration/tests/simple_client_ar.sh
+
26
−
1
View file @
65e9334a
...
...
@@ -78,8 +78,33 @@ echo "********"
echo
"eos root://
${
EOSINSTANCE
}
rm /eos/ctaeos/cta/
${
TEST_FILE_NAME
}
"
eos root://
${
EOSINSTANCE
}
rm
/eos/ctaeos/cta/
${
TEST_FILE_NAME
}
#
# Check we can copy zero-length files into the namespace by touch and copy
#
echo
"eos root://
${
EOSINSTANCE
}
touch /eos/ctaeos/cta/
${
TEST_FILE_NAME
}
.touch"
eos root://
${
EOSINSTANCE
}
touch
/eos/ctaeos/cta/
${
TEST_FILE_NAME
}
.touch
echo
"eos root://
${
EOSINSTANCE
}
cp /eos/ctaeos/cta/
${
TEST_FILE_NAME
}
.touch /tmp/
${
TEST_FILE_NAME
}
.touch"
eos root://
${
EOSINSTANCE
}
cp
/eos/ctaeos/cta/
${
TEST_FILE_NAME
}
.touch /tmp/
${
TEST_FILE_NAME
}
.touch
echo
"eos root://
${
EOSINSTANCE
}
cp /tmp/
${
TEST_FILE_NAME
}
.touch /eos/ctaeos/cta/
${
TEST_FILE_NAME
}
.zero"
eos root://
${
EOSINSTANCE
}
cp
/tmp/
${
TEST_FILE_NAME
}
.touch /eos/ctaeos/cta/
${
TEST_FILE_NAME
}
.zero
echo
"eos root://
${
EOSINSTANCE
}
cp /eos/ctaeos/cta/
${
TEST_FILE_NAME
}
.zero /tmp/
${
TEST_FILE_NAME
}
.zero"
eos root://
${
EOSINSTANCE
}
cp
/eos/ctaeos/cta/
${
TEST_FILE_NAME
}
.zero /tmp/
${
TEST_FILE_NAME
}
.zero
if
[
-f
/tmp/
${
TEST_FILE_NAME
}
.touch
-a
!
-s
/tmp/
${
TEST_FILE_NAME
}
.touch
-a
-f
/tmp/
${
TEST_FILE_NAME
}
.zero
-a
!
-s
/tmp/
${
TEST_FILE_NAME
}
.zero
]
;
then
echo
"Zero-length file copy succeeded"
zeroLengthTests
=
1
else
echo
"Zero-length file copy failed"
zeroLengthTests
=
0
fi
# Clean up
echo
"eos root://
${
EOSINSTANCE
}
rm /eos/ctaeos/cta/
${
TEST_FILE_NAME
}
.touch /eos/ctaeos/cta/
${
TEST_FILE_NAME
}
.zero"
eos root://
${
EOSINSTANCE
}
rm
/eos/ctaeos/cta/
${
TEST_FILE_NAME
}
.touch /eos/ctaeos/cta/
${
TEST_FILE_NAME
}
.zero
rm
-f
/tmp/
${
TEST_FILE_NAME
}
.touch /tmp/
${
TEST_FILE_NAME
}
.zero
# Report results
msgNum
=
$(
grep
"
\"
File suc"
/mnt/logs/tpsrv
*
/taped/cta/cta-taped.log |
grep
${
TEST_FILE_NAME
}
|
tail
-n
4 |
wc
-l
)
if
[
$msgNum
=
=
"4"
]
;
then
if
[
"
$msgNum
"
=
"4"
-a
$zeroLengthTests
-eq
1
]
;
then
echo
"OK: all tests passed"
rc
=
0
else
...
...
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