Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
44d0035b
Commit
44d0035b
authored
Jun 09, 2020
by
Michael Davis
Browse files
[ci] Adds test for zero-length files
parent
df9ed8a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
continuousintegration/orchestration/tests/simple_client_ar.sh
View file @
44d0035b
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
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