Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
pub
frama-c
Commits
e36c92b4
Commit
e36c92b4
authored
7 months ago
by
Andre Maroneze
Browse files
Options
Downloads
Patches
Plain Diff
[tests] add test for #pragma pack with gcc
parent
e14c38aa
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/misc/dune
+6
-0
6 additions, 0 deletions
tests/misc/dune
tests/misc/pragma-pack-gcc.t
+11
-0
11 additions, 0 deletions
tests/misc/pragma-pack-gcc.t
with
17 additions
and
0 deletions
tests/misc/dune
+
6
−
0
View file @
e36c92b4
...
@@ -2,3 +2,9 @@
...
@@ -2,3 +2,9 @@
(applies_to user_directories.unix.t)
(applies_to user_directories.unix.t)
(enabled_if (and (= %{os_type} unix) (<> %{system} macos)))
(enabled_if (and (= %{os_type} unix) (<> %{system} macos)))
)
)
(cram
(applies_to pragma-pack-gcc)
(enabled_if %{bin-available:gcc})
(deps pragma-pack.c pragma-pack-utils.h)
)
This diff is collapsed.
Click to expand it.
tests/misc/pragma-pack-gcc.t
0 → 100644
+
11
−
0
View file @
e36c92b4
Testing
that
the
output
produced
by
Eva
and
the
execution
of
the
binary
compiled
by
GCC
are
identical
,
both
on
a
32
-
bit
machdep
and
on
a
64
-
bit
one
# Note: we cannot currently test this in Nix due to issues with multiStdenv
# $ frama-c pragma-pack.c -machdep gcc_x86_32 -eva -eva-msg-key=-summary | grep -A999 "eva:final-states" | grep -v "\[eva:final-states\]" | grep -v __retres > eva.res
# $ gcc -m32 pragma-pack.c -Wno-pragmas && ./a.out > gcc.res
# $ diff -B eva.res gcc.res # should be identical
$
frama
-
c
pragma
-
pack
.
c
-
machdep
gcc_x86_64
-
eva
-
eva
-
msg
-
key
=-
summary
|
grep
-
A999
"
eva:final-states
"
|
grep
-
v
"
\
[eva:final-states
\
]
"
|
grep
-
v
__retres
>
eva
.
res
$
gcc
pragma
-
pack
.
c
-
Wno
-
pragmas
&&
./
a
.
out
>
gcc
.
res
$
diff
-
B
eva
.
res
gcc
.
res
# should be identical
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