From patchwork Mon Apr 7 22:59:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "T.J. Mercier" X-Patchwork-Id: 878866 Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E547922488E for ; Mon, 7 Apr 2025 22:59:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744066798; cv=none; b=AxVVzOyAjU0y8TSjDiS/D4JEt25HF2dwqVaoPPnHGFMylXkKhltRv3GQWimFBJ1ovHTOVDcvjxeuuCD+D5niKPzxYjMcM4wdVMVli5Fz/LX6rR5xgbegavwa5znsbdMi0qOuRGmQ+fj/InJn2H3kJdVylf26e2XZY0gKUAGjgOA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744066798; c=relaxed/simple; bh=5LbPyCNLLcTj5RpphsHDzbLID3Tqav0FNxp4F98aH8g=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=DtZBFchYHIV8ty87cMIPZO3nnvw4ZOHL3+IbRUYEXclILny5M8vIwxbAGyBwWjwkKMnP7CtosAOs7WJCBPu/EvdbAkigsv/Y+3x4g9Mz6qrsyzqqPpc5n6Z1pGDi9halYwMKIi7DpQ6uJsBEkdJhMlJQAA3HarCMTsd7gV8Wvlk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--tjmercier.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=tsEbvlNy; arc=none smtp.client-ip=209.85.214.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--tjmercier.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="tsEbvlNy" Received: by mail-pl1-f202.google.com with SMTP id d9443c01a7336-225429696a9so70164895ad.1 for ; Mon, 07 Apr 2025 15:59:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1744066796; x=1744671596; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id :mime-version:date:from:to:cc:subject:date:message-id:reply-to; bh=tmFTd+75mDki530ZTm5rh5SILZIWEG1jv3Vb3IWwElo=; b=tsEbvlNyehmbqFR4/suebCqNArg3BU9GTqqBnvYKnkF3RtVx0gkeCGzc5QtIKQdbCT IxyiyWrcZ7jlNnWqysXej/+JE1DHCDLwk4nrtQ3GL7Ca4OIi8bPhzkD4CB0txJec78Y1 +6AFNEn9zBn4Y5ZfWsgmcutMUosASvXBzf46J8JknADoDshrgwqrxLObzHQ3ud2Pn+zx CKwIPe+/dUHhhQKdQZiDRm9PyJfhJuedllMctpUL28VjDBUy/Pb3gip9CLgFHmbnt623 ndaP0FGTsXCaVKveD7oTXOKSmEixvjDt/AUQh3EFbEPuYxow3nonJV855qp7TQcp2u5q UXaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744066796; x=1744671596; h=content-transfer-encoding:cc:to:from:subject:message-id :mime-version:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=tmFTd+75mDki530ZTm5rh5SILZIWEG1jv3Vb3IWwElo=; b=s47M3bLzpDZ/GqoVHrpvPq5ttVlvuWMculHRU/enHhRtYYPs32e1MdpJm5dsb8Jjf/ d0FrOX4rTg7YNMQI/SnpE3061U+2dBS+ODLPcoBBfzuG/W7DgQTZHCZlMGhMVTs24zrA 1CaSO4QIG5wQJKM2TPKxVIffkjzav6uQnRfLIl5C0L0qwOaY9DE34Y9xs9MVw+zSElWe sIN/b2gVrmDqwPrhTJuXic+wqr+lucrOtL6NxP5V6N24QrZceO/b3ncRDG+xwQP24Vjr cUCvTRpmRxU7lNWGZD/zsuvyaa3Vq0KD9+Q4zpyqv5l7QqSUz73XdjPewBceg0aBLUb3 3+2g== X-Forwarded-Encrypted: i=1; AJvYcCU/fxRjasXLub5qxd3QQ8P6tkphmQz7Ula4mY9cqNdxYeEbtQ7lx35XSvkG5QoKfUGsBwO6qxPj5kGO8vvqgD0=@vger.kernel.org X-Gm-Message-State: AOJu0YwJpgQWtX/xgI3mTGaTbpiTJdmtAT1Y+rk0M76iKq8CzPzIKaC5 OLbmCdL0n6sWxo+lhqNgfUMTUqoN1U3+IddeEDiXq2mnXlIW0VqCSGp8QVnkpFb0XM4hXEQ6vKF YZdmLQJ8QKj+rvw== X-Google-Smtp-Source: AGHT+IFskHOxsSaypr7Z498msZSpofqWjjn89muNo0ISrDKVaEqeO6DZKPcTGrC/EZ6umNznNFtR46hyuWZumVA= X-Received: from pfgs3.prod.google.com ([2002:a05:6a00:1783:b0:736:6fb6:7fc]) (user=tjmercier job=prod-delivery.src-stubby-dispatcher) by 2002:a17:903:32c1:b0:227:e74a:a063 with SMTP id d9443c01a7336-22a8a0a3a2dmr182684035ad.37.1744066796203; Mon, 07 Apr 2025 15:59:56 -0700 (PDT) Date: Mon, 7 Apr 2025 22:59:51 +0000 Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.49.0.504.g3bcea36a83-goog Message-ID: <20250407225953.1540476-1-tjmercier@google.com> Subject: [PATCH] tests/pid_namespace: Add missing sys/mount.h From: "T.J. Mercier" To: Christian Brauner , Shuah Khan , Alexander Mikhalitsyn Cc: "T.J. Mercier" , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org pid_max.c: In function ‘pid_max_cb’: pid_max.c:42:15: error: implicit declaration of function ‘mount’ [-Wimplicit-function-declaration] 42 | ret = mount("", "/", NULL, MS_PRIVATE | MS_REC, 0); | ^~~~~ pid_max.c:42:36: error: ‘MS_PRIVATE’ undeclared (first use in this function); did you mean ‘MAP_PRIVATE’? 42 | ret = mount("", "/", NULL, MS_PRIVATE | MS_REC, 0); | ^~~~~~~~~~ | MAP_PRIVATE pid_max.c:42:49: error: ‘MS_REC’ undeclared (first use in this function) 42 | ret = mount("", "/", NULL, MS_PRIVATE | MS_REC, 0); | ^~~~~~ pid_max.c:48:9: error: implicit declaration of function ‘umount2’; did you mean ‘SYS_umount2’? [-Wimplicit-function-declaration] 48 | umount2("/proc", MNT_DETACH); | ^~~~~~~ | SYS_umount2 pid_max.c:48:26: error: ‘MNT_DETACH’ undeclared (first use in this function) 48 | umount2("/proc", MNT_DETACH); Fixes: 615ab43b838b ("tests/pid_namespace: add pid_max tests") Signed-off-by: T.J. Mercier --- tools/testing/selftests/pid_namespace/pid_max.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/pid_namespace/pid_max.c b/tools/testing/selftests/pid_namespace/pid_max.c index 51c414faabb0..96f274f0582b 100644 --- a/tools/testing/selftests/pid_namespace/pid_max.c +++ b/tools/testing/selftests/pid_namespace/pid_max.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include "../kselftest_harness.h"