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

TestRunner code cleanup #8571

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

TestRunner code cleanup #8571

wants to merge 3 commits into from

Conversation

aktondak
Copy link
Collaborator

@aktondak aktondak commented Oct 25, 2024

Problem solved by the commit

This code cleans up the TestRunner class by moving all the APIs which do not belong there to the TestValidateUtilities namespace.
This code clean-up is an effort towards building the runner recipe based xrt-smi validate test. This will facilitate the following:

  1. Usage of moved APIs freely out of the TestRunner class hierarchy as well.
  2. Making TestRunner objects lightweight since every validate test spawns a TestRunner object upon creation. Currently, TestRunner is bloated, acting as a placeholder for all test related utility APIs, which should not be the case.
  3. Allow for code re-use between multiple xrt-smi validate tests and eventually Run Recipe based Test runs.

Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered

https://jira.xilinx.com/browse/VITIS-13774
Discovered to internal analysis of Validate Tests.

How problem was solved, alternative solutions (if any) and why they were rejected

The problem was solved by moving the mentioned APIs out of the class and altering the usage points of these APIs to have appropriate scopes.

Risks (if any) associated the changes in the commit

None

What has been tested and how, request additional testing if necessary

Tested by running all xrt-smi validate tests on krackenmachine

Documentation impact (if any)

None

Signed-off-by: Akshay Tondak <[email protected]>
@gbuildx
Copy link
Collaborator

gbuildx commented Oct 25, 2024

Can one of the admins verify this patch?

Akshay Tondak added 2 commits October 24, 2024 23:36
Signed-off-by: Akshay Tondak <[email protected]>
Signed-off-by: Akshay Tondak <[email protected]>
@aktondak aktondak marked this pull request as ready for review October 25, 2024 15:59
Copy link
Collaborator

@AShivangi AShivangi left a comment

Choose a reason for hiding this comment

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

I think this is a good start. Some comments.

In the next iteration, we should separate out the boiler plate code, like "init_hw_context", "init_BO" etc. All these can live in XBValidateUtils

@@ -20,7 +21,6 @@ namespace xq = xrt_core::query;
// System - Include Files
#include <fstream>
#include <iostream>
#include <regex>
Copy link
Collaborator

Choose a reason for hiding this comment

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

thanks for cleaning up includes as well!

/*
* search for xclbin for a legacy platform
*/
std::string
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a good time to remove dead code. Let's remove this function and any mention of it

@@ -3,6 +3,7 @@
// ------ I N C L U D E F I L E S -------------------------------------------
// Local - Include Files
#include "TestBist.h"
#include "TestValidateUtilities.h"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you ask Max if this is still a valid test? If not, let's remove it

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Max pointed to a confirmation from @chvamshi-xilinx
Waiting for reply to decide on this clean-up

@@ -3,6 +3,7 @@
// ------ I N C L U D E F I L E S -------------------------------------------
// Local - Include Files
#include "TestVcuKernel.h"
#include "TestValidateUtilities.h"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove this test case

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