If we run case on old kernel that doesn't support mount_setattr and then fail on our own function before call is_setgid/is_setuid function to reset errno, run_test will print "Function not implement" error. Signed-off-by: Yang Xu <xuyang2018.jy@xxxxxxxxxxx> --- src/idmapped-mounts/idmapped-mounts.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/idmapped-mounts/idmapped-mounts.c b/src/idmapped-mounts/idmapped-mounts.c index 4cf6c3bb..8e6405c5 100644 --- a/src/idmapped-mounts/idmapped-mounts.c +++ b/src/idmapped-mounts/idmapped-mounts.c @@ -14070,6 +14070,8 @@ int main(int argc, char *argv[]) die("failed to open %s", t_mountpoint_scratch); t_fs_allow_idmap = fs_allow_idmap(); + /* don't copy ENOSYS errno to child process on older kernel */ + errno = 0; if (supported) { /* * Caller just wants to know whether the filesystem we're on -- 2.27.0