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

Backport 2.28: check_test_cases.py: support to collect test cases for compat.sh #8128

Conversation

yanrayw
Copy link

@yanrayw yanrayw commented Aug 30, 2023

Description

Backport of #7165

Comments

This PR adds support to list all potential test cases in compat.sh by ./tests/compat.sh --list-test-case. Therefore, check_test_cases.py is able to collect those test case description in order to report duplicated test cases.

To analyze outcome by analyze_outcomes.py, the test case description should be identical with OUTCOME.CSV in #7136 . Please consider those two PRs together.

Gatekeeper checklist

Yanray Wang added 9 commits August 30, 2023 10:25
The option --list-test-case lists all potential test cases without
executing them. The test case description is identical with $TITLE
during test case execution.

Signed-off-by: Yanray Wang <[email protected]>
Test case description in compat.sh is in format of
    [ogm]->[ogm] TLSmode, VERIFY CIPHERSUITE_NAME

This program calls compat.sh to list all potential test case
descriptions then checks test case duplication.

Signed-off-by: Yanray Wang <[email protected]>
Test case description is printed by different block of code. This
causes code maintenance harder since we need to maintain two parts
of code with same functionality. print_test_title is used to
control test case description in compat.sh

Signed-off-by: Yanray Wang <[email protected]>
uniform_title is used to print identical format of $TITLE between
--list-test-case and run_client. In such way, no matter how $TITLE
is developed, --list-test-case will in the same format of test case
description as stored in OUTCOME.CSV.

Signed-off-by: Yanray Wang <[email protected]>
This commit includes:
 - use subprocess.check_output to report error and capture return
   value
 - add comment as a reminder for option --list-test-case

Signed-off-by: Yanray Wang <[email protected]>
@yanrayw yanrayw added enhancement size-s Estimated task size: small (~2d) component-test Test framework and CI scripts priority-medium Medium priority - this can be reviewed as time permits labels Aug 30, 2023
@yanrayw yanrayw self-assigned this Aug 30, 2023
When calling `add_xxx_ciphersuites`, we have to set MODE properly.
This commit adjusts order to address this issue in list_test_case
which matches what we do in a normal execution.

Signed-off-by: Yanray Wang <[email protected]>
@yanrayw yanrayw force-pushed the 2.28-7094-collect-compatsh-test-cases branch from 3b3cd2e to b2cd07c Compare August 30, 2023 05:46
@yanrayw yanrayw added needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review labels Aug 30, 2023
@yanrayw yanrayw requested a review from lpy4105 August 30, 2023 05:48
@yanrayw yanrayw removed the request for review from lpy4105 August 30, 2023 10:05
Copy link
Contributor

@lpy4105 lpy4105 left a comment

Choose a reason for hiding this comment

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

LGTM

@lpy4105 lpy4105 added approved Design and code approved - may be waiting for CI or backports and removed needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review labels Aug 31, 2023
@gilles-peskine-arm gilles-peskine-arm added this pull request to the merge queue Aug 31, 2023
Merged via the queue into Mbed-TLS:mbedtls-2.28 with commit e6771ed Aug 31, 2023
@yanrayw yanrayw deleted the 2.28-7094-collect-compatsh-test-cases branch September 1, 2023 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Design and code approved - may be waiting for CI or backports component-test Test framework and CI scripts enhancement priority-medium Medium priority - this can be reviewed as time permits size-s Estimated task size: small (~2d)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants