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
steam
syscall-intercept
Commits
42435a94
Commit
42435a94
authored
Aug 17, 2018
by
Arnaud Rebillout
Browse files
Merge branch 'upstream/latest' into wip/arebillout/master
parents
5fd89123
acd25281
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/syscall_formats.c
View file @
42435a94
...
...
@@ -418,9 +418,11 @@ is_fcntl_with_flock(const struct syscall_desc *desc)
case
F_GETLK
:
case
F_SETLK
:
case
F_SETLKW
:
#ifdef F_OFD_GETLK
case
F_OFD_GETLK
:
case
F_OFD_SETLK
:
case
F_OFD_SETLKW
:
#endif
return
true
;
default:
return
false
;
...
...
test/CMakeLists.txt
View file @
42435a94
...
...
@@ -329,6 +329,6 @@ add_test(NAME "syscall_format_logging"
-DTEST_EXTRA_PRELOAD=
${
TEST_EXTRA_PRELOAD
}
-DTEST_PROG=$<TARGET_FILE:syscall_format>
-DLIB_FILE=
-DMATCH_FILE=
${
CMAKE_CURRENT_SOURCE_DIR
}
/
libcintercept3
.log.match
-DMATCH_FILE=
${
CMAKE_CURRENT_SOURCE_DIR
}
/
syscall_format
.log.match
-DTEST_NAME=syscall_format_logging
${
CHECK_LOG_COMMON_ARGS
}
)
test/syscall_format.c
View file @
42435a94
/*
* Copyright 2017, Intel Corporation
* Copyright 2017
-2018
, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
...
...
@@ -361,7 +361,9 @@ main(int argc, char **argv)
madvise
(
p1
,
1234
,
MADV_DONTNEED
);
madvise
(
NULL
,
0
,
MADV_SEQUENTIAL
);
mlock
(
p0
,
0x3000
);
#ifdef SYS_mlock2
syscall
(
SYS_mlock2
,
p0
,
0x3000
,
0
);
#endif
munlock
(
p0
,
0x3000
);
mlockall
(
MCL_CURRENT
);
mlockall
(
MCL_FUTURE
);
...
...
@@ -467,7 +469,7 @@ main(int argc, char **argv)
syscall
(
SYS_getdents64
,
4
,
p0
,
1
);
setup_buffers
();
getcwd
(
buffer
[
0
],
9
);
syscall
(
SYS_
getcwd
,
buffer
[
0
],
9
);
chdir
(
input
[
0
]);
fchdir
(
6
);
...
...
@@ -712,7 +714,9 @@ main(int argc, char **argv)
syscall
(
SYS_mq_getsetattr
,
1
,
p0
,
p1
);
syscall
(
SYS_kexec_load
,
1
,
2
,
p0
,
KEXEC_PRESERVE_CONTEXT
);
#ifdef SYS_kexec_file_load
syscall
(
SYS_kexec_file_load
,
1
,
2
,
3
,
input
[
0
],
KEXEC_PRESERVE_CONTEXT
);
#endif
syscall
(
SYS_waitid
,
1
,
2
,
p0
,
4
,
p1
);
...
...
test/
libcintercept3
.log.match
→
test/
syscall_format
.log.match
View file @
42435a94
...
...
@@ -170,8 +170,8 @@ $(S) $(XX) -- madvise((null), 0, 2) = ?
$(S) $(XX) -- madvise((null), 0, 2) = 22
$(S) $(XX) -- mlock(0x123000, 0x3000) = ?
$(S) $(XX) -- mlock(0x123000, 0x3000) = 22
$(S) $(XX) -- mlock2(0x123000, 0x3000, 0x0) = ?
$(S) $(XX) -- mlock2(0x123000, 0x3000, 0x0) = 22
$(OPT)
$(S) $(XX) -- mlock2(0x123000, 0x3000, 0x0) = ?
$(OPT)
$(S) $(XX) -- mlock2(0x123000, 0x3000, 0x0) = 22
$(S) $(XX) -- munlock(0x123000, 0x3000) = ?
$(S) $(XX) -- munlock(0x123000, 0x3000) = 22
$(S) $(XX) -- mlockall(0x1) = ?
...
...
@@ -696,8 +696,8 @@ $(S) $(XX) -- mq_getsetattr(0x1, 0x123000, 0x234000) = ?
$(S) $(XX) -- mq_getsetattr(0x1, 0x123000, 0x234000) = 22
$(S) $(XX) -- kexec_load(0x1, 0x2, 0x123000, 0x2) = ?
$(S) $(XX) -- kexec_load(0x1, 0x2, 0x123000, 0x2) = 22
$(S) $(XX) -- kexec_file_load(0x1, 0x2, 0x3, $(XX), 0x2) = ?
$(S) $(XX) -- kexec_file_load(0x1, 0x2, 0x3, $(XX), 0x2) = 22
$(OPT)
$(S) $(XX) -- kexec_file_load(0x1, 0x2, 0x3, $(XX), 0x2) = ?
$(OPT)
$(S) $(XX) -- kexec_file_load(0x1, 0x2, 0x3, $(XX), 0x2) = 22
$(S) $(XX) -- waitid(0x1, 0x2, 0x123000, 0x4) = ?
$(S) $(XX) -- waitid(0x1, 0x2, 0x123000, 0x4) = 22
$(S) $(XX) -- add_key(0x123000, 0x234000, 0x123000, 0x234000, 0x1) = ?
...
...
utils/docker/0001-travis-fix-travisci_build_coverity_scan.sh.patch
0 → 100644
View file @
42435a94
From b5179dc4822eaab192361da05aa95d98f523960f Mon Sep 17 00:00:00 2001
From: Lukasz Dorau <lukasz.dorau@intel.com>
Date: Mon, 7 May 2018 12:05:40 +0200
Subject: [PATCH] travis: fix travisci_build_coverity_scan.sh
---
travisci_build_coverity_scan.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/travisci_build_coverity_scan.sh b/travisci_build_coverity_scan.sh
index ad9d4afcf..562b08bcc 100644
--- a/travisci_build_coverity_scan.sh
+++ b/travisci_build_coverity_scan.sh
@@ -92,8 +92,8 @@
response=$(curl \
--form description="Travis CI build" \
$UPLOAD_URL)
status_code=$(echo "$response" | sed -n '$p')
-if [ "$status_code" != "201" ]; then
+if [ "$status_code" != "200" ]; then
TEXT=$(echo "$response" | sed '$d')
- echo -e "\033[33;1mCoverity Scan upload failed: $TEXT.\033[0m"
+ echo -e "\033[33;1mCoverity Scan upload failed: $response.\033[0m"
exit 1
fi
--
2.13.6
utils/docker/run-coverity.sh
View file @
42435a94
...
...
@@ -47,4 +47,20 @@ export COVERITY_SCAN_PROJECT_NAME="${PROJECT}"
export
COVERITY_SCAN_BUILD_COMMAND
=
"make"
# Run the Coverity scan
curl
-s
https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh | bash
# XXX: Patch the Coverity script.
# Recently, this script regularly exits with an error, even though
# the build is successfully submitted. Probably because the status code
# is missing in response, or it's not 201.
# Changes:
# 1) change the expected status code to 200 and
# 2) print the full response string.
#
# This change should be reverted when the Coverity script is fixed.
#
# The previous version was:
# curl -s https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh | bash
wget https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh
patch < ../utils/docker/0001-travis-fix-travisci_build_coverity_scan.sh.patch
bash ./travisci_build_coverity_scan.sh
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