|
3c12187d
|
2018-07-27T23:00:09
|
|
Barebones JUnit XML output
(cherry picked from commit 59f1e477f772c73c76bc654a0853fdcf491a32a7)
|
|
a503a9ea
|
2018-07-26T23:02:34
|
|
Documentation
(cherry picked from commit 3a9b96311d6f0ff364c6417cf3aab7c9745b18d4)
|
|
ad3a0f0c
|
2018-08-26T15:11:21
|
|
clar: refactor explicitly run test behavior
Previously, supplying `-s` to explicitly enable some test(s) would run
the tests immediately from the argument parser. This forces us to set
up the entire clar environment (for example: sandboxing) before argument
parsing takes place.
Refactor the behavior of `-s` to add the explicitly chosen tests to a
list that is executed later. This untangles the argument parsing from
the setup lifecycle, allowing us to use the arguments to perform the
setup.
(cherry picked from commit 90753a96515f85e2d0e79a16d3a06ba5b363c68e)
|
|
e36455c8
|
2018-09-03T19:27:30
|
|
README: remove travis
(cherry picked from commit 76cfeb20fc75f02eee8e1b672889039be282666f)
|
|
d8fd1c72
|
2018-07-26T23:02:20
|
|
Isolate test reports
This makes it possible to keep track of every test status (even
successful ones), and their errors, if any.
(cherry picked from commit bf9fc126709af948c2a324ceb1b2696046c91cfe)
|
|
dfbf791d
|
2018-08-30T21:53:58
|
|
ci: remove travis
(cherry picked from commit 6fc946e87025f22315c481509b6658726725b7a4)
|
|
2d72495b
|
2018-10-12T12:08:00
|
|
Update .vsts-ci.yml
(cherry picked from commit 7238a1e8c7e6b48439ce553c99b83915cb33b394)
|
|
cf20bb01
|
2018-08-31T14:07:59
|
|
Update .vsts-nightly.yml
(cherry picked from commit 40c3a974656a3a9bb0b63e0bb0eb770bb1648303)
|
|
892be4c4
|
2018-07-29T17:26:44
|
|
ci: run coverity from a nightly VSTS build
(cherry picked from commit d076db11a84b278e260139269c25fe692930f238)
|
|
15256b7b
|
2018-07-28T22:29:53
|
|
ci: run coverity from travis's cron
Instead of trying to run coverity builds during the regular PR process,
run them during a regularly scheduled cron process. These only need to
run nightly, so it makes sense to bring them out of the PR process.
(cherry picked from commit 6b92368c859d0bf0dcdb15ca8bee520e0f4e84f2)
|
|
778d5f0a
|
2018-08-14T21:26:14
|
|
ci: Correct the status code check so Coverity doesn't force-fail Travis
Otherwise you get something like
Emitted 525 C/C++ compilation units (100%) successfully
525 C/C++ compilation units (100%) are ready for analysis
The cov-build utility completed successfully.
Build successfully submitted.
Received error code 200 from Coverity
travis_time:end:14cf6373:start=1534254309066933889,finish=1534254728190974302,duration=419124040413
The command "if [ -n "$COVERITY" ]; then ../ci/coverity.sh; fi" exited with 1.
travis_time:start:01ed61d4
$ if [ -z "$COVERITY" ]; then ../ci/build.sh && ../ci/test.sh; fi
travis_time:end:01ed61d4:start=1534254728197560961,finish=1534254728202711214,duration=5150253
The command "if [ -z "$COVERITY" ]; then ../ci/build.sh && ../ci/test.sh; fi" exited with 0.
Done. Your build exited with 1.
(cherry picked from commit 351ca66126b08530d96556eb4521b601c69125e3)
|
|
a5604c6f
|
2018-10-19T13:47:12
|
|
ci: remove unused old ci scripts
(cherry picked from commit 24d175621b7ca6a218c7150ac47ea296f0766fa4)
|
|
bdafcaf1
|
2018-07-27T12:31:32
|
|
ci: move travis to the new scripts
(cherry picked from commit 24b8dd8275adb13acc68281c200623f636690666)
|
|
72b38a34
|
2018-08-09T09:39:39
|
|
readme: remove appveyor build badge
(cherry picked from commit 658b8e8a59341a7042a839d0417723d494d7b4cb)
|
|
60f5d780
|
2018-07-26T15:14:37
|
|
ci: move appveyor to new scripts
(cherry picked from commit 465f8b5163cdee708a6ee81a7c210b2a8baedde4)
|
|
2d22fffc
|
2018-07-26T15:06:01
|
|
ci: use a single setup script for mingw
(cherry picked from commit f7bb4ff80bfa5e5173232685b13f143b572f36de)
|
|
c4dce7b1
|
2018-08-06T16:33:15
|
|
ci: remove appveyor
(cherry picked from commit 3ce31df3ff34b494a67f7d18dced9930c69883bd)
|
|
a9d1f737
|
2018-10-12T12:07:48
|
|
ci: use docker containers from libgit2 account
(cherry picked from commit 6fb63c9285b79bc2c6b67845273abdc7eaacaa1c)
|
|
e0ce3d9d
|
2018-10-12T12:07:30
|
|
ci: perform clang builds on Linux
(cherry picked from commit dc6e80e2ce7c4d1017ce41a67a0df50b29b36cc4)
|
|
445fd846
|
2018-08-02T14:57:54
|
|
ci: add VSTS build badge to README
(cherry picked from commit a1ae41b80b56cd49ecec049b7d2509f17596e116)
|
|
d92cff19
|
2018-07-25T01:04:55
|
|
ci: dissociate test from leaks process
The leaks process is not good about handling children. Ensure that its
child is `nohup`ed so that the grandparent shell won't wait for it to
exit.
(cherry picked from commit 6eb97b6ba93019741e7cf6147f0fab05dd3f831d)
|
|
eee66c03
|
2018-07-21T10:49:23
|
|
ci: some additional debugging
(cherry picked from commit 230eeda8e464a4675e82007d0c505617a6c243ed)
|
|
9c4a467d
|
2018-08-06T07:13:56
|
|
travis: do not execute Coverity analysis for all cron jobs
The new Travis cron job gets executed daily, but our current
configuration will cause each job to execute our Coverity script instead
of the default build and testing scripts. This cannot work, as Coverity
is heavily rate-limiting its API, so our cron builds are doomed to
always fail. What we want to do instead is execute our normal builds,
but add an additional Coverity jobs.
This can easily be done by adding another Coverity-specific job with a
conditional "type = cron", which sets the "COVERITY" environment
variable. Instead of checking the build type, we then simply check
whether "COVERITY" is set or not.
(cherry picked from commit 0a6c13a239ef5e1427d8317b36c202ca9a580754)
|
|
1ef99442
|
2018-07-20T19:47:40
|
|
ci: enable leak checking on osx
(cherry picked from commit b00672b9e404adb771601408d4b02711085d6f90)
|
|
0f09c492
|
2018-08-02T20:43:21
|
|
ci: run VSTS builds on master and maint branches
(cherry picked from commit cd7883145f76a24db47dfd911cc8b0b387813c7c)
|
|
d2f4546e
|
2018-08-02T14:47:03
|
|
ci: set PKG_CONFIG_PATH on travis
Homebrew's formula for openssl is "keg-only", which means it does not
install it into /usr/local. On macOS builds, we need to set
PKG_CONFIG_PATH to include it.
(cherry picked from commit abf5336304ad7df85bbca2289a61b7799029fa1b)
|
|
a64ce2da
|
2018-07-14T13:03:16
|
|
ci: scripts to setup mingw build environment
(cherry picked from commit 9e588060d93da064ca288db021def3d81fa13790)
|
|
6b5881bb
|
2018-07-14T12:35:02
|
|
ci: set up a macos host
Script to set up dependencies on a macOS build system.
(cherry picked from commit 8734240417a02930593e3a76b56ce6b51441723c)
|
|
e0ad1614
|
2018-07-14T12:34:05
|
|
ci: setup a linux host
Sets up a linux host to prepare for a build.
(cherry picked from commit 5bb2087b7c60da5c2ce50b9eefeebfbe255c9a0d)
|
|
b0063798
|
2018-07-14T12:25:32
|
|
ci: improved flexibility for citest.sh
Refactor citest.sh to enable local testing by developers.
(cherry picked from commit 451b001725e4a97f0a9f1ff1d87a2bf5666850a3)
|
|
fb578b03
|
2018-07-14T12:24:40
|
|
ci: refactor unix ci build/test scripts
(cherry picked from commit bf418f09ce20f9e70c416288798bd7054a5e28d0)
|
|
ce3dd8fc
|
2018-07-14T12:22:47
|
|
ci: move tests into citest.ps1
Add citest.ps1 PowerShell script to run the tests.
(cherry picked from commit e2cc5b6d9739591703cfb7f04efa84425ed63332)
|
|
faeb081c
|
2018-07-14T12:22:16
|
|
ci: Windows PowerShell build script
(cherry picked from commit 3b6281fac165bd910abe7e961e5e65168723a187)
|
|
91cbbf8d
|
2018-07-20T18:09:38
|
|
ci: msvc leak-checking
(cherry picked from commit afecd15cf6de53b8a0d28061fd9ffaeac358b91f)
|
|
f6592638
|
2018-07-20T17:20:15
|
|
ci: xcode leaks leak-checking
(cherry picked from commit 7f12c12394ce3f5b76a32a312461e95fe9e78ce7)
|
|
69e86433
|
2018-07-20T14:14:16
|
|
buf tests: allocate a smaller size for the oom
On Linux (where we run valgrind) allocate a smaller buffer, but still an
insanely large size. This will cause malloc to fail but will not cause
valgrind to report a likely error with a negative-sized malloc.
Keep the original buffer size on non-Linux platforms: this is
well-tested on them and changing it may be problematic. On macOS, for
example, using the new size causes `malloc` to print a warning to
stderr.
(cherry picked from commit 219512e7989340d9efae8480fb79c08b91724014)
|
|
586da0db
|
2018-10-12T12:07:09
|
|
ci: valgrind leak-checking
(cherry picked from commit 6d6700d23860d21e8e5043e5c7689a6ed4d8fc70)
|
|
bfb2d790
|
2018-07-14T12:42:50
|
|
ci: introduce vsts builds
(cherry picked from commit 67f5304f552a287dd46951b8ef96695f080c5ff2)
|
|
5c4b7472
|
2018-10-26T13:49:48
|
|
tests: simplify cmake test configuration
Simplify the names for the tests, removing the unnecessary
"libgit2-clar" prefix. Make "all" the new default test run, and include
the online tests by default (since HTTPS should always be enabled).
For the CI tests, create an offline-only test, then the various online
tests.
(cherry picked from commit ce798b256b071f57bfd62664626c10339b3e36f7)
|
|
590d46d6
|
2018-04-20T23:11:28
|
|
scripts: remove extraneous semicolons
(cherry picked from commit 149790b96eda8a1e48408decf92ba327479c2c33)
|
|
84656a18
|
2018-04-20T23:11:27
|
|
scripts: use leaks on macOS
(cherry picked from commit 4c969618f6ec6caa8facd199c3a6de0e6b06396f)
|
|
1ef18957
|
2018-04-20T23:11:25
|
|
valgrind: bump num-callers to 50 for fuller stack traces
(cherry picked from commit 0fb8c1d09ca55751aec5f42bae9a3bc19da3248d)
|
|
4e7bff0d
|
2018-04-20T23:11:23
|
|
travis: let cmake perform the build & install step
The goal is to let cmake manage the parallelism
(cherry picked from commit 1f4ada2a428c8d4af3cc0f12086700cda6e19e3a)
|
|
6b63e4bf
|
2018-04-20T23:11:22
|
|
valgrind: silence invalid free in libc atexit handler
==17851== Invalid free() / delete / delete[] / realloc()
==17851== at 0x4C2BDEC: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==17851== by 0x60BBE2B: __libc_freeres (in /lib/x86_64-linux-gnu/libc-2.19.so)
==17851== by 0x4A256BC: _vgnU_freeres (in /usr/lib/valgrind/vgpreload_core-amd64-linux.so)
==17851== by 0x5F8F16A: __run_exit_handlers (exit.c:97)
==17851== by 0x5F8F1F4: exit (exit.c:104)
==17851== by 0x5F74F4B: (below main) (libc-start.c:321)
==17851== Address 0x63153c0 is 0 bytes inside data symbol "noai6ai_cached"
(cherry picked from commit 234443e38be92ce14cff8574050f4714485a0102)
|
|
70df0721
|
2018-04-20T23:11:20
|
|
valgrind: silence libssh2 leaking something from gcrypt
==2957== 912 bytes in 19 blocks are still reachable in loss record 323 of 369
==2957== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==2957== by 0x675B120: ??? (in /lib/x86_64-linux-gnu/libgcrypt.so.11.8.2)
==2957== by 0x675BDF8: ??? (in /lib/x86_64-linux-gnu/libgcrypt.so.11.8.2)
==2957== by 0x675FE0D: ??? (in /lib/x86_64-linux-gnu/libgcrypt.so.11.8.2)
==2957== by 0x6761DC4: ??? (in /lib/x86_64-linux-gnu/libgcrypt.so.11.8.2)
==2957== by 0x676477E: ??? (in /lib/x86_64-linux-gnu/libgcrypt.so.11.8.2)
==2957== by 0x675B071: ??? (in /lib/x86_64-linux-gnu/libgcrypt.so.11.8.2)
==2957== by 0x675B544: ??? (in /lib/x86_64-linux-gnu/libgcrypt.so.11.8.2)
==2957== by 0x675914B: gcry_control (in /lib/x86_64-linux-gnu/libgcrypt.so.11.8.2)
==2957== by 0x5D30EC9: libssh2_init (in /usr/lib/x86_64-linux-gnu/libssh2.so.1.0.1)
==2957== by 0x66BCCD: git_transport_ssh_global_init (ssh.c:910)
==2957== by 0x616443: init_common (global.c:65)
(cherry picked from commit dd75885ab45a590ff20404a3a0f20a1148cd4f64)
|
|
16a2fc53
|
2018-04-20T23:11:19
|
|
valgrind: skip buf::oom test
(cherry picked from commit 573c408921e02f61501b2982fc10af77a8412631)
|
|
727183c7
|
2018-04-20T23:11:17
|
|
valgrind: silence curl_global_init leaks
==18109== 664 bytes in 1 blocks are still reachable in loss record 279 of 339
==18109== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==18109== by 0x675B120: ??? (in /lib/x86_64-linux-gnu/libgcrypt.so.11.8.2)
==18109== by 0x675C13C: ??? (in /lib/x86_64-linux-gnu/libgcrypt.so.11.8.2)
==18109== by 0x675C296: ??? (in /lib/x86_64-linux-gnu/libgcrypt.so.11.8.2)
==18109== by 0x679BD14: ??? (in /lib/x86_64-linux-gnu/libgcrypt.so.11.8.2)
==18109== by 0x679CC64: ??? (in /lib/x86_64-linux-gnu/libgcrypt.so.11.8.2)
==18109== by 0x6A64946: ??? (in /usr/lib/x86_64-linux-gnu/libgnutls.so.26.22.6)
==18109== by 0x6A116E8: ??? (in /usr/lib/x86_64-linux-gnu/libgnutls.so.26.22.6)
==18109== by 0x6A01114: gnutls_global_init (in /usr/lib/x86_64-linux-gnu/libgnutls.so.26.22.6)
==18109== by 0x52A6C78: ??? (in /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.3.0)
==18109== by 0x5285ADC: curl_global_init (in /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.3.0)
==18109== by 0x663524: git_curl_stream_global_init (curl.c:44)
(cherry picked from commit c0c9e9eeee5b4577eb930f56b8ddaf788f809067)
|
|
243ee6c6
|
2018-04-20T23:11:16
|
|
travis: split valgrind check in its own script
(cherry picked from commit 74b0a4320726cb557bcf73f47ba25ee10c430066)
|
|
e42f8f73
|
2018-04-20T23:11:14
|
|
travis: split testing from building
(cherry picked from commit 2f4e7cb0e8c21cc2d673946eddf9278c2863427b)
|
|
e5278f70
|
2017-11-11T15:38:27
|
|
clar: verify command line arguments before execute
When executing `libgit2_clar -smerge -invalid_option`, it will first execute
the merge test suite and afterwards output help because of the invalid option.
With this changa, it verifies all options before execute. If there are any
invalid options, it will output help and exit without actually executing
the test suites.
(cherry picked from commit 3275863134122892e2f8a8aa4ad0ce1c123a48ec)
|
|
306ffba3
|
2018-04-03T12:31:35
|
|
appveyor: fix typo in registry key to disable DHE
Commit 723e1e976 (appveyor: disable DHE to avoid spurious failures,
2018-03-29) added a workaround to fix spurious test failures due to a
bug in Windows' SChannel implementation. The workaround only worked by
accident, though, as the registry key was in fact mistyped. Fix the
typo.
(cherry picked from commit 3a72b0e2569c03ed0bd7ca63572eaf6384a2c81f)
|
|
cd14fca1
|
2018-03-29T13:35:27
|
|
appveyor: disable DHE to avoid spurious failures
Our CI builds have intermittent failures in our online tests, e.g. with
the message "A provided buffer was too small". This is not a programming
error in libgit2 but rather an error in the SChannel component of
Windows. Under certain circumstances involving Diffie-Hellman key
exchange, SChannel is unable to correctly handle input from the server.
This bug has already been fixed in recent patches for Windows 10 and
Windows Server 2016, but they are not yet available for AppVeyor.
Manually pamper over that issue by disabling all ciphersuites using DHE
via the registry. While this disables more ciphers than necessary, we
really don't care for that at all but just want to avoid build failures
due to that bug.
See [1], [2] or [3] for additional information.
1: https://github.com/aws/aws-sdk-cpp/issues/671
2: https://github.com/dotnet/corefx/issues/7812
3: https://support.microsoft.com/en-us/help/2992611/ms14-066-vulnerability-in-schannel-could-allow-remote-code-execution-n
(cherry picked from commit 723e1e976d4a038d89940ecbcfb7ff685d204859)
|
|
1a62e303
|
2017-09-15T11:32:46
|
|
appveyor: add jobs to also build on Visual Studio 2015
In order to cover a wider range of build environments, add two more jobs
which build and test libgit2 on Visual Studio 14 2015.
(cherry picked from commit 03a95bc5f6418ffd0ebb7f904281935e856a1800)
|
|
3dd462fd
|
2017-09-15T10:01:36
|
|
appveyor: explicitly specify build images
AppVeyor currently does provide three standard build worker images with
VS2013, VS2015 and VS2017. Right now, we are using the implicitly, which
is the VS2015 one. We want to be more explicit about this, so that we
can easily switch build images based on the job. So starting from this
commit, we explicitly set the `APPVEYOR_BUILD_WORKER_IMAGE` variable per
job, which enables us to choose different images.
To be able to test a wider range of build configurations, this commit
also switches the jobs for VC2010 over to use the older, VS2013 based
images. As the next commit will introduce two new jobs for building with
VS2015, we have then covered both build environments.
Also, let us be a bit more explicit regarding the CMake generator.
Instead of only saying "Visual Studio 10", use the more descriptive
value "Visual Studio 10 2010" to at least avoid some confusion
surrounding the versioning scheme of Visual Studio.
(cherry picked from commit e1076dbfd84218af7870a8f527c37695918b5cde)
|
|
637412cc
|
2017-11-20T13:26:33
|
|
tests: create new test target for all SSH-based tests
Some tests shall be run against our own SSH server we spin up in Travis.
As those need to be run separate from our previous tests which run
against git-daemon, we have to do this in a separate step. Instead of
bundling all that knowledge in the CI script, move it into the test
build instructions by creating a new test target.
(cherry picked from commit 5874e151d7b10de84fc1ca168339fdc622292219)
|
|
2362ce6c
|
2017-06-07T13:06:53
|
|
tests: online::clone: inline creds-test with nonexistent URL
Right now, we test our credential callback code twice, once via SSH on
localhost and once via a non-existent GitHub repository. While the first
URL makes sense to be configurable, it does not make sense to hard-code
the non-existing repository, which requires us to call tests multiple
times. Instead, we can just inline the URL into another set of tests.
(cherry picked from commit 54a1bf057a1123cf55ac3447c79761c817382f47)
|
|
a1a495f2
|
2017-06-07T12:48:48
|
|
tests: online::clone: construct credential-URL from environment
We support two types of passing credentials to the proxy, either via the
URL or explicitly by specifying user and password. We test these types
by modifying the proxy URL and executing the tests twice, which is
in fact unnecessary and requires us to maintain the list of environment
variables and test executions across multiple CI infrastructures.
To fix the situation, we can just always pass the host, port, user and
password to the tests. The tests can then assemble the complete URL
either with or without included credentials, allowing us to test both
cases in-process.
(cherry picked from commit fea6092079d5c09b499e472efead2f7aa81ce8a1)
|
|
89641431
|
2017-06-07T11:06:01
|
|
tests: perf: build but exclude performance tests by default
Our performance tests (or to be more concrete, our single performance
test) are not built by default, as they are always #ifdef'd out. While
it is true that we don't want to run performance tests by default, not
compiling them at all may cause code rot and is thus an unfavorable
approach to handle this.
We can easily improve this situation: this commit removes the #ifdef,
causing the code to always be compiled. Furthermore, we add `-xperf` to
the default command line parameters of `generate.py`, thus causing the
tests to be excluded by default.
Due to this approach, we are now able to execute the performance tests
by passing `-sperf` to `libgit2_clar`. Unfortunately, we cannot execute
the performance tests on Travis or AppVeyor as they rely on history
being available for the libgit2 repository. As both do a shallow clone
only, though, this is not given.
(cherry picked from commit 543ec149b86a68e12dd141a6141e82850dabbf21)
|
|
98378a3f
|
2017-06-07T11:00:26
|
|
tests: iterator::workdir: fix reference count in stale test
The test `iterator::workdir::filesystem_gunk` is usually not executed,
as it is guarded by the environment variable "GITTEST_INVASIVE_SPEED"
due to its effects on speed. As such, it has become stale and does not
account for new references which have meanwhile been added to the
testrepo, causing it to fail. Fix this by raising the number of expected
references to 15.
(cherry picked from commit b8c14499f9940feaab08a23651a2ef24d27b17b7)
|
|
d2bbea82
|
2017-06-07T10:59:31
|
|
tests: iterator_helpers: assert number of iterator items
When the function `expect_iterator_items` surpasses the number of
expected items, we simply break the loop. This causes us to trigger an
assert later on which has message attached, which is annoying when
trying to locate the root error cause. Instead, directly assert that the
current count is still smaller or equal to the expected count inside of
the loop.
(cherry picked from commit 9aba76364fcb4755930856a7bafc5294ed3ee944)
|
|
293c5ef2
|
2017-06-07T10:59:03
|
|
tests: status::worktree: indicate skipped tests on Win32
Some function bodies of tests which are not applicable to the Win32
platform are completely #ifdef'd out instead of calling `cl_skip()`.
This leaves us with no indication that these tests are not being
executed at all and may thus cause decreased scrutiny when investigating
skipped tests. Improve the situation by calling `cl_skip()` instead of
just doing nothing.
(cherry picked from commit 72c28ab011759dce113c2a0c7c36ebcd56bd6ddf)
|
|
8ba43299
|
2017-06-07T11:01:28
|
|
travis: build sources with tracing enabled
Our tracing architecture is not built by default, causing the Travis CI
to not execute some code and skip several tests. As AppVeyor has already
enabled the tracing architecture when building the code, we should do
the same for Travis CI to have this code being tested on macOS and
Linux.
Add "-DENABLE_TRACE=ON" to our release-build options of Travis.
(cherry picked from commit 8999f6acc78810680f282db4257e842971b80cb4)
|
|
13a6b203
|
2017-09-06T08:04:19
|
|
travis: drop support for Ubuntu Precise
Ubuntu Precise is end of life since April 2017. At that point in time,
Precise was still the main distro on which Travis CI built upon, with
the Trusty-based images still being in a beta state. But since June
21st, Trusty has officially moved out of beta and is now the default
image for all new builds. Right now, we build on both old and new images
to assure we support both.
Unfortunately, this leaves us with the highest minimum version for CMake
being 2.8.7, as Precise has no greater version in its repositories. And
because of this limitation, we cannot actually use object libraries in
our build instructions. But considering Precise is end of life and
Trusty is now the new default for Travis, we can and should drop support
for this old and unmaintained distribution. And so we do.
(cherry picked from commit c17c3f8a07377d76432fb2e4369b9805387ac099)
|
|
76ecd892
|
2018-01-10T15:13:23
|
|
travis: we use bintray's own key for signing
The VM on Travis apparently will still proceed, but it's good practice.
(cherry picked from commit 6e748130e4f910b6f8c03a3f6f2e11c856d19ba7)
|
|
6be03667
|
2018-01-10T12:33:56
|
|
travis: fetch trusty dependencies from bintray
The trusty dependencies are now hosted on Bintray.
(cherry picked from commit da9898aba0fe26ea683822e99853bfb2b02ac744)
|
|
0c51ecf2
|
2017-10-07T00:10:06
|
|
travis: add custom apt sources
Move back to Travis's VM infrastructure for efficiency.
(cherry picked from commit 9dc21efdbf275dec18b9c34b472f8df9f8e8c169)
|
|
93434828
|
2017-10-31T14:43:28
|
|
travis: let's try a 5GB ramdisk
(cherry picked from commit 71ba464435bb430b02d94c653cd518c11f7289ff)
|
|
4eecbdd0
|
2017-10-31T10:40:24
|
|
travis: put clar's sandbox in a ramdisk on macOS
The macOS tests are by far the slowest right now. This attempts to remedy the
situation somewhat by asking clar to put its test data on a ramdisk.
(cherry picked from commit 37bb15122e30bb13aabc213079da53b5cdac2678)
|
|
736356a6
|
2017-11-06T12:47:40
|
|
examples: network: fix Win32 linking errors due to getline
The getline(3) function call is not part of ISO C and, most importantly,
it is not implemented on Microsoft Windows platforms. As our networking
example code makes use of getline, this breaks builds on MSVC and MinGW.
As this code wasn't built prior to the previous commit, this was never
noticed.
Fix the error by instead implementing a `readline` function, which
simply reads the password from stdin until it reads a newline
character.
(cherry picked from commit bf15dbf6cf19146082c1245e9db4016d773dbe7e)
|
|
1c85bcd8
|
2017-11-06T11:16:02
|
|
appveyor: build examples
By default, CMake will not build our examples directory. As we do not
instruct either the MinGW or MSVC builds on AppVeyor to enable building
these examples, we cannot verify that those examples at least build on
Windows systems.
Fix that by passing `-DBUILD_EXAMPLES=ON` to AppVeyor's CMake
invocation.
(cherry picked from commit 0b98a66baae83056401a0a5fef5dc5cd2ed3468b)
|
|
dc413239
|
2017-07-24T17:53:32
|
|
travis: only install custom libcurl on trusty
(cherry picked from commit c582fa4eb6bee7880f04080aa80357cca406e448)
|
|
7d1c72a4
|
2017-07-24T16:48:04
|
|
travis: only kill our own sshd
(cherry picked from commit 697583ea3aceb1379c576515ffa713ba29c50437)
|
|
fad7f7a2
|
2017-07-24T13:10:43
|
|
travis: use trusty
(cherry picked from commit 4da38193c568ca3842bc1130c82e7a9f955f23aa)
|
|
16957a7f
|
2017-07-23T03:41:52
|
|
travis: build with patched libcurl
Ubuntu trusty has a bug in curl when using NTLM credentials in a proxy,
dereferencing a null pointer and causing segmentation faults. Use a
custom-patched version of libcurl that avoids this issue.
(cherry picked from commit f031e20b516209f19a56ef934e12fea6adec097a)
|
|
5491d0e1
|
2017-04-21T07:58:46
|
|
travis: upgrade container to Ubuntu 14.04
Ubuntu 12.04 (Precise Pangolin) reaches end of life on April 28th, 2017.
As such, we should update our build infrastructure to use the next
available LTS release, which is Ubuntu 14.04 LTS (Trusty Tahr). Note
that Trusty is still considered beta quality on Travis. But considering
we are able to correctly build and test libgit2, this seems to be a
non-issue for us.
Switch over our default distribution to Trusty. As Precise still has
extended support for paying customers, add an additional job which
compiles libgit2 on the old release.
(cherry picked from commit 7c8d460f8410cf7a110eb10e9c4bafdede6a49c6)
|
|
76a7d5f1
|
2017-04-26T13:04:23
|
|
travis: cibuild: set up our own sshd server
Some tests of ours require to be running against an SSH server.
Currently, we simply run against the SSH server provided and started by
Travis itself. As our Linux tests run in a sudo-less environment, we
have no control over its configuration and startup/shutdown procedure.
While this has been no problem until now, it will become a problem as
soon as we migrate over to newer Precise images, as the SSH server does
not have any host keys set up. Luckily, we can simply set up our own
unpriviledged SSH server. This has the benefit of us being able to
modify its configuration even in a sudo-less environment.
This commit sets up the unpriviledged SSH server on port 2222.
(cherry picked from commit 06619904a2ae2ffd5d8e34ab11d5eb484e9d5762)
|
|
b988f544
|
2017-04-26T13:16:18
|
|
tests: online::clone: use URL of test server
All our tests running against a local SSH server usually read the
server's URL from environment variables. But online::clone::ssh_cert
test fails to do so and instead always connects to
"ssh://localhost/foo". This assumption breaks whenever the SSH server is
not running on the standard port, e.g. when it is running as a user.
Fix the issue by using the URL provided by the environment.
(cherry picked from commit c2c95ad0a210be4811c247be51664bfe8b2e830a)
|
|
2bd9b6b6
|
2018-10-05T19:32:32
|
|
Merge pull request #4835 from pks-t/pks/v0.26.7
Security release v0.26.7
|
|
9102156c
|
2018-09-06T13:14:40
|
|
version: raise to v0.26.7
|
|
b1d39682
|
2018-09-06T13:14:19
|
|
CHANGELOG: update for v0.26.7
|
|
b93e82d4
|
2018-10-05T11:47:39
|
|
submodule: ignore path and url attributes if they look like options
These can be used to inject options in an implementation which performs a
recursive clone by executing an external command via crafted url and path
attributes such that it triggers a local executable to be run.
The library is not vulnerable as we do not rely on external executables but a
user of the library might be relying on that so we add this protection.
This matches this aspect of git's fix for CVE-2018-17456.
|
|
7e8d9789
|
2018-10-05T11:42:00
|
|
submodule: add failing test for option-injection protection in url and path
|
|
74937431
|
2018-10-05T10:56:02
|
|
config_file: properly ignore includes without "path" value
In case a configuration includes a key "include.path=" without any
value, the generated configuration entry will have its value set to
`NULL`. This is unexpected by the logic handling includes, and as soon
as we try to calculate the included path we will unconditionally
dereference that `NULL` pointer and thus segfault.
Fix the issue by returning early in both `parse_include` and
`parse_conditional_include` in case where the `file` argument is `NULL`.
Add a test to avoid future regression.
The issue has been found by the oss-fuzz project, issue 10810.
(cherry picked from commit d06d4220eec035466d1a837972a40546b8904330)
|
|
232fc469
|
2018-10-05T10:55:29
|
|
tests: always unlink created config files
While our tests in config::include create a plethora of configuration
files, most of them do not get removed at the end of each test. This can
cause weird interactions with tests that are being run at a later stage
if these later tests try to create files or directories with the same
name as any of the created configuration files.
Fix the issue by unlinking all created files at the end of these tests.
(cherry picked from commit bf662f7cf8daff2357923446cf9d22f5d4b4a66b)
|
|
21a2318b
|
2018-10-03T16:17:21
|
|
smart_pkt: do not accept callers passing in no line length
Right now, we simply ignore the `linelen` parameter of
`git_pkt_parse_line` in case the caller passed in zero. But in fact, we
never want to assume anything about the provided buffer length and
always want the caller to pass in the available number of bytes.
And in fact, checking all the callers, one can see that the funciton is
never being called in case where the buffer length is zero, and thus we
are safe to remove this check.
(cherry picked from commit 1bc5b05c614c7b10de021fa392943e8e6bd12c77)
|
|
5836d8b6
|
2018-08-09T11:16:15
|
|
smart_pkt: return parsed length via out-parameter
The `parse_len` function currently directly returns the parsed length of
a packet line or an error code in case there was an error. Instead,
convert this to our usual style of using the return value as error code
only and returning the actual value via an out-parameter. Thus, we can
now convert the output parameter to an unsigned type, as the size of a
packet cannot ever be negative.
While at it, we also move the check whether the input buffer is long
enough into `parse_len` itself. We don't really want to pass around
potentially non-NUL-terminated buffers to functions without also passing
along the length, as this is dangerous in the unlikely case where other
callers for that function get added. Note that we need to make sure
though to not mess with `GIT_EBUFS` error codes, as these indicate not
an error to the caller but that he needs to fetch more data.
(cherry picked from commit c05790a8a8dd4351e61fc06c0a06c6a6fb6134dc)
|
|
3bbda7d7
|
2018-08-09T11:13:59
|
|
smart_pkt: reorder and rename parameters of `git_pkt_parse_line`
The parameters of the `git_pkt_parse_line` function are quite confusing.
First, there is no real indicator what the `out` parameter is actually
all about, and it's not really clear what the `bufflen` parameter refers
to. Reorder and rename the parameters to make this more obvious.
(cherry picked from commit 0b3dfbf425d689101663341beb94237614f1b5c2)
|
|
a8356af8
|
2018-08-09T11:04:42
|
|
smart_pkt: fix buffer overflow when parsing "unpack" packets
When checking whether an "unpack" packet returned the "ok" status or
not, we use a call to `git__prefixcmp`. In case where the passed line
isn't properly NUL terminated, though, this may overrun the line buffer.
Fix this by using `git__prefixncmp` instead.
(cherry picked from commit 5fabaca801e1f5e7a1054be612e8fabec7cd6a7f)
|
|
02e4b27f
|
2018-08-09T11:03:37
|
|
smart_pkt: fix "ng" parser accepting non-space character
When parsing "ng" packets, we blindly assume that the character
immediately following the "ng" prefix is a space and skip it. As the
calling function doesn't make sure that this is the case, we can thus
end up blindly accepting an invalid packet line.
Fix the issue by using `git__prefixncmp`, checking whether the line
starts with "ng ".
(cherry picked from commit b5ba7af2d30c958b090dcf135749d9afe89ec703)
|
|
8cd0a897
|
2018-08-09T11:01:00
|
|
smart_pkt: fix buffer overflow when parsing "ok" packets
There are two different buffer overflows present when parsing "ok"
packets. First, we never verify whether the line already ends after
"ok", but directly go ahead and also try to skip the expected space
after "ok". Second, we then go ahead and use `strchr` to scan for the
terminating newline character. But in case where the line isn't
terminated correctly, this can overflow the line buffer.
Fix the issues by using `git__prefixncmp` to check for the "ok " prefix
and only checking for a trailing '\n' instead of using `memchr`. This
also fixes the issue of us always requiring a trailing '\n'.
Reported by oss-fuzz, issue 9749:
Crash Type: Heap-buffer-overflow READ {*}
Crash Address: 0x6310000389c0
Crash State:
ok_pkt
git_pkt_parse_line
git_smart__store_refs
Sanitizer: address (ASAN)
(cherry picked from commit a9f1ca09178af0640963e069a2142d5ced53f0b4)
|
|
82c3fc33
|
2018-08-09T10:38:10
|
|
smart_pkt: fix buffer overflow when parsing "ACK" packets
We are being quite lenient when parsing "ACK" packets. First, we didn't
correctly verify that we're not overrunning the provided buffer length,
which we fix here by using `git__prefixncmp` instead of
`git__prefixcmp`. Second, we do not verify that the actual contents make
any sense at all, as we simply ignore errors when parsing the ACKs OID
and any unknown status strings. This may result in a parsed packet
structure with invalid contents, which is being silently passed to the
caller. This is being fixed by performing proper input validation and
checking of return codes.
(cherry picked from commit bc349045b1be8fb3af2b02d8554483869e54d5b8)
|
|
3fd6ce0d
|
2018-08-09T10:57:06
|
|
smart_pkt: adjust style of "ref" packet parsing function
While the function parsing ref packets doesn't have any immediately
obvious buffer overflows, it's style is different to all the other
parsing functions. Instead of checking buffer length while we go, it
does a check up-front. This causes the code to seem a lot more magical
than it really is due to some magic constants. Refactor the function to
instead make use of the style of other packet parser and verify buffer
lengths as we go.
(cherry picked from commit 5edcf5d190f3b379740b223ff6a649d08fa49581)
|
|
e14dab2f
|
2018-08-09T10:46:58
|
|
smart_pkt: check whether error packets are prefixed with "ERR "
In the `git_pkt_parse_line` function, we determine what kind of packet
a given packet line contains by simply checking for the prefix of that
line. Except for "ERR" packets, we always only check for the immediate
identifier without the trailing space (e.g. we check for an "ACK"
prefix, not for "ACK "). But for "ERR" packets, we do in fact include
the trailing space in our check. This is not really much of a problem at
all, but it is inconsistent with all the other packet types and thus
causes confusion when the `err_pkt` function just immediately skips the
space without checking whether it overflows the line buffer.
Adjust the check in `git_pkt_parse_line` to not include the trailing
space and instead move it into `err_pkt` for consistency.
(cherry picked from commit 786426ea6ec2a76ffe2515dc5182705fb3d44603)
|
|
cfb9802b
|
2018-08-09T10:46:26
|
|
smart_pkt: explicitly avoid integer overflows when parsing packets
When parsing data, progress or error packets, we need to copy the
contents of the rest of the current packet line into the flex-array of
the parsed packet. To keep track of this array's length, we then assign
the remaining length of the packet line to the structure. We do have a
mismatch of types here, as the structure's `len` field is a signed
integer, while the length that we are assigning has type `size_t`.
On nearly all platforms, this shouldn't pose any problems at all. The
line length can at most be 16^4, as the line's length is being encoded
by exactly four hex digits. But on a platforms with 16 bit integers,
this assignment could cause an overflow. While such platforms will
probably only exist in the embedded ecosystem, we still want to avoid
this potential overflow. Thus, we now simply change the structure's
`len` member to be of type `size_t` to avoid any integer promotion.
(cherry picked from commit 40fd84cca68db24f325e460a40dabe805e7a5d35)
|
|
a7e87dd5
|
2018-08-09T10:36:44
|
|
smart_pkt: honor line length when determining packet type
When we parse the packet type of an incoming packet line, we do not
verify that we don't overflow the provided line buffer. Fix this by
using `git__prefixncmp` instead and passing in `len`. As we have
previously already verified that `len <= linelen`, we thus won't ever
overflow the provided buffer length.
(cherry picked from commit 4a5804c983317100eed509537edc32d69c8d7aa2)
|
|
5d108c9a
|
2018-10-03T15:39:40
|
|
tests: verify parsing logic for smart packets
The commits following this commit are about to introduce quite a lot of
refactoring and tightening of the smart packet parser. Unfortunately, we
do not yet have any tests despite our online tests that verify that our
parser does not regress upon changes. This is doubly unfortunate as our
online tests aren't executed by default.
Add new tests that exercise the smart parsing logic directly by
executing `git_pkt_parse_line`.
(cherry picked from commit 365d2720c1a5fc89f03fd85265c8b45195c7e4a8)
|
|
a8db6c92
|
2017-11-30T15:40:13
|
|
util: introduce `git__prefixncmp` and consolidate implementations
Introduce `git_prefixncmp` that will search up to the first `n`
characters of a string to see if it is prefixed by another string.
This is useful for examining if a non-null terminated character
array is prefixed by a particular substring.
Consolidate the various implementations of `git__prefixcmp` around a
single core implementation and add some test cases to validate its
behavior.
(cherry picked from commit 86219f40689c85ec4418575223f4376beffa45af)
|
|
5f557780
|
2018-06-24T19:47:08
|
|
Verify ref_pkt's are long enough
If the remote sends a too-short packet, we'll allow `len` to go
negative and eventually issue a malloc for <= 0 bytes on
```
pkt->head.name = git__malloc(alloclen);
```
(cherry picked from commit 437ee5a70711ac2e027877d71ee4ae17e5ec3d6c)
|
|
9561ec83
|
2017-08-22T16:29:07
|
|
smart: typedef git_pkt_type and clarify recv_pkt return type
(cherry picked from commit 08961c9d0d6927bfcc725bd64c9a87dbcca0c52c)
|
|
e91024e1
|
2018-06-28T05:27:36
|
|
Small style tweak, and set an error
(cherry picked from commit 895a668e19dc596e7b12ea27724ceb7b68556106)
|