On 10/26/26 2:34 PM, Eelco Chaudron wrote: > > > On 20 Oct 2026, at 15:07, Ilya Maximets wrote: > >> sudo-rs that ships with Ubuntu 26.04 doesn't support -E, so we need >> to pass all the variables that tests need in a different way. >> Let's configure 'sudo' to preserve variables we need. >> >> Still need to pass the PATH manually, as it is always replaced with >> the 'secure_path' regardless of the configuration. >> >> Signed-off-by: Ilya Maximets <[email protected]> > > The change looks good to me. One small nit below, but I'm ok as is. > > Acked-by: Eelco Chaudron <[email protected]> > >> --- >> .ci/linux-build.sh | 19 ++++++++++++++++++- >> 1 file changed, 18 insertions(+), 1 deletion(-) >> >> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh >> index 702feeb3b..4b4866afa 100755 >> --- a/.ci/linux-build.sh >> +++ b/.ci/linux-build.sh >> @@ -76,6 +76,21 @@ function clang_analyze() >> fi; >> } >> >> +function sudo_preserve_test_env() >> +{ >> + # Preserve environment variables needed for test execution under sudo. >> + # HOME is needed for python to find site-packages installed for the >> + # current user. PATH is special and can't be preserved this way. >> + for e in HOME GITHUB_ACTIONS ASAN_OPTIONS DPDK_EAL_OPTIONS; do >> + echo 'Defaults env_keep += "'$e'"' >> ovs-test-env >> + done >> + >> + sudo chown root:root ovs-test-env >> + sudo chmod 0440 ovs-test-env >> + sudo mv ovs-test-env /etc/sudoers.d/ >> + sudo visudo -cf /etc/sudoers.d/ovs-test-env > > Maybe swap move and check to avoid copying a file that's invalid? > > sudo visudo -cf ovs-test-env > sudo mv ovs-test-env /etc/sudoers.d/
Makes sense. I swapped the lines and applied the set to all supported branches down to 3.3. Thanks! Best regards, Ilya Maximets. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
