mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: "Maciej Wieczór-Retman" <maciej.wieczor-retman@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>, Shuah Khan <shuah@kernel.org>,
	<ilpo.jarvinen@linux.intel.com>, <linux-kernel@vger.kernel.org>,
	<linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH RESEND v3 1/2] selftests/resctrl: Fix schemata write error check
Date: Tue, 12 Sep 2023 09:00:28 -0700	[thread overview]
Message-ID: <a7f0dfb9-c841-b240-fca9-b908517a44d0@intel.com> (raw)
In-Reply-To: <sr6ana6d7ebtuxbhjuo6kcnhnn2zzvg3ivve6mndqeb3nxrzo7@mrfmtzlxlwdh>

Hi Maciej,

On 9/11/2023 11:32 PM, Maciej Wieczór-Retman wrote:
> On 2023-09-11 at 09:59:06 -0700, Reinette Chatre wrote:
>> Hi Maciej,
>> When I build the tests with this applied I encounter the following:
>>
>> resctrlfs.c: In function ‘write_schemata’:
>> resctrlfs.c:475:14: warning: implicit declaration of function ‘open’; did you mean ‘popen’? [-Wimplicit-function-declaration]
>>  475 |         fd = open(controlgroup, O_WRONLY);
>>      |              ^~~~
>>      |              popen
>> resctrlfs.c:475:33: error: ‘O_WRONLY’ undeclared (first use in this function)
>>  475 |         fd = open(controlgroup, O_WRONLY);
>>      |                                 ^~~~~~~~
>> resctrlfs.c:475:33: note: each undeclared identifier is reported only once for each function it appears in
> 
> Hmm, that's odd. How do you build the tests?

I applied this series on top of kselftest repo's "next" branch.

I use a separate build directory and first ran "make headers". After that,
$ make O=<build dir> -C tools/testing/selftests/resctrl

> I use "make -C tools/testing/selftests/resctrl" while in the root kernel
> source directory. I tried to get the same error you experienced by
> compiling some dummy test program with "open" and "O_WRONLY". From the
> experiment I found that the "resctrl.h" header provides the declarations
> that are causing your errors.

From what I can tell resctrl.h does not include fcntl.h that provides
what is needed.

Reinette

  reply	other threads:[~2023-09-12 16:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-01 13:41 [PATCH RESEND v3 0/2] selftests/resctrl: Bug fix and optimization Wieczor-Retman Maciej
2023-09-01 13:42 ` [PATCH RESEND v3 1/2] selftests/resctrl: Fix schemata write error check Wieczor-Retman Maciej
2023-09-11 16:59   ` Reinette Chatre
2023-09-12  6:32     ` Maciej Wieczór-Retman
2023-09-12 16:00       ` Reinette Chatre [this message]
2023-09-13  5:59         ` Maciej Wieczór-Retman
2023-09-13 18:49           ` Reinette Chatre
2023-09-14  6:01             ` Maciej Wieczór-Retman
2023-09-14 15:14               ` Reinette Chatre
2023-09-15  8:16                 ` Maciej Wieczór-Retman
2023-09-01 13:42 ` [PATCH RESEND v3 2/2] selftests/resctrl: Move run_benchmark() to a more fitting file Wieczor-Retman Maciej
2023-09-11 16:59   ` Reinette Chatre
2023-09-12  6:34     ` Maciej Wieczór-Retman

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=a7f0dfb9-c841-b240-fca9-b908517a44d0@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=fenghua.yu@intel.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=maciej.wieczor-retman@intel.com \
    --cc=shuah@kernel.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

all inboxes | Powered by JetHome®