Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
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
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
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
26f8de45
Commit
26f8de45
authored
17 years ago
by
Dan Fandrich
Browse files
Options
Downloads
Patches
Plain Diff
Made the directory postprocessor more forgiving of input directory format
parent
ceff98fd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/data/test613
+5
-5
5 additions, 5 deletions
tests/data/test613
tests/data/test614
+5
-5
5 additions, 5 deletions
tests/data/test614
tests/libtest/test613.pl
+18
-11
18 additions, 11 deletions
tests/libtest/test613.pl
with
28 additions
and
21 deletions
tests/data/test613
+
5
−
5
View file @
26f8de45
...
...
@@ -10,11 +10,11 @@ directory
# Server-side
<reply>
<datacheck>
d?????????
N
U
U
N ??? N NN:NN .
d?????????
N
U
U
N ??? N NN:NN ..
d?????????
N
U
U
N ??? N NN:NN asubdir
-rw?rw?rw?
1
U
U
37 Jan 1 2000 plainfile.txt
-r-?r-?r-?
1
U
U
47 Dec 31 2000 rofile.txt
d?????????
N U
U N ??? N NN:NN .
d?????????
N U
U N ??? N NN:NN ..
d?????????
N U
U N ??? N NN:NN asubdir
-rw?rw?rw?
1 U
U 37 Jan 1 2000 plainfile.txt
-r-?r-?r-?
1 U
U 47 Dec 31 2000 rofile.txt
</datacheck>
</reply>
...
...
This diff is collapsed.
Click to expand it.
tests/data/test614
+
5
−
5
View file @
26f8de45
...
...
@@ -11,11 +11,11 @@ directory
# Server-side
<reply>
<datacheck>
d?????????
N
U
U
N ??? N NN:NN .
d?????????
N
U
U
N ??? N NN:NN ..
d?????????
N
U
U
N ??? N NN:NN asubdir
-r-?r-?r-?
1
U
U
37 Jan 1 2000 plainfile.txt
-r-?r-?r-?
1
U
U
47 Dec 31 2000 rofile.txt
d?????????
N U
U N ??? N NN:NN .
d?????????
N U
U N ??? N NN:NN ..
d?????????
N U
U N ??? N NN:NN asubdir
-r-?r-?r-?
1 U
U 37 Jan 1 2000 plainfile.txt
-r-?r-?r-?
1 U
U 47 Dec 31 2000 rofile.txt
</datacheck>
</reply>
...
...
This diff is collapsed.
Click to expand it.
tests/libtest/test613.pl
+
18
−
11
View file @
26f8de45
...
...
@@ -58,27 +58,34 @@ elsif ($ARGV[0] eq "postprocess")
# Process the directory file to remove all information that
# could be inconsistent from one test run to the next (e.g.
# file date) or may be unsupported on some platforms (e.g.
# Windows). Also, since
>
7.1
6.4
, the sftp directory listing
# Windows). Also, since 7.1
7.0
, the sftp directory listing
# format can be dependent on the server (with a recent
# enough version of libssh2) so this script must also
# canonicalize the format.
Thes
e are
the two formats
#
currently
supported:
# -r--r--r--
1 ausername grp 47 Dec 31 2000 rofile.txt
# canonicalize the format.
Her
e are
examples of the general
#
format
supported:
# -r--r--r-- 1
2
ausername grp 47 Dec 31 2000 rofile.txt
# -r--r--r-- 1 1234 4321 47 Dec 31 2000 rofile.txt
# The "canonical" format is similar to the
second
(which is
# the one generated
with an older libssh2
):
# -r-?r-?r-? 1 U
U
47 Dec 31 2000 rofile.txt
# The "canonical" format is similar to the
first
(which is
# the one generated
on a typical Linux installation
):
# -r-?r-?r-? 1
2 U
U 47 Dec 31 2000 rofile.txt
my
$newfile
=
$logfile
.
"
.new
";
open
(
IN
,
"
<
$logfile
")
||
die
"
$!
";
open
(
OUT
,
"
>
$newfile
")
||
die
"
$!
";
while
(
<
IN
>
)
{
s
/^(.)(..).(..).(..).\s*(\
d
+)\s+\S+
\S?.{5}?(\s+\d)+(.{12}?)/\1\2?\3?\4? \5 U U\6\7
/
;
/^(.)(..).(..).(..).\s*(\
S
+)\s+\S+
\s+\S+\s+(\S+)\s+(\S+\s+\S+\s+\S+)(.*)$
/
;
if
(
$
1
eq
"
d
")
{
# Erase inodes, size, mode, time fields for directories
s/^.{14}?(.{12}?).{11}? ... .\d .\d:\d\d/d????????? N\1 N ??? N NN:NN/
;
# Erase all directory metadata except for the name, as it is not
# consistent for across all test systems and filesystems
print
OUT
"
d????????? N U U N ??? N NN:NN$8
\n
";
}
elsif
(
$
1
eq
"
-
")
{
# Erase user and group names, as they are not consistent across
# all test systems
printf
OUT
"
%s%s?%s?%s?%5d U U %15d %s%s
\n
",
$
1
,
$
2
,
$
3
,
$
4
,
$
5
,
$
6
,
$
7
,
$
8
;
}
else
{
# Unexpected format; just pass it through and let the test fail
print
OUT
$_
;
}
print
OUT
$_
;
}
close
(
OUT
);
...
...
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