Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • slapos slapos
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 131
    • Merge requests 131
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedinexedi
  • slaposslapos
  • Repository
  • slapos
  • component
  • golang
  • skip-chown-tests.patch
Find file BlameHistoryPermalink
  • Kirill Smelkov's avatar
    golang += patches to fix tests under user namespaces · 71ced145
    Kirill Smelkov authored Dec 06, 2021
    If we enter user namespace via regular unshare without help from SUID
    newuidmap/newgidmap, all supplementary groups are mapped to -1. As the result
    when Go test tries to chown to a supplementary group, it gets EINVAL:
    
    https://github.com/golang/go/issues/42525
    
    -> work it around with patch to skip this chown tests.
    
    A more proper, longer-term fix would be to fix Linux kernel to allow writes to
    /proc/self/gid_map to setup mapping not only to original gid, but to all
    original supplementary groups as well here:
    
    https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/user_namespace.c?id=v5.16-rc4-0-g0fcfb00b28c0#n1143
    
    this fix, even if accepted by upstream, would be long to be waited for to
    propagate to distribution kernels that we currently use. So we go with this
    workaround for now.
    
    --------
    
    Another patch is to fix the following TestSCMCredentials failure:
    
        === RUN   TestSCMCredentials
            creds_test.go:81: WriteMsgUnix ...
    71ced145
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7