File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ name: GnuTests
66# spell-checker:ignore (options) Ccodegen Coverflow Cpanic Zpanic
77# spell-checker:ignore (people) Dawid Dziurla * dawidd dtolnay
88# spell-checker:ignore (vars) FILESET SUBDIRS XPASS
9+ # spell-checker:ignore userns
910
1011# * note: to run a single test => `REPO/util/run-gnu-test.sh PATH/TO/TEST/SCRIPT`
1112
@@ -116,6 +117,9 @@ jobs:
116117 - name : Run GNU tests
117118 shell : bash
118119 run : |
120+ ## Use unshare
121+ sudo sysctl -w kernel.unprivileged_userns_clone=1
122+ sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
119123 ## Run GNU tests
120124 path_GNU='gnu'
121125 path_UUTILS='uutils'
Original file line number Diff line number Diff line change 44
55# spell-checker:ignore (paths) abmon deref discrim eacces getlimits getopt ginstall inacc infloop inotify reflink ; (misc) INT_OFLOW OFLOW
66# spell-checker:ignore baddecode submodules xstrtol distros ; (vars/env) SRCDIR vdir rcexp xpart dired OSTYPE ; (utils) greadlink gsed multihardlink texinfo CARGOFLAGS
7- # spell-checker:ignore openat TOCTOU CFLAGS
7+ # spell-checker:ignore openat TOCTOU CFLAGS tmpfs
88
99set -e
1010
@@ -171,6 +171,8 @@ grep -rl '\$abs_path_dir_' tests/*/*.sh | xargs -r "${SED}" -i "s|\$abs_path_dir
171171" ${SED} " -i ' s/^print_ver_.*/require_selinux_/' tests/runcon/runcon-no-reorder.sh
172172" ${SED} " -i ' s/^print_ver_.*/require_selinux_/' tests/chcon/chcon-fail.sh
173173
174+ # Mask mtab by unshare instead of LD_PRELOAD (able to merge this to GNU?)
175+ sed -i -e ' s|.*maybe LD_PRELOAD.*||' -e " s|^export LD_PRELOAD=.*|function df { unshare -rm bash -c 'mount -t tmpfs tmpfs /proc \&\& command df \"\$ @\" ' -- \"\$ @\" ; }|" tests/df/no-mtab-status.sh
174176# We use coreutils yes
175177" ${SED} " -i " s|--coreutils-prog=||g" tests/misc/coreutils.sh
176178# Different message
You can’t perform that action at this time.
0 commit comments