commit | f326d3b41267781072bb4f00a7ee9a30ac317787 | [log] [tgz] |
---|---|---|
author | Xin Li <delphij@google.com> | Wed Jun 02 16:50:57 2021 +0000 |
committer | Xin Li <delphij@google.com> | Wed Jun 02 16:50:57 2021 +0000 |
tree | f062d90e3448e9405f8bae7e3b46aa9c8c4ac478 | |
parent | 4dd13de73a439485d9e09af400229614f9465e08 [diff] | |
parent | 58331aa4062048e7cb81d70bd33a01eda6d9be5e [diff] |
Merge sc-mainline-prod Bug: 189946434 Change-Id: Ifa32d2c099f4ccd6e9abd1fb9ba58fd15342f8d3
This repository contains a mirror of the upstream Linux kernel test suite for the Seccomp-BPF system call filter. The test suite runs as part of CTS, but it is maintained in a separate repository because the code is GPL.
Rather than hold the entire Linux history in this repository, only the subdirectory for the Seccomp selftests are preserved here. In order to sync this repository to the upstream Linux, follow these instructions.
The pristine copy of the upstream source is kept on a branch called upstream-master. This branch is then merged into an Android development branch.
These instructions only need to be followed for the first time you are updating the repository from a checkout.
git remote add upstream-linux git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git -t master --no-tags
Perform these steps every time you need to update the test suite from upstream.
Update the remote to fetch the latest sources:
git remote update upstream-linux
Create a new local branch from the updated source, replacing YYYYMMDD with today's date:
git checkout -b update-YYYYMMDD upstream-linux/master
Filter the branch to just the subtree containing the Seccomp test suite:
git filter-branch --subdirectory-filter tools/testing/selftests/seccomp
Check out the upstream-master branch, which contains the pristine, filter-branch'd copy of the source code. Pushing non-merge commits with a "forged" author/committer can only be done against the upstream-master branch.
git checkout -b upstream-master aosp/upstream-master
Update this upstream-master branch to the newly filtered branch of upstream-linux.
git merge --ff-only update-YYYYMMDD
Upload the changes on upstream-master for review and submit them.
Merge the changes from upstream-master into the Android development branch (typically master). Resolve any conflicts with the local modifications present in the repository.
repo start sync-upstream . git subtree merge -P linux/ upstream-master
Now build and test the changes by running CTS:
$ mmma cts/tests/tests/os $ cts-tradefed run singleCommand cts -m CtsOsTestCases -t android.os.cts.SeccompTest
The tests are expected to pass on arm, arm64, x86, and x86_64. If they pass, then repo upload/submit the CL branch. Afterwards, you can remove the update-YYYYMMDD branch.
If you already have a Linux kernel checkout, you can skip adding Linux as a remote and instead perform steps 1-3 of "Updating the Source" in the kernel checkout. Then simply fetch the filtered branch into the seccomp-tests repository and subtree merge it (as FETCH_HEAD). This will avoid copying the entire kernel history into your local checkout.