Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lkft-android: add cts vts templates for android-mainline projects #247

Merged
merged 2 commits into from
Jul 13, 2023

Conversation

liuyq
Copy link
Contributor

@liuyq liuyq commented Mar 31, 2023

The cts vts templates added here are generic templates which will be used by many other projects as well

@liuyq liuyq force-pushed the android-upstream-cts-vts branch 4 times, most recently from c58b939 to 8f1612b Compare April 3, 2023 05:38
@roxell
Copy link
Collaborator

roxell commented Apr 4, 2023

maybe do something similar with cts/vts like kselftest and/or ltp does?
look in testcases/(kselftest|ltp)*.yaml and in testcases/master/template-(kselftest|ltp).yaml.jinja2

@liuyq
Copy link
Contributor Author

liuyq commented Apr 5, 2023

maybe do something similar with cts/vts like kselftest and/or ltp does? look in testcases/(kselftest|ltp)*.yaml and in testcases/master/template-(kselftest|ltp).yaml.jinja2

I think the current changes are after the reference to the kselftest/ltp files, which parts you think still need to be updated?

@roxell
Copy link
Collaborator

roxell commented Apr 5, 2023

maybe do something similar with cts/vts like kselftest and/or ltp does? look in testcases/(kselftest|ltp)*.yaml and in testcases/master/template-(kselftest|ltp).yaml.jinja2

I think the current changes are after the reference to the kselftest/ltp files, which parts you think still need to be updated?

Yes, have a master/template-...yaml.jinja2 file and then work from there like kselftest/ltp and others does it.

@liuyq
Copy link
Contributor Author

liuyq commented Apr 5, 2023

Yes, have a master/template-...yaml.jinja2 file and then work from there like kselftest/ltp and others does it.

it's OK to move lava_test_plans/testcases/android-cts.yaml and lava_test_plans/testcases/android-cts.yaml to lava_test_plans/testcases/master/template-android-cts.yaml and lava_test_plans/testcases/master/template-android-vts.yaml,
and make the testcases in lkft-android to extends them, if you meant that.

do you have any comments on the content of the files besides the path change?

@roxell
Copy link
Collaborator

roxell commented Apr 12, 2023

no, thats not what I meant. what I mean is that you can have one file for both vts and cts inside testcases/master/template-android-blah.yaml
and then call that file from testcases/android-vts.yaml and also testcases/android-cts.yaml

@roxell
Copy link
Collaborator

roxell commented Apr 12, 2023

http://ix.io/4tfv maybe something like this, then it starts to look like kselftest or ltp and others....

@@ -0,0 +1,13 @@
{% extends "testcases/master/template-android-xts.jinja2" %}

{% if TEST_CTS_URL is defined %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you shouldn't need this if.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@@ -0,0 +1,13 @@
{% extends "testcases/master/template-android-xts.jinja2" %}

{% if TEST_VTS_URL is defined %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you shouldn't need this if either.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@@ -0,0 +1,46 @@
{% extends "testcases/master/template-master.jinja2" %}

{% if xts_test_url is defined %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed here either or

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

{% endblock metadata %}

{% block test_target %}
{% if TEST_XTS_URL is defined %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't be needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

path: {{xts_test_definition_path}}
params:
TEST_PARAMS: {% block xts_test_params %}{{xts_test_params}}{% endblock xts_test_params %}
TEST_URL: "{{TEST_XTS_URL}}/{{xts_pkg_name}}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be test_xts_url and not TEST_XTS_URL

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, updated

@liuyq liuyq force-pushed the android-upstream-cts-vts branch 2 times, most recently from 3a1d16f to a295023 Compare April 14, 2023 08:25
@@ -11,7 +11,10 @@

# all tests all devices
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe change this to "# all Linux tests all devices".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

testcases = [ os.path.basename(d) \
for d in glob.glob("lava_test_plans/testcases/*.yaml") \
if not d.startswith("lava_test_plans/testcases/android-")
]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe like this

-testcases = [os.path.basename(d) for d in glob.glob("lava_test_plans/testcases/.yaml")]
+testcases = [os.path.basename(d) for d in glob.glob("lava_test_plans/testcases/[!android-]
.yaml")]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it works with "[!android-]*.yaml"", but I could not read it as [] are normally used for ranges:(


{% set test_timeout = 480 %}
{% set test_name = "cts-lkft" %}
{% set cts_test_plan = "cts-lkft" %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what makes this a cts-lkft test and not just a regular cts test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non lkft-android project does not need to run this job. or say they might have their plans on what test modules to be run.

{## the test_suite_name is a part of the path of the lava result ##}
{% set xts_test_suite_name = xts_test_suite_name|default(test_name) %}
{% set xts_test_path = xts_test_path|default("xts-path") %}
{% set xts_pkg_name = xts_pkg_name|default("android-xts.zip") %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like the path and zip file is more or less the same... maybe drop one variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's keep two variables here, the zip file name is not always like android-cts.zip, there are other places do the renaming for the current setup, maybe some time later the workaround there could be dropped


{% block metadata %}
{{ super() }}
{{xts_metadata_prefix}}-url: "{{ xts_test_url }}/android-cts.zip"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xts_pkg_name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! updated.

--include-filter CtsSystemUiRenderingTestCases
--include-filter CtsUsbTests
--disable-reboot
{% endblock xts_test_params %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this as a different android-cts-no-bionic-libcore.yaml test in the testcases directory.
Same with the others.
And not in the projects/lkft-android/ dir.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there will be more workaround files like this to be added later, they are just specific to the lkft-android project or even specific to some android version of some device like the x15 master version here. it's better to put such files under the lkft-android project. otherwise it will make the testcases directory messy with many such one case specific files there.

@liuyq liuyq force-pushed the android-upstream-cts-vts branch 6 times, most recently from 73059ce to f1017ab Compare April 21, 2023 10:57
{% set xts_test_suite_name = xts_test_suite_name|default("cts-lkft") %}
{% set xts_test_path = xts_test_path|default("android-cts") %}
{% set xts_pkg_name = xts_pkg_name|default("android-cts.zip") %}
{% set xts_expect_reboot = xts_expect_reboot|default(false) %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed. just remove the line

{% extends "testcases/android-cts.yaml" %}

{% set test_timeout = 480 %}
{% set test_name = "cts-lkft" %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what makes this a lkft job?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not get your point, why do you think it is not a lkft job?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what makes these jobs lkft specific or can 'lkft' be dropped from the test_name ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you could see there are a list of modules specified here, it's called the cts-lkft test plan, which is specific to the lkft project as it's defined by the lkft project,

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, 1, random cts include-filters enabled that we decided are good to enable, cts-lkft isn't a describing name for this testcase. lkft in the testcase at all isn't describing for what the test does.
lkft is a project not a testcase.

  1. that you have cts-lkft as a test_name in two different test will mess up the results in LAVA right? Two suites with the same name or?

Copy link
Contributor Author

@liuyq liuyq May 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. this test case and others are only for the lkft project, and cts-lkft is currently used to described that since the beginning, lkft is a project name, but why it could not be used to define the testcase?
  2. yes, which is required to find the history path in squad automatically.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are correct.

However, its not needed to have cts-lkft in the job-name, since if you look at how that is built up there is already project which contains lkft-android...

And the filename should probably not be named android-cts-lkft.yaml either.
Yes its the lkft project that have defined this set of include-filters in some way.
Either add a more descriptive name or maybe call it cts-smoke since that's what it looks like.
Since you said that you will add more cts tests, like android-cts-part1, android-cts-part2, android-cts-part3... android-cts-partN.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cts-lkft is the best option for both the job name and the file name here.
smoke is a generic name that should be able to be used for any projects,
This is the cts-lkft plan, for the lkft project, other projects could use it, but it's still the cts-lkft test plan.

{% set xts_test_suite_name = xts_test_suite_name|default("cts-lkft") %}
{% set xts_test_path = xts_test_path|default("android-cts") %}
{% set xts_pkg_name = xts_pkg_name|default("android-cts.zip") %}
{% set xts_metadata_prefix = xts_metadata_prefix|default("cts") %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move this file to lava_test_plans/testcases/master/template-android-cts.jinja2
and make it a template.

{% set xts_test_path = xts_test_path|default("android-vts") %}
{% set xts_pkg_name = xts_pkg_name|default("android-vts.zip") %}
{% set xts_expect_reboot = xts_expect_reboot|default(true) %}
{% set xts_metadata_prefix = xts_metadata_prefix|default("vts") %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move this file to lava_test_plans/testcases/master/template-android-vts.jinja2
and make it a template.

{% set xts_result_format = xts_result_format|default("aggregated") %}
{% set xts_test_definition_path = xts_test_definition_path|default("automated/android/noninteractive-tradefed/tradefed.yaml") %}
{% set xts_metadata_prefix = xts_metadata_prefix|default('xts') %}
{% set xts_version = xts_version|default("xts-version-unknown") %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of the "dummy defaults" isn't needed here.
Since you said that people should use the template-android-(c|v)ts.jinja2 and not the xtx.jinja2 template.

@liuyq liuyq force-pushed the android-upstream-cts-vts branch from 95bac6e to 416f30a Compare May 31, 2023 03:31
{% extends "testcases/android-cts.yaml" %}

{% set test_timeout = 480 %}
{% set test_name = "cts-lkft" %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, 1, random cts include-filters enabled that we decided are good to enable, cts-lkft isn't a describing name for this testcase. lkft in the testcase at all isn't describing for what the test does.
lkft is a project not a testcase.

  1. that you have cts-lkft as a test_name in two different test will mess up the results in LAVA right? Two suites with the same name or?

@liuyq liuyq force-pushed the android-upstream-cts-vts branch from 416f30a to 56b277c Compare June 1, 2023 08:28
@liuyq liuyq force-pushed the android-upstream-cts-vts branch from 56b277c to c96f63e Compare June 1, 2023 10:59
{% extends "testcases/android-cts.yaml" %}

{% set test_timeout = 480 %}
{% set test_name = "cts-lkft" %}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are correct.

However, its not needed to have cts-lkft in the job-name, since if you look at how that is built up there is already project which contains lkft-android...

And the filename should probably not be named android-cts-lkft.yaml either.
Yes its the lkft project that have defined this set of include-filters in some way.
Either add a more descriptive name or maybe call it cts-smoke since that's what it looks like.
Since you said that you will add more cts tests, like android-cts-part1, android-cts-part2, android-cts-part3... android-cts-partN.

@liuyq liuyq force-pushed the android-upstream-cts-vts branch from c96f63e to 45ef45e Compare June 2, 2023 02:09
@roxell
Copy link
Collaborator

roxell commented Jun 7, 2023

Please address this comment too.

However, its not needed to have cts-lkft in the job-name, since if you look at how that is built up there is already project which contains lkft-android...

And the filename should probably not be named android-cts-lkft.yaml either.
Yes its the lkft project that have defined this set of include-filters in some way.
Either add a more descriptive name or maybe call it cts-smoke since that's what it looks like.
Since you said that you will add more cts tests, like android-cts-part1, android-cts-part2, android-cts-part3... android-cts-partN.

@vishalbhoj
Copy link
Contributor

Please address this comment too.

However, its not needed to have cts-lkft in the job-name, since if you look at how that is built up there is already project which contains lkft-android...

And the filename should probably not be named android-cts-lkft.yaml either. Yes its the lkft project that have defined this set of include-filters in some way. Either add a more descriptive name or maybe call it cts-smoke since that's what it looks like. Since you said that you will add more cts tests, like android-cts-part1, android-cts-part2, android-cts-part3... android-cts-partN.

@liuyq It would be better to break down the android-cts packages as -part1, -part2 etc instead of adding lkft as a test name. There is no relation between the subset vs the name "lkft"

@liuyq
Copy link
Contributor Author

liuyq commented Jun 8, 2023

Please address this comment too.
However, its not needed to have cts-lkft in the job-name, since if you look at how that is built up there is already project which contains lkft-android...
And the filename should probably not be named android-cts-lkft.yaml either. Yes its the lkft project that have defined this set of include-filters in some way. Either add a more descriptive name or maybe call it cts-smoke since that's what it looks like. Since you said that you will add more cts tests, like android-cts-part1, android-cts-part2, android-cts-part3... android-cts-partN.

@liuyq It would be better to break down the android-cts packages as -part1, -part2 etc instead of adding lkft as a test name. There is no relation between the subset vs the name "lkft"

@vishalbhoj @roxell basically, there are 3 cts plans will be run for the lkft projects, the full cts, the cts-presubmit, the cts-lkft, the full cts and the cts-presubmit test plans will be run bi-weekly, and the cts-lkft will be run for every build except the bi-weekly builds. the full cts and the cts-presubmit are test plans supported by the cts package by default, while the cts-lkft test plan is a set of modules defined for lkft project, it's not a break down of the full cts plan or the cts-presubmit plan, it should be seen the same thing as the cts or the cts-presubmit, it's a plan name. For the full cts and cts-presubmit, they are broken down as several parts, not lkft there. That's why I think cts-lkft is the best option for both the job names and file names.

@roxell
Copy link
Collaborator

roxell commented Jun 15, 2023

Please address this comment too.
However, its not needed to have cts-lkft in the job-name, since if you look at how that is built up there is already project which contains lkft-android...
And the filename should probably not be named android-cts-lkft.yaml either. Yes its the lkft project that have defined this set of include-filters in some way. Either add a more descriptive name or maybe call it cts-smoke since that's what it looks like. Since you said that you will add more cts tests, like android-cts-part1, android-cts-part2, android-cts-part3... android-cts-partN.

@liuyq It would be better to break down the android-cts packages as -part1, -part2 etc instead of adding lkft as a test name. There is no relation between the subset vs the name "lkft"

@vishalbhoj @roxell basically, there are 3 cts plans will be run for the lkft projects, the full cts, the cts-presubmit, the cts-lkft, the full cts and the cts-presubmit test plans will be run bi-weekly, and the cts-lkft will be run for every build except the bi-weekly builds. the full cts and the cts-presubmit are test plans supported by the cts package by default, while the cts-lkft test plan is a set of modules defined for lkft project, it's not a break down of the full cts plan or the cts-presubmit plan, it should be seen the same thing as the cts or the cts-presubmit, it's a plan name. For the full cts and cts-presubmit, they are broken down as several parts, not lkft there. That's why I think cts-lkft is the best option for both the job names and file names.

Is there some reason that you don't want to change?
Naming suites after a project, or when things gets merged shouldn't be needed.

@liuyq
Copy link
Contributor Author

liuyq commented Jun 16, 2023

Please address this comment too.
However, its not needed to have cts-lkft in the job-name, since if you look at how that is built up there is already project which contains lkft-android...
And the filename should probably not be named android-cts-lkft.yaml either. Yes its the lkft project that have defined this set of include-filters in some way. Either add a more descriptive name or maybe call it cts-smoke since that's what it looks like. Since you said that you will add more cts tests, like android-cts-part1, android-cts-part2, android-cts-part3... android-cts-partN.

@liuyq It would be better to break down the android-cts packages as -part1, -part2 etc instead of adding lkft as a test name. There is no relation between the subset vs the name "lkft"

@vishalbhoj @roxell basically, there are 3 cts plans will be run for the lkft projects, the full cts, the cts-presubmit, the cts-lkft, the full cts and the cts-presubmit test plans will be run bi-weekly, and the cts-lkft will be run for every build except the bi-weekly builds. the full cts and the cts-presubmit are test plans supported by the cts package by default, while the cts-lkft test plan is a set of modules defined for lkft project, it's not a break down of the full cts plan or the cts-presubmit plan, it should be seen the same thing as the cts or the cts-presubmit, it's a plan name. For the full cts and cts-presubmit, they are broken down as several parts, not lkft there. That's why I think cts-lkft is the best option for both the job names and file names.

Is there some reason that you don't want to change? Naming suites after a project, or when things gets merged shouldn't be needed.

No good reason to change it to others.
Again it's a lkft--android specific testcase, not a generic testcase, though it could be used by others.

@liuyq liuyq force-pushed the android-upstream-cts-vts branch 2 times, most recently from ec160ec to bf30d85 Compare June 29, 2023 09:02
@liuyq
Copy link
Contributor Author

liuyq commented Jun 29, 2023

Hi, @roxell @vishalbhoj
Dropped the addition of android-cts-lkft.yaml, let's see if he remaining things could be merged now.

which could be used by default to run the full cts vts package,
And these files are generic files, will be reused
by other projects via the extentds

Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
to run the vts-kernel test plan for android platforms

Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
@roxell roxell merged commit 5fb7aeb into Linaro:master Jul 13, 2023
2 checks passed
@liuyq liuyq deleted the android-upstream-cts-vts branch July 13, 2023 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants