The commit in comment #3 is actually not applied to the bionic tree.
Commit upstream 3aa415dd2128 (selftests: skip seccomp get_metadata test if not real root) depends on d057dc4e35e1 (seccomp: add a selftest for get_metadata), but the latter has been reverted on bionic as part of bug #1837664.
So the best solution is to revert c33a23ff8ffc, which is not needed.
The commit in comment #3 is actually not applied to the bionic tree.
Commit upstream 3aa415dd2128 (selftests: skip seccomp get_metadata test if not real root) depends on d057dc4e35e1 (seccomp: add a selftest for get_metadata), but the latter has been reverted on bionic as part of bug #1837664.
So the best solution is to revert c33a23ff8ffc, which is not needed.