From: Janosch Frank <frankja@linux.ibm.com>
To: kvm@vger.kernel.org
Cc: linux-s390@vger.kernel.org, imbrenda@linux.ibm.com,
thuth@redhat.com, david@redhat.com, nrb@linux.ibm.com
Subject: [kvm-unit-tests PATCH 2/2] s390x: diag10: Check page clear
Date: Wed, 28 May 2025 09:13:50 +0000 [thread overview]
Message-ID: <20250528091412.19483-3-frankja@linux.ibm.com> (raw)
In-Reply-To: <20250528091412.19483-1-frankja@linux.ibm.com>
We should get a new page after we discarded the page.
So let's check for that.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
s390x/diag10.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/s390x/diag10.c b/s390x/diag10.c
index 00725f58..b68481ad 100644
--- a/s390x/diag10.c
+++ b/s390x/diag10.c
@@ -94,6 +94,16 @@ static void test_priv(void)
report_prefix_pop();
}
+static void test_content(void)
+{
+ report_prefix_push("content");
+ memset((void *)page0, 0x42, PAGE_SIZE);
+ memset((void *)page1, 0, PAGE_SIZE);
+ diag10(page0, page0);
+ report(!memcmp((void *)page0, (void *)page1, PAGE_SIZE), "Page cleared");
+ report_prefix_pop();
+}
+
int main(void)
{
report_prefix_push("diag10");
@@ -110,6 +120,7 @@ int main(void)
test_prefix();
test_params();
test_priv();
+ test_content();
out:
report_prefix_pop();
--
2.48.1
next prev parent reply other threads:[~2025-05-28 9:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-28 9:13 [kvm-unit-tests PATCH 0/2] s390x: diag10: Fixup Janosch Frank
2025-05-28 9:13 ` [kvm-unit-tests PATCH 1/2] s390x: diag10: Fence tcg and pv environments Janosch Frank
2025-05-28 9:41 ` Claudio Imbrenda
2025-05-28 11:13 ` Janosch Frank
2025-05-28 12:02 ` Claudio Imbrenda
2025-05-28 9:55 ` Thomas Huth
2025-05-28 10:59 ` Janosch Frank
2025-05-28 14:50 ` Nico Boehr
2025-05-28 9:13 ` Janosch Frank [this message]
2025-05-28 9:42 ` [kvm-unit-tests PATCH 2/2] s390x: diag10: Check page clear Claudio Imbrenda
2025-05-28 14:56 ` Nico Boehr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250528091412.19483-3-frankja@linux.ibm.com \
--to=frankja@linux.ibm.com \
--cc=david@redhat.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=nrb@linux.ibm.com \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).