summaryrefslogtreecommitdiff
path: root/Makefile-tests.am
Commit message (Collapse)AuthorAgeFilesLines
...
* tests: More fixes for gjs testsColin Walters2017-07-211-1/+1
| | | | | | | | | | | | | | | | | Previous to this commit, the gjs tests were installed-only; and our logic for handling the "--enable-installed-tests=exclusive" logic actually also meant they weren't installed. It did work for me locally with `--enable-installed-tests`. However, to make things fully symmetric, let's enable the js tests to also be run under `make check`. Also remove `corrupt-repo-ref.js` from the PAPR invocation since it's not actually a unit test, it's a utility helper. Closes: #1022 Approved by: jlebon
* build: Ensure all experimental tests are distributed in tarballsPhilip Withnall2017-07-121-2/+6
| | | | | | | | | | | | As with the previous commit, ensure that tests which are run when configured with --enable-experimental-api, are always distributed; even when running `make dist` from a source tree configured with --disable-experimental-api. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #1002 Approved by: cgwalters
* tests: Run pull tests for bare/bare-userColin Walters2017-07-101-1/+2
| | | | | | | | | | | | | We have variants of `test-basic` for all 4 modes, but not for pull-test, which for some reason was named `pull-archive`, but mostly pulls *into* bare repos. The test code was structured like the basic one where it called into a `pull-test.sh`, so let's actually use it for 2/3 bare modes. (I tried to extend it to `bare-user-only` but it failed, going to look at that after this). This is related to https://github.com/ostreedev/ostree/issues/991 Closes: #998 Approved by: jlebon
* tests: New tests for creating commits with bindings and pulling themKrzesimir Nowak2017-07-061-0/+1
| | | | | Closes: #972 Approved by: cgwalters
* Add "pull --localcache-repo"Colin Walters2017-06-301-0/+1
| | | | | | | | | | | | | | | | | | | | | This is a lot like `git clone --reference`, but we chose "localcache" as the term "reference" is already used. The main use case I'm targeting this for is the Fedora Atomic Host installer case where we embed the repo content in the installer, but we may want to kickstart and download newer content. There, while we want to get a newer ref, we can still use the local repo as an object cache, since we have it sitting there in memory anyways. Another case is where one has a host ostree (say e.g. Fedora Atomic Workstation), and one wants to create a local archive mirror of FAH. Then one can use `pull --reference /ostree/repo` and pull the common objects (e.g. contents of `bash.rpm` etc.) Closes: https://github.com/ostreedev/ostree/issues/975 Closes: #982 Approved by: jlebon
* tree-wide: Replace various uses of `archive-z2` → `archive`Colin Walters2017-06-291-1/+1
| | | | | | | | | | | | The `-z2` is annoying now since it's really a legacy; we've long since supported typing `archive`. Convert the docs fully and explain that. Also do some (but not all) of the tests just to encourage newer tests to use `archive` too. Closes: #980 Approved by: jlebon
* ostree/summary: Add support for adding additional metadataPhilip Withnall2017-06-271-0/+1
| | | | | | | | | | | | When updating a summary file, parse additional arguments to the `ostree summary` command as additional metadata to be put into the summary. Add some tests for this. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #961 Approved by: cgwalters
* tests: Add integration tests for collectionsPhilip Withnall2017-06-261-0/+12
| | | | | | | | | | | Test various pieces of core and command line utility functionality relating to the newly-introduced concept of collections. Mostly focussed around the find-remotes utility, and around handling of collection–refs. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #924 Approved by: cgwalters
* lib/repo-finder: Add Avahi based OstreeRepoFinder implementationPhilip Withnall2017-06-261-0/+10
| | | | | | | | | | | | | | | | | | | | | This is a more complex implementation of OstreeRepoFinder which resolves ref names to remote URIs by looking for refs advertised by peers on the local network using DNS-SD records and mDNS (Avahi). The idea is to allow OS and app updates to be propagated over local networks, without the internet. It requires an OSTree server and code to generate the DNS-SD adverts in order to be fully functional — support for this will be added separately. Unit tests are included. Includes fixes by Krzesimir Nowak <krzesimir@kinvolk.io>. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #924 Approved by: cgwalters
* lib/bloom: Add an internal bloom filter implementationPhilip Withnall2017-06-261-0/+5
| | | | | | | | | | | | | | | | This will be used in an upcoming commit. It adds a basic bloom filter implementation, using the SipHash family of hash functions. The implementation (including its parameter choices and hash functions) will become a protocol detail in future, so must not be changed so that its output is bitwise incompatible between OSTree versions. Unit tests are included. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #924 Approved by: cgwalters
* lib/repo-finder: Add mount based OstreeRepoFinder implementationPhilip Withnall2017-06-261-1/+6
| | | | | | | | | | | | | | | | | | | | This is a basic implementation of OstreeRepoFinder which resolves ref names to remote URIs by looking for them on any currently mounted removable storage volumes. The idea is to support OS and app updates via USB stick. Unit tests are included. This bumps libostree’s maximum GLib dependency from 2.44 to 2.50 for g_drive_is_removable(). If GLib 2.50 is not available, the call which needs it will be omitted and the OstreeRepoFinderMount implementation will scan all volumes (not just removable ones); this is a performance hit, but not a functionality hit. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #924 Approved by: cgwalters
* lib/repo-finder: Add config-file based OstreeRepoFinder implementationPhilip Withnall2017-06-261-0/+10
| | | | | | | | | | | | | This is a basic implementation of OstreeRepoFinder which resolves ref names to remote URIs by looking their collection IDs up in the local configuration of remotes who have their collection-id key set. Unit tests are included. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #924 Approved by: cgwalters
* build: Use AM_TESTS_ENVIRONMENT rather than TESTS_ENVIRONMENTPhilip Withnall2017-05-231-2/+2
| | | | | | | | | | | | | TESTS_ENVIRONMENT is reserved for the user to be able to set when running the tests. AM_TESTS_ENVIRONMENT is for the tests’ Makefile to set itself. https://www.gnu.org/software/automake/manual/html_node/Scripts_002dbased-Testsuites.html Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #880 Approved by: cgwalters
* Allow commits to mark refs as EOL, replaced by othersDaniel Drake2017-05-221-0/+1
| | | | | | | | | | | | | | | | | | | A commit can now include a "ostree.endoflife-rebase" metadata key pointing to a new ref. When updating, the sysroot upgrader will see this and proceed to pull and deploy the new ref instead. The origin file in the new deployment will point to the new ref. This functionality is planned to be used in Endless OS. We will create a lesser tested branch for brand new, cutting edge hardware support, and ship that on hardware platforms that require the latest drivers. However, once our slower-moving official release is later updated to support the new hardware, we will use this functionality to migrate those bleeding-edge users over to the official release. Closes: #874 Approved by: cgwalters
* lib/checkout: Fix regression in subpath for regular filesColin Walters2017-05-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | This is what caused the merge of https://github.com/projectatomic/rpm-ostree/pull/652 to blow up, since https://github.com/ostreedev/ostree/pull/848 landed right before we tried to merge it. When I was writing that PR I remember having an uncertain feeling since we were doing a `mkdirat` above, but at the time I thought we'd have test suite coverage...turns out we didn't. For backwards compatibility, we need to continue to do a `mkdirat` here of the parent. However...I can't think of a reason anyone would *want* that behavior. Hence, let's add a special trick - if the destination name is `.`, we skip `mkdirat()`. That way rpm-ostree for example can open a dfd for `/etc` and avoid the `mkdir`. Fold the subpath tests into `test-basic.sh` since it's not worth a separate file. Add a test case for checking out a file. Closes: #854 Approved by: jlebon
* tests: Migrate test-pull-many.sh to installed on FAHColin Walters2017-05-091-1/+0
| | | | | | | | | | | | | | `test-pull-many.sh` is was just too slow to be a unit test. Generating a bunch of files via shell is slow, the delta generation is slow, etc. Every developer doesn't need to run it every time. Somewhat address this by converting it into our installed test framework, which moves it out of the developer fast paths. Another advantage to this is that we can simply reuse the FAH tree content rather than synthesizing new bits each time. Closes: #840 Approved by: jlebon
* build: Add --enable-experimental-api configure option for unstable APIsPhilip Withnall2017-05-081-0/+1
| | | | | | | | | | | | | | | | There are currently no unstable APIs, but some will be added in following commits. They will be built and exposed in the libostree global symbol list iff configured with --enable-experimental-api. Distributions should not package OSTree with --enable-experimental-api. This is designed for previewing new APIs on controlled platforms; any of the APIs hidden behind this option may be changed or removed at any point. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #832 Approved by: cgwalters
* Add --enable-installed-tests=exclusive, fix installed caseColin Walters2017-05-081-10/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | The major reason to do this is that running tests *both* installed and uninstalled in our CI is a mostly pointless waste of time. Particularly given we have a few expensive tests. We *do* have tests that only run uninstalled (since they require the source code) like `test-symbols.sh`. Hence, add `--enable-installed-tests=exclusive` to mean *only* do installed for most tests. We'll still have uninstalled coverage via the Travis/Debian configs, and we could perhaps do another build with a subset of uninstalled tests, but I'm not really concerned about it. I'd like to do a renewed push for the InstalledTests model since I feel it's just fundamentally better. (`g-d-t-r` kind of sucks, but then so does the automake runner). Also while we're here - fix the CI to use the correct context, which started this mess. Closes: #837 Approved by: dbnicholson
* tests: Install libtest-core.sh with installed testsDan Nicholson2017-05-081-1/+2
| | | | | | | | Without this, running the installed tests fails dramatically. Remove it from EXTRA_DIST since dist_installed_test_data takes care of dist. Closes: #837 Approved by: dbnicholson
* tests: Add a test for `ostree summary --view`Philip Withnall2017-05-081-0/+1
| | | | | | | | | This includes a test of the new human-readable key names. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #826 Approved by: cgwalters
* tests/installed: New installed, privileged tests using Fedora AHColin Walters2017-04-251-1/+1
| | | | | | | | | | | | | Our container-driven tests can't e.g. test SELinux sanely, and have to support being run as root *and* non-root too. Use redhat-ci to provision a VM and run tests directly there. These are installed tests too. Closes: https://github.com/ostreedev/ostree/issues/806 Closes: #807 Approved by: jlebon
* checkout: Merge union/add logic for copies during checkoutColin Walters2017-04-251-0/+1
| | | | | | | | | | | | We really have an astonishing variety of similar functions which write files and symlinks. I was working on a different PR and the duplication between the union-mode and add-mode/none-mode checkout functions bothered me. I realized that the "handle EEXIST" tri-state maps directly to the `GLnxLinkTmpfileReplaceMode`, so deduping things makes even more sense. Closes: #801 Approved by: jlebon
* Add Coccinelle usage: one for blacklisting, one for patch collectionColin Walters2017-03-301-0/+2
| | | | | | | | | | | | | | | This is inspired by the [Coccinelle](http://coccinelle.lip6.fr/) usage in systemd. I also took it a bit further and added infrastructure to have spatches which should never apply. This acts as a blacklist. The reason to do the latter is that coccinelle is *way* more powerful than the regular expresssions we have in `make syntax-check`. I started with blacklisting `g_error_free()` directly. The reason that's bad is it leaves a dangling pointer. Closes: #754 Approved by: jlebon
* Add basic tests for bare-user-only repo modesAlexander Larsson2017-03-271-0/+1
| | | | | | | | | This is somewhat complicated by such repos only properly supporting some subset of file metadata (uid/gid 0, etc). We fix this by always commiting with filters that make it work. Closes: #750 Approved by: cgwalters
* upgrade: Add support for --pull-only and --deploy-onlyColin Walters2017-02-271-0/+1
| | | | | | | | | | This makes it easier to script downloading updates in the background, and only do deployments just before rebooting. Partially addresses https://github.com/ostreedev/ostree/issues/640 Closes: #642 Approved by: jlebon
* oxidation: Add implementation of bupsplit in RustColin Walters2017-02-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an initial drop of "oxidation", or adding implementation of components in Rust. The bupsplit code is a good target - no dependencies, just computation. Translation into Rust had a few twists - - The C code relies a lot on overflowing unsigned ints, and also on the C promotion rules for e.g. `uint8_t -> int32_t` - There were some odd loops that I introduced bugs in while translating...in particular, the function always returns `len`, but I mistakenly translated to `len+1`, resulting in an OOB read on the C side, which was hard to debug. On the plus side, an off-by-one array indexing in the Rust code paniced nicely. In practice, we'll need a lot more build infrastructure to make this work, such as using `cargo vendor` when producing build artifacts for example. Also, Cargo is yet another thing we need to cache. Where do we go with this? Well, I think we should merge this, it's not a lot of code. We can just have it be an alternative CI target. Should we do a lot more right now? Probably not immediately, but I find the medium/long term prospects pretty exciting! Closes: #656 Approved by: jlebon
* tests: Add a big (many objects) pullColin Walters2017-01-231-0/+1
| | | | | | | | | | | | | | This would be more likely to tickle things like https://github.com/ostreedev/ostree/issues/601 reliably. Also, while working on the curl backend, I hit on the fact that curl doesn't queue (by default, you can enable) and will happily create 20000+ concurrent TCP connections if you try. Having this test would have made that more likely to fail. Closes: #650 Approved by: giuseppe
* Make corrupt-repo-ref.js executableSimon McVittie2017-01-191-3/+5
| | | | | | | | | | Debian's Lintian packaging consistency check complains that it isn't executable but has a #! line. In fact it's reasonable to run this script directly, so make it executable, and put it in a _scripts variable so it will be installed executable. Closes: #652 Approved by: cgwalters
* Fix TAP syntax in test-basic-user.sh, and run itSimon McVittie2017-01-191-1/+1
| | | | | | | | | | | | | | In its initial commit, Alexander Larsson wrote This works standalone, but unfortunately it breaks in gnome-desktop-testing-runner as /tmp doesn't support xattrs, so it is not installed atm. but we now (a) use /var/tmp, and (b) explicitly skip the test if xattr support is unavailable. So it should be OK to run now. Closes: #652 Approved by: cgwalters
* Split trivial-httpd into separate binaryColin Walters2017-01-041-0/+1
| | | | | | | | | | | | | | | | | | Working on the libcurl backend, I hit the issue that the trivial-httpd program depends on libsoup. I briefly considered having two versions, but libcurl is client only, and moreover trivial-httpd is no longer trivial - it has various features which are used by the test suite extensively. Hence, what we'll do is build it as a separate binary which links to libsoup, and use it during the tests. We *also* currently still provide `ostree trivial-httpd` since some things use it like `rpm-ostree-toolbox` and the Cockpit tests. After those are ported to use some other webserver, I plan to add a build-time option to drop it. Closes: #636 Approved by: jlebon
* ci: Combine UBSAN and ASAN by defaultColin Walters2016-12-091-5/+2
| | | | | | | | | | I only recently realized this was possible. While we're still seeing leaks in the CI environment for some reason, adding ASAN gives us use-after-free detection etc., which is obviously still very useful even if we're not doing leak checking. Closes: #622 Approved by: jlebon
* tests: Tweak installed tests to deal with ASANColin Walters2016-12-091-1/+10
| | | | | | | We need to disable readdir-rand there too. Closes: #622 Approved by: jlebon
* Skip gjs-based tests if ASAN is enabledColin Walters2016-12-091-4/+6
| | | | | | | | | | | | | | | | | Unfortunately, introspection uses dlopen(), which doesn't quite work when the DSO is compiled with ASAN but the outer executable isn't. Trying to inject LD_PRELOAD=libasan means the outer executable has to be leak free...which, yeah, I'm not going to get into running ASAN today on gjs or pygobject. So, let's skip those tests - ideally, we still run them in some other context without the sanitizers. The coverage we have from them is middling anyways. Closes: #622 Approved by: jlebon
* build: Make libsoup optional againColin Walters2016-12-081-1/+4
| | | | | | | | | | The "remote cookies" code broke this. While I'm not sure anyone is actually using ostree-without-http, it isn't too hard to keep the build time conditional going. Further, this work is preparatory for libcurl porting. Closes: #621 Approved by: jlebon
* tests: Use G_DEBUG=fatal-warnings here tooColin Walters2016-12-061-0/+1
| | | | | | | | | | | | I am trying to track down a warning I see in `test-keyfile-utils` which turned out to be the installed case only, but let's inject this here too. (The GLib default is broken, but it's hard to fix upstream without breaking the world) Closes: #610 Approved by: jlebon
* tests: prepend to an existing LD_LIBRARY_PATH, GI_TYPELIB_PATHSimon McVittie2016-12-011-2/+2
| | | | | | | | | | If we're using LD_LIBRARY_PATH for some locally-built library, we want to search those after OSTree's own libraries. Signed-off-by: Simon McVittie <smcv@debian.org> Closes: #606 Approved by: cgwalters
* build: clean up ostree-remount if building without systemdSimon McVittie2016-11-291-2/+0
| | | | | | | | | This is necessary for "make distcheck" on Travis-CI. Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Closes: #600 Approved by: cgwalters
* pull: Add support for `http-headers` optionColin Walters2016-11-161-0/+1
| | | | | | | | | | | | | | | Some deployments may want to gate access to content based on things like OAuth. In this model, the client system would normally compute a token and pass it to the server via an API. We could theoretically support this in the remote config too, but that'd be a bit weird for OAuth as the information is dynamic. Therefore this cleans up the code a little bit to more clearly handle the case that the fetcher is initialized from both remote config data plus pull options. Closes: #574 Approved by: giuseppe
* tests: Add test for the cookie jar handlingSjoerd Simons2016-11-051-0/+1
| | | | | Closes: #531 Approved by: cgwalters
* Distribute valgrind suppressions in tarballsSimon McVittie2016-10-291-0/+2
| | | | | | | Signed-off-by: Simon McVittie <smcv@debian.org> Closes: #557 Approved by: cgwalters
* Distribute test scripts even if we wouldn't run themSimon McVittie2016-10-291-2/+12
| | | | | | | | | | | | | This fixes a "make dist" tarball produced on a minimal system and run on a non-minimal system. Automake knows that files that are only conditionally included in dist_whatever_WHATEVER are to be distributed, but it does not do the same for files that are only conditionally included in EXTRA_DIST, which is how glib-tap.mk's various variables like dist_test_scripts work. Signed-off-by: Simon McVittie <smcv@debian.org> Closes: #557 Approved by: cgwalters
* tests: add tests for contenturl and mirrorlistJonathan Lebon2016-08-311-0/+2
| | | | | Closes: #469 Approved by: cgwalters
* build: Update .gitignoreColin Walters2016-08-091-0/+1
| | | | | | | The patch to add more symlink bits also needed CLEANFILES updates. Closes: #446 Approved by: jlebon
* tests: Add basic tests for ostree-prepare-rootWilliam Manley2016-08-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests use unshare and mount to prepare a fake initrd/early boot directory structure so we can then test ostree-prepare-root. Things that are tested: * Running in an initrd environment * Running without initrd * /var and /sysroot being mounted correctly * /usr being mounted read-only Things not tested (yet): * Running as init - this could be accomplished by unsharing the pid namespace too. * mounting/unmounting `/proc` if `/proc/cmdline` isn't available * Persistent overlayfs for `/usr` * Probably other things The tests are basic but can be extended in the future as we do more work on `ostree-prepare-root`. These tests must be run as root as they require the ability to `mount` and to `unshare` the mount namespace. Perhaps in the future we can use user namespaces for this test once they are more widely available. Closes: #403 Approved by: cgwalters
* build: Make symlink depend on sourceColin Walters2016-07-161-2/+2
| | | | | | | Closes: https://github.com/ostreedev/ostree/issues/389 Closes: #400 Approved by: smcv
* Makefile-tests.am: make check uses the built binariesGiuseppe Scrivano2016-07-141-5/+13
| | | | | | | | | | | | | The tests suite was failing locally as it was using the installed version of rofiles-fuse, instead of the built one. Create the needed symlinks in tests/ as we are already doing for the "ostree" binary. ostree-prepare-root and ostree-remount added for completeness. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #395 Approved by: cgwalters
* tests: Add some test coverage of repeated pulls w/HTTP 500sColin Walters2016-07-081-0/+1
| | | | | | | | | Systems like pulp may want to keep retrying in a loop if the server throws a (hopefully transient) 500, and we need test coverage of handling these errors versus our existing 404 and 206 coverage. Closes: #383 Approved by: mbarnes
* tests: Remove gpg verification files from EXTRA_DISTDan Nicholson2016-06-271-6/+1
| | | | | | | Follow on from 70a11189. These files are already disted. Closes: #372 Approved by: cgwalters
* tests: fail the build if symlinking tests/ostree failsSimon McVittie2016-06-261-1/+2
| | | | | | | Signed-off-by: Simon McVittie <smcv@debian.org> Closes: #367 Approved by: cgwalters
* tests: use our own generated libtool, not the one in $PATHSimon McVittie2016-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | libtoolize creates a version of libtool for the right architecture in $(top_builddir), which is guaranteed to be present, and is guaranteed to match what we are compiling (even during cross-compilation). Packaging systems sometimes separate /usr/bin/libtool, which is specific to one architecture, from the libtool development files such as libtoolize and ltmain.sh, which are architecture-independent. For example, in Debian, libtool_*_all.deb contains the files necessary to libtoolize a package and is depended on by the dh-autoreconf package, but libtool-bin_*_amd64.deb (or whatever architecture) contains /usr/bin/libtool and is not normally necessary to depend on. Signed-off-by: Simon McVittie <smcv@debian.org> Closes: #367 Approved by: cgwalters