2020-11-12 17:43:40

by Jeffrin Thalakkottoor

[permalink] [raw]
Subject: checking for "config" file existence.

hello,

i wrote a small program to check for the existence of "config" files
for testing projects under kselftest framework.

chmod 755 test_config.py
This file should be located in "tools/testing/selftests"
This can be run as "./test_config.py"



--
software engineer
rajagiri school of engineering and technology - autonomous




Attachments:
test_config.py (554.00 B)

2020-11-16 18:36:57

by Shuah Khan

[permalink] [raw]
Subject: Re: checking for "config" file existence.

On 11/12/20 10:40 AM, Jeffrin Jose T wrote:
> hello,
>
> i wrote a small program to check for the existence of "config" files
> for testing projects under kselftest framework.
>
> chmod 755 test_config.py
> This file should be located in "tools/testing/selftests"
> This can be run as "./test_config.py"
>
Why do we need a dedicated script when you can do it with:

cd tools/testing/selftests; find . -name config

I see that your script also prints if config doesn't exist.
It is not a failure not have config as config is necessary
only when a test has config option dependencies.

What does this script attempting to solve?

thanks,
-- Shuah


2020-11-17 02:01:00

by Jeffrin Thalakkottoor

[permalink] [raw]
Subject: Re: checking for "config" file existence.

On Mon, 2020-11-16 at 11:32 -0700, Shuah Khan wrote:
> On 11/12/20 10:40 AM, Jeffrin Jose T wrote:
> > hello,
> >
> > i wrote a small program to check for the existence of "config"
> > files
> > for testing projects under kselftest framework.
> >
> > chmod 755 test_config.py
> > This file should be located in "tools/testing/selftests"
> > This can be run as "./test_config.py"
> >
> Why do we need a dedicated script when you can do it with:
>
> cd tools/testing/selftests; find . -name config
>
> I see that your script also prints if config doesn't exist.
> It is not a failure not have config as config is necessary
> only when a test has config option dependencies.
>
> What does this script attempting to solve?

according to what you said this script may not be necessary
thanks for the explanation :)


--
software engineer
rajagiri school of engineering and technology - autonomous