[RFC,01/10] KVM: selftests: Test error message fixes for memfd_restricted selftests
Message ID | 017a3f68ef7007d72f167f937fabd6d64efb9edc.1678926164.git.ackerleytng@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp207588wrt; Wed, 15 Mar 2023 17:43:11 -0700 (PDT) X-Google-Smtp-Source: AK7set/L9N7Lc/iIFKkO1A3VFs4wbhFtlOYXeQG/AT2xQIv+GxeUrDZ0ODk0T2TG7PPfqCk+3GX/ X-Received: by 2002:a62:5286:0:b0:624:8819:64c7 with SMTP id g128-20020a625286000000b00624881964c7mr1424866pfb.11.1678927390710; Wed, 15 Mar 2023 17:43:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678927390; cv=none; d=google.com; s=arc-20160816; b=uRwR11Fx4Q3su5yC8EZexywkd1VfNA5M8txzscRtdHzJQmrjrUb7QDnHXtHdxOvEBK Zf1/GCULOrqNvGcuDDA2awzubxAKQ7dm2oFVvtGubsT6eaTz5ETGN+IhsnET9FuCqaxO wnbQJpi/Gr9IR+c9jaNlw0Pcp7RG3Y6fpUoNd0u4BBI5JsCTQFN3DXJAe//lMJkUM+Gx s4AzexPuVg264nJ9Cy+UTQOcGIQhIYPwvOZSBnXkHi+G/Tv/8fgYIvN/OQJFIpLc6i+Q On/erWZDoMZjXxD1Eg2WsThPp+kCoh5abtXLBs9hSw1V9Uhya7++0yDvMcbTGUiqZBGo tW8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=rreqZKmQJtCTOHmDtxKTKEfGS9dImrAo0RCl95Sk/EE=; b=GAAHpQufus9nl0q0FcyNF05MlWwttv8Kc/0jOUaR4e0szv8XMmjzsJZRP5vbgHCKDY 2z0KWTf3AWK1/Qx8pvXntMn6oOk4lp8MRqQHk3anmsTm5JgIIKv9/QT/YYZIlZiFREqe AFZ1qXY+V4vJFgSeqaWA4ROnPFauGZwrUlO1zRIGK5biENmavCntYCLMJNKhjU4foejW qp1EUQcm8dk9EWfCXPh2M6g/IFSiNnStMvfVz4OVLcOh/r5ivmhp/mwcuYTXYZR49cf1 fawu9cP5v9xq0RcnQFzCuk2QUahSr3atkyqbJN0CZ/R6gUvq9Q9ig3hBlWUClDoF5m7k VS2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=JJueoK7s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r20-20020a6560d4000000b00508caaf69besi6124428pgv.862.2023.03.15.17.42.58; Wed, 15 Mar 2023 17:43:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=JJueoK7s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233185AbjCPAbe (ORCPT <rfc822;ruipengqi7@gmail.com> + 99 others); Wed, 15 Mar 2023 20:31:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233082AbjCPAb2 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 15 Mar 2023 20:31:28 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E17EEA0F13 for <linux-kernel@vger.kernel.org>; Wed, 15 Mar 2023 17:31:18 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id e129-20020a251e87000000b00b56598237f5so94478ybe.16 for <linux-kernel@vger.kernel.org>; Wed, 15 Mar 2023 17:31:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1678926677; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=rreqZKmQJtCTOHmDtxKTKEfGS9dImrAo0RCl95Sk/EE=; b=JJueoK7sdFHQHbdAl5nsqaNs4KCHm7sHzvLB42MnoY5lkfM6ZyYxqRBfJSJa8Yj0AO a2uaVznX+a7AGF4HtGGnVlQphXnV9jEi1nR4tPRumBxVDCE+WOnyJKaxZt8wQIJXoXkp loUdl05RrEtBxZJ1mxGOVb+Igf7OXAXS6g5lENKD5GhCbaaHIbFWr/+X13ZJvgEAeOrT ejL8r4WfIiMkFavlKyXDdwKqsnArh0+uyWf18MM3tbJLCmk8NSuRhA6hTr60P2bZx80K jj0hiuo3QlpYfzngCqcd5OQKvr0RQN1Z1ORNuOh1qFkI0/mHIDpESFq+n7v7NaT1lIXl wVMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678926677; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rreqZKmQJtCTOHmDtxKTKEfGS9dImrAo0RCl95Sk/EE=; b=FBWME9uujxNniHIccvDOXC8T3JN94E0r3121WUYtC3Eud1oqkG9bmQcxc9Tc96MsNP rQO1RXHYzxkrvZuaITsDTVVMZg661AE18jwjJz5Ih8keu69pGETxx9lYQ5fdbxD7Upb3 Xn5b5XBVoqJ0GNAWnttCEtQtg4zkR0S0D0SNyoD8rUYBdhqgkwZj5KTgkltvFM2GdPD8 FoCSte1qA1LVE5ghjQE/XbQ2RnhM9xqpWhknkqwNHQ9zeXPqtwvDQUje0e93EXR9d9nb vgmWkW+qSSJAfHpYvo9KEy06JCf88yj3In9GoIykxSaCg4YzMBeRWft3ydJJ3eiGJ4cb xauQ== X-Gm-Message-State: AO0yUKWJowVibXitNYWnwN95Tm8VfEYfZNcFfHYfe2Ugr10YWwmfzYOP KAzcgWnSwfbkWjZxJe4b4RBqG/fcNCbSfD+oLg== X-Received: from ackerleytng-cloudtop.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:1f5f]) (user=ackerleytng job=sendgmr) by 2002:a25:e201:0:b0:b2e:f387:b428 with SMTP id h1-20020a25e201000000b00b2ef387b428mr12671962ybe.5.1678926677076; Wed, 15 Mar 2023 17:31:17 -0700 (PDT) Date: Thu, 16 Mar 2023 00:30:54 +0000 In-Reply-To: <cover.1678926164.git.ackerleytng@google.com> Mime-Version: 1.0 References: <cover.1678926164.git.ackerleytng@google.com> X-Mailer: git-send-email 2.40.0.rc2.332.ga46443480c-goog Message-ID: <017a3f68ef7007d72f167f937fabd6d64efb9edc.1678926164.git.ackerleytng@google.com> Subject: [RFC PATCH 01/10] KVM: selftests: Test error message fixes for memfd_restricted selftests From: Ackerley Tng <ackerleytng@google.com> To: kvm@vger.kernel.org, linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, qemu-devel@nongnu.org Cc: aarcange@redhat.com, ak@linux.intel.com, akpm@linux-foundation.org, arnd@arndb.de, bfields@fieldses.org, bp@alien8.de, chao.p.peng@linux.intel.com, corbet@lwn.net, dave.hansen@intel.com, david@redhat.com, ddutile@redhat.com, dhildenb@redhat.com, hpa@zytor.com, hughd@google.com, jlayton@kernel.org, jmattson@google.com, joro@8bytes.org, jun.nakajima@intel.com, kirill.shutemov@linux.intel.com, linmiaohe@huawei.com, luto@kernel.org, mail@maciej.szmigiero.name, mhocko@suse.com, michael.roth@amd.com, mingo@redhat.com, naoya.horiguchi@nec.com, pbonzini@redhat.com, qperret@google.com, rppt@kernel.org, seanjc@google.com, shuah@kernel.org, steven.price@arm.com, tabba@google.com, tglx@linutronix.de, vannapurve@google.com, vbabka@suse.cz, vkuznets@redhat.com, wanpengli@tencent.com, wei.w.wang@intel.com, x86@kernel.org, yu.c.zhang@linux.intel.com, Ackerley Tng <ackerleytng@google.com> Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760482967305647113?= X-GMAIL-MSGID: =?utf-8?q?1760482967305647113?= |
Series |
Additional selftests for restrictedmem
|
|
Commit Message
Ackerley Tng
March 16, 2023, 12:30 a.m. UTC
Signed-off-by: Ackerley Tng <ackerleytng@google.com>
---
tools/testing/selftests/vm/memfd_restricted.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/vm/memfd_restricted.c b/tools/testing/selftests/vm/memfd_restricted.c index 3a556b570129..43a512f273f7 100644 --- a/tools/testing/selftests/vm/memfd_restricted.c +++ b/tools/testing/selftests/vm/memfd_restricted.c @@ -49,12 +49,12 @@ static void test_file_size(int fd) } if (sb.st_size != page_size) { - fail("unexpected file size after ftruncate"); + fail("unexpected file size after ftruncate\n"); return; } if (!ftruncate(fd, page_size * 2)) { - fail("unexpected ftruncate\n"); + fail("size of file cannot be changed once set\n"); return; }