Skip to content

Conversation

@satheeshpaul
Copy link
Contributor

The assertion checks for exactly one queue. Changed this to
check for non-zero number of queues.

Signed-off-by: Satheesh Paul psatheesh@marvell.com

The assertion checks for exactly one queue. Changed this to
check for non-zero number of queues.

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
@odpbuild odpbuild changed the title validation: fix classification test init [PATCH v1] validation: fix classification test init Oct 21, 2025
ts.pktio = create_pktio(ODP_QUEUE_TYPE_SCHED, pkt_pool, cls == ENABLE_CLS);
CU_ASSERT_FATAL(ts.pktio != ODP_PKTIO_INVALID);
CU_ASSERT(odp_pktin_event_queue(ts.pktio, &ts.pktin_queue, 1) == 1);
CU_ASSERT(odp_pktin_event_queue(ts.pktio, &ts.pktin_queue, 1) > 0);
Copy link
Collaborator

Choose a reason for hiding this comment

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

The assertion checks for exactly one queue. Changed this to check for non-zero number of queues.

Why? What is wrong with the current code? If there is a valid reason for the change (but I cannot immediately see it), the commit message could say it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This assertion to check for exactly one queue was added recently. Before this, on cn9k, cn10k classificati>on tests have been working fine with 64 queues. This change breaks them. Is there any reason the tests need to run with exactly one queue?

Failure of a validation test may be caused by a bug in the validation test or by a bug in the SW under testing and therefore a test failure alone is not a sufficient reason to change a validation test. If we took care of all test failures by changing the tests, then the tests would be useless.

If an API validation test does not have bugs and uses the API correctly, then a test failure implies that there is problem in the SW being tested. It may also be that the failure exposes a problem in the API itself, but then the API needs a fix too, not just the test.

Looking at the code, test_init() calls create_pktio() which creates a pktio and configures it with the default number of pktin queues, i.e. 1. So checking then that odp_pktin_event_queue() returns exactly 1 seems right to me.

So why are you proposing this change?

@satheeshpaul
Copy link
Contributor Author

satheeshpaul commented Oct 21, 2025 via email

@JannePeltonen
Copy link
Collaborator

Btw, it might be better to reply to review comments through github web interface. If you comment through email, then please try to avoid top posting.

@satheeshpaul
Copy link
Contributor Author

satheeshpaul commented Oct 21, 2025 via email

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