Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp5897117rdb; Mon, 1 Jan 2024 00:36:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IGXO++51wWu6NqMvYa7VWRr1KTNwIlMQ/dAbuU6bjelXUTLZcutfMUMEpVFb6wAM4TqcD0u X-Received: by 2002:a05:6402:2064:b0:553:a78c:ff2f with SMTP id bd4-20020a056402206400b00553a78cff2fmr8701271edb.84.1704098212305; Mon, 01 Jan 2024 00:36:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704098212; cv=none; d=google.com; s=arc-20160816; b=SmWtXy7fAJY9x7h+h6PPtMn9xuX5tP/nZbioKGIVGlhGnZ1kaBPuqKSEr+jOMbBVC8 gkPTTj7wYElILoPNPhWyiUQ2d97PQu28oI7QJydnt4er0SdXAmmWIK8py1Fn1C+TSPFO EjP7rIF1u7EWIHBt1L+jV8QYQXkfjLm87bHohe2ZvCq+0Tbnn5043knlXLFZDgYFRHWx CVyZJLzZtGNK+OxkrVTUEi/48CElhbtShyrsVhBQuEjtsfpyxuAVZf4Fg9WvgUxrGx9m bNlHqkr7gMbxN0p+eTo+emOJ2FBnmBdux2ZHr4O9wbETDvUa2pJFlWdO5D0+tABqcsqc wkGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=fXgVIMW3zsuKjeqFUyQYUY8CiLbJ9ZJoTUgFE6XA/tI=; fh=mVBrUHkdhr4FdAuGFuDLONjpBFXQ76Q1/p1ghTG2QxI=; b=JFxAFZf69ygPRpjN1ypBc/TAQC+XTkYpBj02OhMCTPHFrYviI7Yy+7f2j/D8eGqpjd SPn7+Pr9JaS2Ve52lObeMyCBGepFbO1pFXIt9osXTP5x0hYe7KbSnZMezSpSpPwWEH7I wUF1lYLciiMIt6V01JtoZFNuSBp7UF/Sk1dbmwHEOG9CK3TnTrMOevNH0m+NvnL1MEO0 QyxJXzr/xyy50mIst8/bnlTnS4gtpFwx71jqukRMgMkr9LjNd9QkNg7IpTVSRb9Bho5D 0bdxW9HRRMRhgSYjVui4rRN5iDqknrc0cMKvauvhY2Uvu88eEhMY6UNkcjOZswoMtJ45 DUDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="mJ5H00/h"; spf=pass (google.com: domain of linux-kernel+bounces-13839-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13839-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id b21-20020a50ccd5000000b00553f946c1casi10615977edj.354.2024.01.01.00.36.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jan 2024 00:36:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13839-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="mJ5H00/h"; spf=pass (google.com: domain of linux-kernel+bounces-13839-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13839-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id BF6921F22693 for ; Mon, 1 Jan 2024 08:36:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8579333E8; Mon, 1 Jan 2024 08:36:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="mJ5H00/h" X-Original-To: linux-kernel@vger.kernel.org Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 53269210B; Mon, 1 Jan 2024 08:36:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1704098183; bh=giHGWwDeltvyjzRJyE60kEU8wo+8AOWtU2n4rpsZokA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mJ5H00/hzYa7ecJ8yDwgc+W5yoNyAGqahFf2l+LnINskO8F7x2swpkhkcqzQeuomo wy5BCXS+iB16I2qtXXD0d5R36w5bYjTWwtXhjZse9YYzyOedJ/mJrIRiyAejGk4hPX QQVNXSuyTOGs9fvp8JPi5WWbT8hOO0c9YiuGy3Un1Eff82GApXYA6XuNPHO/VxYgUk HMBxwUdf32sqyIt/1lhe407G2ciTAmHBgWtTseS4kornAhmbqSRGBkGrVGWN+0xkfD ePybNEAuihCMN8hf9k4dw04GkfAl71aelQ5iEUnuh9phQQNB0v3Nqe8tifym2B3QAE zcT/Uq4MH85Nw== Received: from localhost.localdomain (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: usama.anjum) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 6592B3780894; Mon, 1 Jan 2024 08:36:20 +0000 (UTC) From: Muhammad Usama Anjum To: Andrew Morton , Shuah Khan Cc: Muhammad Usama Anjum , kernel@collabora.com, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] selftests/mm: skip test if application doesn't has root privileges Date: Mon, 1 Jan 2024 13:36:13 +0500 Message-ID: <20240101083614.1076768-2-usama.anjum@collabora.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240101083614.1076768-1-usama.anjum@collabora.com> References: <20240101083614.1076768-1-usama.anjum@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The test depends on writing to nr_hugepages which isn't possible without root privileges. So skip the test in this case. Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/mm/compaction_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/mm/compaction_test.c b/tools/testing/selftests/mm/compaction_test.c index 707b0809b717..656afba02dbc 100644 --- a/tools/testing/selftests/mm/compaction_test.c +++ b/tools/testing/selftests/mm/compaction_test.c @@ -173,7 +173,7 @@ int main(int argc, char **argv) ksft_print_header(); - if (prereq() != 0) + if (prereq() || geteuid()) return ksft_exit_pass(); ksft_set_plan(1); -- 2.42.0