public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>,
	 Robert O'Callahan <robert@ocallahan.org>,
	 "Dmitry V . Levin" <ldv@altlinux.org>
Subject: Re: [PATCH 3/6] sysvipc: Fix IPC_INFO and MSG_INFO handling [BZ #26639]
Date: Tue, 29 Sep 2020 15:01:23 +0200	[thread overview]
Message-ID: <873630ybx8.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: <cf8e2c81-b0d7-04fe-eb60-0c8e0bc8b7c4@linaro.org> (Adhemerval Zanella's message of "Tue, 29 Sep 2020 09:58:36 -0300")

* Adhemerval Zanella:

> On 29/09/2020 09:37, Adhemerval Zanella wrote:
>> 
>> 
>> On 29/09/2020 04:57, Florian Weimer wrote:
>>> * Adhemerval Zanella via Libc-alpha:
>>>
>>>> +static int
>>>> +read_proc_file (const char *file)
>>>> +{
>>>> +  FILE *f = fopen (file, "r");
>>>> +  if (f == NULL)
>>>> +    return -1;
>>>> +
>>>> +  int v;
>>>> +  int r = fscanf (f, "%d", & v);
>>>> +  TEST_VERIFY_EXIT (r == 1);
>>>> +
>>>> +  fclose (f);
>>>> +  return v;
>>>> +}
>>>
>>> You could use xfopen and xfclose.
>> 
>> Indeed, I will change it.
>
> In fact I though about it before and for this test we do want to 
> check if the /proc file is accessible and just check against the 
> tunable value if it were the case.  Otherwise the test will always
> fail if /proc is not mounted (not really the expected scenario I 
> give you).

Maybe add FAIL_UNSUPPORTED for this case at the start of the test?

Thanks,
Florian
-- 
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill


  reply	other threads:[~2020-09-29 13:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-28 14:45 [PATCH 1/6] sysvipc: Fix SEM_STAT_ANY kernel argument pass [BZ #26637] Adhemerval Zanella
2020-09-28 14:45 ` [PATCH 2/6] sysvipc: Return EINVAL for invalid semctl commands Adhemerval Zanella
2020-09-28 16:33   ` Florian Weimer
2020-09-28 21:07     ` Adhemerval Zanella
2020-09-28 14:45 ` [PATCH 3/6] sysvipc: Fix IPC_INFO and MSG_INFO handling [BZ #26639] Adhemerval Zanella
2020-09-28 14:55   ` Andreas Schwab
2020-09-29  7:57   ` Florian Weimer
2020-09-29 12:37     ` Adhemerval Zanella
2020-09-29 12:58       ` Adhemerval Zanella
2020-09-29 13:01         ` Florian Weimer [this message]
2020-09-29 13:04           ` Adhemerval Zanella
2020-09-28 14:45 ` [PATCH 4/6] sysvipc: Return EINVAL for invalid msgctl commands Adhemerval Zanella
2020-09-29  7:58   ` Florian Weimer
2020-09-29 13:26     ` Adhemerval Zanella
2020-09-29 17:05       ` Florian Weimer
2020-09-28 14:45 ` [PATCH 5/6] sysvipc: Fix IPC_INFO and SHM_INFO handling [BZ #26636] Adhemerval Zanella
2020-09-28 14:45 ` [PATCH 6/6] sysvipc: Return EINVAL for invalid shmctl commands Adhemerval Zanella
2020-09-28 14:59 ` [PATCH 1/6] sysvipc: Fix SEM_STAT_ANY kernel argument pass [BZ #26637] Florian Weimer
2020-09-28 21:06   ` Adhemerval Zanella

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=873630ybx8.fsf@oldenburg2.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=ldv@altlinux.org \
    --cc=libc-alpha@sourceware.org \
    --cc=robert@ocallahan.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).