From: Stefan Roesch <shr@devkernel.io>
To: David Hildenbrand <david@redhat.com>
Cc: kernel-team@fb.com, linux-mm@kvack.org, riel@surriel.com,
mhocko@suse.com, linux-kselftest@vger.kernel.org,
linux-doc@vger.kernel.org, akpm@linux-foundation.org,
hannes@cmpxchg.org, willy@infradead.org,
Bagas Sanjaya <bagasdotme@gmail.com>
Subject: Re: [PATCH v8 3/3] selftests/mm: add new selftests for KSM
Date: Mon, 17 Apr 2023 09:42:39 -0700 [thread overview]
Message-ID: <qvqw1qkibgtk.fsf@devbig1114.prn1.facebook.com> (raw)
In-Reply-To: <954d6b1f-5b4d-48e5-02fe-646b3e79f6e5@redhat.com>
David Hildenbrand <david@redhat.com> writes:
> On 17.04.23 16:35, David Hildenbrand wrote:
>>> +/* Verify that KSM can be enabled / queried with prctl. */
>>> +static void test_prctl(void)
>>> +{
>>> + int ret;
>>> +
>>> + ksft_print_msg("[RUN] %s\n", __func__);
>>> +
>>> + ret = prctl(PR_SET_MEMORY_MERGE, 1, 0, 0, 0);
>>> + if (ret < 0 && errno == EINVAL) {
>>> + ksft_test_result_skip("PR_SET_MEMORY_MERGE not supported\n");
>>> + return;
>>> + } else if (ret) {
>>> + ksft_test_result_fail("PR_SET_MEMORY_MERGE=1 failed\n");
>>> + }
>> Just realized we're missing a "return;" in case of the failure here.
>>
>
>
> And we should probably fix that as well:
>
> ERROR: do not initialise globals to 0
> #235: FILE: tools/testing/selftests/mm/ksm_tests.c:57:
> +int debug = 0;
>
> total: 1 errors, 0 warnings, 512 lines checked
I'll fix it in the next version.'
next prev parent reply other threads:[~2023-04-17 16:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-15 22:59 [PATCH v8 0/3] mm: process/cgroup ksm support Stefan Roesch
2023-04-15 22:59 ` [PATCH v8 1/3] mm: add new api to enable ksm per process Stefan Roesch
2023-04-17 15:00 ` David Hildenbrand
2023-04-17 16:36 ` Stefan Roesch
2023-04-15 22:59 ` [PATCH v8 2/3] mm: add new KSM process and sysfs knobs Stefan Roesch
2023-04-15 22:59 ` [PATCH v8 3/3] selftests/mm: add new selftests for KSM Stefan Roesch
2023-04-17 8:07 ` David Hildenbrand
2023-04-17 14:35 ` David Hildenbrand
2023-04-17 14:56 ` David Hildenbrand
2023-04-17 16:42 ` Stefan Roesch [this message]
2023-04-17 16:40 ` Stefan Roesch
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=qvqw1qkibgtk.fsf@devbig1114.prn1.facebook.com \
--to=shr@devkernel.io \
--cc=akpm@linux-foundation.org \
--cc=bagasdotme@gmail.com \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@fb.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=riel@surriel.com \
--cc=willy@infradead.org \
/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