Skip to content

Remove LTP sudo, Change sudo as parameter, Add full test support for LTP #3775

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

paxue
Copy link
Collaborator

@paxue paxue commented Apr 22, 2025

Add full test support for LTP
Remove LTP sudo, change as parameter

@@ -72,11 +72,12 @@ def dependencies(self) -> List[Type[Tool]]:
def can_install(self) -> bool:
return True

def __init__(self, node: Node, source_file: str, *args: Any, **kwargs: Any) -> None:
super().__init__(node, args, kwargs)
def __init__(self, node: Node, *args: Any, **kwargs: Any) -> None:
Copy link
Member

Choose a reason for hiding this comment

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

Give the value with a default value, instead of using kwargs.get

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you mean add the following lines in init()?
self._source_file = ""
self._run_as_sudo = True

Copy link
Member

Choose a reason for hiding this comment

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

it should be like def __init__(self, node: Node, source_file: str = "", run_as_sudo:bool =True, *args: Any, **kwargs: Any) -> None:

git_tag = kwargs.get("git_tag", "")
self._git_tag = git_tag if git_tag else self.DEFAULT_LTP_TESTS_GIT_TAG
self._source_file = source_file
self._source_file = kwargs.get("source_file", "")
self._run_as_sudo = kwargs.get("sudo", True)
Copy link
Member

Choose a reason for hiding this comment

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

A similar question like Kselftest. Any difference to run with/out sudo?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For using released file.
Kselftest: don't have config, can direct unzip the release file and run.
LTP: does have config step, this step involve lots of sudo issue.

Copy link
Member

Choose a reason for hiding this comment

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

I mean for LTP, if run without sudo, does it work?

@@ -71,6 +71,9 @@ def verify_ltp_lite(
# If not provided, we will find a disk with enough space
block_device = variables.get("ltp_block_device", None)

run_full_ltp_test = variables.get("run_full_ltp_test", False)
Copy link
Member

@squirrelsc squirrelsc Apr 22, 2025

Choose a reason for hiding this comment

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

Is there any requirement to run all of them? This flag is easy to be conflict with other parameters. Please create another test case called verify_ltp. The only difference is the new test case is to run all, if no list given.

Copy link
Collaborator Author

@paxue paxue Apr 23, 2025

Choose a reason for hiding this comment

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

Is there any requirement to run all of them?
[panfeng xue]: yes. it's required from Cooperate team

I am fine with 2 paths: Create another verify_ltp_full() or just using the same test suite verify_ltp_lite.
From my view, their changes are very limited, only one line code change. Depends how you think this question

Copy link
Member

Choose a reason for hiding this comment

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

I don't want to add a parameter called run_full_ltp_test, it conflicts with existing parameters like ltp_test and ltp_skip_test

@paxue paxue force-pushed the paxue/linkedin3_pr branch from b5d6a9b to ef9e76c Compare April 23, 2025 22:20
change sudo as parameter
fix the path issue for ltp test using uploaded file
@paxue paxue force-pushed the paxue/linkedin3_pr branch from ef9e76c to ded131d Compare April 23, 2025 22:54
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.

2 participants