Clone this repo:
  1. 512387a Add seccomp test support for risc64 am: 96d0f860cc am: ca349375bf am: d1d562a0d9 by Liu Cunyuan · 1 year, 7 months ago android-u-rb-dp-10-gpl android14-dev android14-mainline-healthfitness-release android14-qpr1-release android14-qpr1-s2-release android14-qpr2-release android14-qpr2-s1-release android14-qpr2-s2-release android14-qpr2-s3-release main master aml_cfg_341510000 aml_hef_341114030 aml_hef_341311010 aml_hef_341415040 aml_hef_341512030 aml_hef_341613000 aml_rkp_341012000 aml_rkp_341015010 aml_rkp_341114000 aml_rkp_341311000 aml_rkp_341510000 android-14.0.0_r16 android-14.0.0_r17 android-14.0.0_r18 android-14.0.0_r19 android-14.0.0_r20 android-14.0.0_r21 android-14.0.0_r22 android-14.0.0_r23 android-14.0.0_r24 android-14.0.0_r25 android-14.0.0_r26 android-14.0.0_r27 android-14.0.0_r29 android-14.0.0_r30 android-14.0.0_r31 android-14.0.0_r32 android-14.0.0_r33 android-15-dp-2-gpl android-u-qpr1-beta-1-gpl android-u-qpr1-beta-2.2-gpl android-u-qpr2-beta-1-gpl android-u-qpr2-beta-2-gpl android-u-qpr2-beta-3-gpl android-u-qpr3-beta-1-gpl android-u-qpr3-beta-2-gpl android-u-rb-dp-10-gpl
  2. d1d562a Add seccomp test support for risc64 am: 96d0f860cc am: ca349375bf by Liu Cunyuan · 1 year, 7 months ago android-u-beta-1-gpl android-u-beta-2-gpl android-u-beta-3-gpl android-u-beta-4-gpl
  3. ca34937 Add seccomp test support for risc64 am: 96d0f860cc by Liu Cunyuan · 1 year, 7 months ago main-16k-with-phones
  4. 96d0f86 Add seccomp test support for risc64 by Liu Cunyuan · 1 year, 7 months ago
  5. f326d3b Merge sc-mainline-prod by Xin Li · 2 years, 11 months ago aml_tz4_332714010 android-wear-13.0.0-gpl_r1 android13-d2-release android13-d3-s1-release android13-d4-release android13-d4-s1-release android13-d4-s2-release android13-dev android13-frc-adbd-release android13-frc-art-release android13-frc-cellbroadcast-release android13-frc-conscrypt-release android13-frc-documentsui-release android13-frc-extservices-release android13-frc-ipsec-release android13-frc-media-release android13-frc-media-swcodec-release android13-frc-networking-release android13-frc-neuralnetworks-release android13-frc-odp-release android13-frc-os-statsd-release android13-frc-permission-release android13-frc-resolv-release android13-frc-scheduling-release android13-mainline-adservices-release android13-mainline-appsearch-release android13-mainline-go-adbd-release android13-mainline-go-adservices-release android13-mainline-go-appsearch-release android13-mainline-go-art-release android13-mainline-go-cellbroadcast-release android13-mainline-go-conscrypt-release android13-mainline-go-documentsui-release android13-mainline-go-extservices-release android13-mainline-go-ipsec-release android13-mainline-go-media-release android13-mainline-go-media-swcodec-release android13-mainline-go-mediaprovider-release android13-mainline-go-networking-release android13-mainline-go-neuralnetworks-release android13-mainline-go-odp-release android13-mainline-go-os-statsd-release android13-mainline-go-permission-release android13-mainline-go-resolv-release android13-mainline-go-scheduling-release android13-mainline-go-sdkext-release android13-mainline-go-tethering-release android13-mainline-go-tzdata4-release android13-mainline-go-uwb-release android13-mainline-go-wifi-release android13-mainline-tzdata4-release android13-mainline-uwb-release android13-qpr1-release android13-qpr1-s1-release android13-qpr1-s2-release android13-qpr1-s3-release android13-qpr1-s4-release android13-qpr1-s5-release android13-qpr1-s6-release android13-qpr1-s7-release android13-qpr1-s8-release android13-qpr2-b-s1-release android13-qpr2-release android13-qpr2-s1-release android13-qpr2-s10-release android13-qpr2-s11-release android13-qpr2-s12-release android13-qpr2-s2-release android13-qpr2-s3-release android13-qpr2-s5-release android13-qpr2-s6-release android13-qpr2-s7-release android13-qpr2-s8-release android13-qpr2-s9-release android13-qpr3-c-s1-release android13-qpr3-c-s10-release android13-qpr3-c-s11-release android13-qpr3-c-s12-release android13-qpr3-c-s2-release android13-qpr3-c-s3-release android13-qpr3-c-s4-release android13-qpr3-c-s5-release android13-qpr3-c-s6-release android13-qpr3-c-s7-release android13-qpr3-c-s8-release android13-qpr3-release android13-qpr3-s1-release android13-qpr3-s10-release android13-qpr3-s11-release android13-qpr3-s12-release android13-qpr3-s13-release android13-qpr3-s14-release android13-qpr3-s2-release android13-qpr3-s3-release android13-qpr3-s4-release android13-qpr3-s5-release android13-qpr3-s6-release android13-qpr3-s7-release android13-qpr3-s8-release android13-qpr3-s9-release aml_ads_331131000 aml_ads_331418080 aml_ads_331511020 aml_ads_331611190 aml_ads_331710270 aml_ads_331814200 aml_ads_331920180 aml_ase_331011020 aml_ase_331112000 aml_ase_331311020 aml_go_adb_330913000 aml_go_ads_330913000 aml_go_ads_330915000 aml_go_ads_330915100 aml_go_art_330913000 aml_go_ase_330913000 aml_go_cbr_330912000 aml_go_con_330913000 aml_go_doc_330912000 aml_go_ext_330912000 aml_go_ips_330911000 aml_go_med_330913000 aml_go_mpr_330912000 aml_go_net_330913000 aml_go_neu_330912000 aml_go_odp_330912000 aml_go_odp_330913000 aml_go_per_330912000 aml_go_res_330912000 aml_go_sch_330911000 aml_go_sdk_330810000 aml_go_sta_330911000 aml_go_swc_330913000 aml_go_tet_330914010 aml_go_tz4_330912000 aml_go_uwb_330912000 aml_go_wif_330911000 aml_tz4_331012000 aml_tz4_331012040 aml_tz4_331012050 aml_tz4_331314010 aml_tz4_331314020 aml_tz4_331314030 aml_tz4_331910000 aml_tz4_332714010 aml_tz4_332714050 aml_tz4_332714070 aml_uwb_330810010 aml_uwb_331015040 aml_uwb_331115000 aml_uwb_331310030 aml_uwb_331410010 aml_uwb_331611010 aml_uwb_331613010 aml_uwb_331820070 aml_uwb_331910010 android-13.0.0_r16 android-13.0.0_r17 android-13.0.0_r18 android-13.0.0_r19 android-13.0.0_r20 android-13.0.0_r21 android-13.0.0_r22 android-13.0.0_r23 android-13.0.0_r24 android-13.0.0_r27 android-13.0.0_r28 android-13.0.0_r29 android-13.0.0_r30 android-13.0.0_r32 android-13.0.0_r33 android-13.0.0_r34 android-13.0.0_r35 android-13.0.0_r36 android-13.0.0_r37 android-13.0.0_r38 android-13.0.0_r39 android-13.0.0_r40 android-13.0.0_r41 android-13.0.0_r42 android-13.0.0_r43 android-13.0.0_r44 android-13.0.0_r45 android-13.0.0_r46 android-13.0.0_r47 android-13.0.0_r48 android-13.0.0_r49 android-13.0.0_r50 android-13.0.0_r51 android-13.0.0_r52 android-13.0.0_r53 android-13.0.0_r54 android-13.0.0_r55 android-13.0.0_r56 android-13.0.0_r57 android-13.0.0_r58 android-13.0.0_r59 android-13.0.0_r60 android-13.0.0_r61 android-13.0.0_r62 android-13.0.0_r63 android-13.0.0_r64 android-13.0.0_r65 android-13.0.0_r66 android-13.0.0_r67 android-13.0.0_r68 android-13.0.0_r69 android-13.0.0_r70 android-13.0.0_r71 android-13.0.0_r72 android-13.0.0_r73 android-13.0.0_r74 android-13.0.0_r75 android-13.0.0_r76 android-13.0.0_r77 android-13.0.0_r78 android-13.0.0_r79 android-13.0.0_r80 android-13.0.0_r81 android-13.0.0_r82 android-13.0.0_r83 android-t-qpr1-beta-1-gpl android-t-qpr1-beta-2-gpl android-t-qpr1-beta-3-gpl android-t-qpr2-beta-2-gpl android-t-qpr2-beta-3-gpl android-t-qpr3-beta-1-gpl android-t-qpr3-beta-3-gpl android-wear-13.0.0-gpl_r1 t_frc_adb_330444000 t_frc_art_330443060 t_frc_ase_330444010 t_frc_cbr_330443000 t_frc_con_330443020 t_frc_doc_330443000 t_frc_doc_330443060 t_frc_doc_330543000 t_frc_ext_330443000 t_frc_ips_330443010 t_frc_med_330443030 t_frc_net_330443000 t_frc_neu_330443000 t_frc_neu_330443030 t_frc_odp_330442000 t_frc_odp_330442040 t_frc_per_330444010 t_frc_res_330443000 t_frc_sch_330443010 t_frc_sch_330443040 t_frc_sta_330443010 t_frc_swc_330443010 t_frc_swc_330443040 t_frc_tz4_330443010

Seccomp-BPF Kernel Self-Test Suite

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.

Syncing to Upstream

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.

First-Time Setup

These instructions only need to be followed for the first time you are updating the repository from a checkout.

  1. Configure a remote to use as the source repository (limited to only syncing the master branch):
    git remote add upstream-linux git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git -t master --no-tags
    

Updating the Source

Perform these steps every time you need to update the test suite from upstream.

  1. Update the remote to fetch the latest sources:

    git remote update upstream-linux
    
  2. Create a new local branch from the updated source, replacing YYYYMMDD with today's date:

    git checkout -b update-YYYYMMDD upstream-linux/master
    
  3. Filter the branch to just the subtree containing the Seccomp test suite:

    git filter-branch --subdirectory-filter tools/testing/selftests/seccomp
    
  4. 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
    
  5. Update this upstream-master branch to the newly filtered branch of upstream-linux.

    git merge --ff-only update-YYYYMMDD
    
  6. Upload the changes on upstream-master for review and submit them.

  7. 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.

Linux Space-Saving

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.