Skip to content

Add ptests to verify installation of required NIAUTH packages#1041

Open
SandeepR-NI wants to merge 1 commit into
ni:nilrt/master/nextfrom
SandeepR-NI:niauth-test
Open

Add ptests to verify installation of required NIAUTH packages#1041
SandeepR-NI wants to merge 1 commit into
ni:nilrt/master/nextfrom
SandeepR-NI:niauth-test

Conversation

@SandeepR-NI

@SandeepR-NI SandeepR-NI commented Jul 1, 2026

Copy link
Copy Markdown

Justification

AB#3650248

Changes

  • Add recipes-ni/niauth-tests/niauth-tests.bb ptest recipe
  • Add test_niauth_packages.sh with 4 subtests
  • Add ptest-format.sh shared ptest utilities
  • Add run-ptest entry point

Testing

Manual Testing:

  • Built and deployed IPKs manually to NI-cRIO-9045
  1. pam-plugin-niauth not installed - PASS
    ni-auth-networkcontroller not installed - PASS
    libnss-niauth not installed - PASS
    niacctbase-sudo not installed - PASS
Screenshot 2026-07-07 164733

Suggested Reviewers:
@rajendra-desai-ni
@ni/rtos

Copilot AI review requested due to automatic review settings July 1, 2026 11:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a new Yocto ptest package (niauth-tests) intended to verify that ni-auth and niacctbase-sudo are absent from NILRT images, and wires it into the existing smoke ptest packagegroup so it runs in CI. The PR also changes image/package contents by removing ni-auth from the proprietary package list and removing the niacctbase-sudo subpackage from niacctbase.

Changes:

  • Introduce niauth-tests-ptest (recipe + runner + test script) that checks opkg for ni-auth and niacctbase-sudo.
  • Add niauth-tests-ptest to packagegroup-ni-ptest-smoke so it runs automatically.
  • Remove niacctbase-sudo packaging (sudoers integration) from niacctbase and remove ni-auth from the proprietary common image package set.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
recipes-ni/niauth-tests/niauth-tests.bb New ptest recipe packaging the niauth absence checks.
recipes-ni/niauth-tests/files/test_niauth_packages.sh Implements the two subtests using opkg list-installed.
recipes-ni/niauth-tests/files/run-ptest ptest entrypoint invoking the test script.
recipes-ni/niauth-tests/files/ptest-format.sh Adds a local ptest output helper script used by the test.
recipes-ni/niacctbase/niacctbase.bb Removes the niacctbase-sudo subpackage and sudoers installation.
recipes-core/packagegroups/packagegroup-ni-ptest-smoke.bb Ensures niauth-tests-ptest runs in smoke ptest jobs.
recipes-core/images/includes/nilrt-proprietary.inc Removes ni-auth from the proprietary common package set.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread recipes-ni/niauth-tests/files/test_niauth_packages.sh Outdated
Comment thread recipes-ni/niauth-tests/files/ptest-format.sh
Comment thread recipes-core/images/includes/nilrt-proprietary.inc
Comment thread recipes-ni/niacctbase/niacctbase.bb
@SandeepR-NI SandeepR-NI force-pushed the niauth-test branch 2 times, most recently from b30d015 to 9fb2b7d Compare July 2, 2026 16:25
Copilot AI review requested due to automatic review settings July 3, 2026 06:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Comment thread recipes-ni/niauth-tests/files/ptest-format.sh
Comment thread recipes-ni/niauth-tests/niauth-tests.bb
Comment thread recipes-ni/niauth-tests/niauth-tests.bb Outdated
@SandeepR-NI SandeepR-NI marked this pull request as ready for review July 3, 2026 08:17
@SandeepR-NI SandeepR-NI marked this pull request as draft July 3, 2026 08:17
@SandeepR-NI SandeepR-NI marked this pull request as ready for review July 3, 2026 08:19
@SandeepR-NI SandeepR-NI marked this pull request as draft July 3, 2026 08:19
@SandeepR-NI SandeepR-NI requested a review from Copilot July 3, 2026 08:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Comment thread recipes-ni/niauth-tests/files/ptest-format.sh
Comment thread recipes-ni/niauth-tests/niauth-tests.bb
@SandeepR-NI SandeepR-NI marked this pull request as ready for review July 3, 2026 08:33

@SandeepR-NI SandeepR-NI left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@rajendra-desai-ni Could you please review this PR?

@rajendra-desai-ni rajendra-desai-ni left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Follow 50-72 rule for the commit messages

@rajendra-desai-ni rajendra-desai-ni requested a review from a team July 6, 2026 13:43
@shubhanshumt26

Copy link
Copy Markdown
Contributor

@SandeepR-NI I think you should drop the commit to remove ni-auth from proprietary packages and sudoers file from this PR. As the WI linked mentions to just create the test. And the work to remove will be done as part of this WI

Comment thread recipes-ni/niauth-tests/files/test_niauth_packages.sh Outdated
@shubhanshumt26 shubhanshumt26 requested a review from a team July 6, 2026 15:35
@SandeepR-NI SandeepR-NI closed this Jul 7, 2026
@SandeepR-NI SandeepR-NI reopened this Jul 7, 2026
@SandeepR-NI

Copy link
Copy Markdown
Author

@shubhanshumt26 Pls review again and approve.

@shubhanshumt26

Copy link
Copy Markdown
Contributor

@shubhanshumt26 Pls review again and approve.

@SandeepR-NI Please test with the updated changes and update the testing section.

- Add niauth-tests ptest recipe with 4 subtests:
  - pam-plugin-niauth is not installed
  - ni-auth-networkcontroller is not installed
  - libnss-niauth is not installed
  - niacctbase-sudo is not installed

Signed-off-by: Sandeep R Kumar <Sandeep.R.Kumar@Emerson.com>
Copilot AI review requested due to automatic review settings July 7, 2026 10:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread recipes-ni/niauth-tests/files/ptest-format.sh
Comment thread recipes-ni/niauth-tests/niauth-tests.bb
@SandeepR-NI

SandeepR-NI commented Jul 7, 2026

Copy link
Copy Markdown
Author

@shubhanshumt26 I have tested the updated changes and updated the testing section with the results.

@rajendra-desai-ni rajendra-desai-ni left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Update PR title with respect to the changes made.

@@ -0,0 +1,56 @@
#!/bin/bash
# Verifies that niauth-related packages and niacctbase-sudo are not installed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't we also have a "test" here to verify ni-auth not included in the BSI? I know it would fail until ni-auth is actually removed, but in which WI would we be including the test if not under this WI?

FYI, @shubhanshumt26

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, we can include that. It will fail until the dependency of ni-auth is removed from ni-auth-webservice. IIRC it will be done in C4 as per discussion with Rich, right @erickshepherdNI ?

I will be in favour of including the test and let it fail few months as the planning of ni-auth depreciation is already done. Thoughts @chaitu236

@SandeepR-NI SandeepR-NI changed the title Added niauth-tests ptest for ni-auth and niacctbase-sudo Add package verification ptests for pam-plugin-niauth, libnss-niauth, ni-auth-networkcontroller, and niacctbase-sudo Jul 10, 2026
@SandeepR-NI SandeepR-NI changed the title Add package verification ptests for pam-plugin-niauth, libnss-niauth, ni-auth-networkcontroller, and niacctbase-sudo Add ptests to verify installation of required NIAUTH packages Jul 10, 2026
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.

4 participants