[freebsd/kyua] 49b754: Pass unprivileged user config prop to ATF using al...

0 views
Skip to first unread message

Enji Cooper

unread,
Feb 22, 2025, 6:15:32 PMFeb 22
to kyua...@googlegroups.com
Branch: refs/heads/master
Home: https://github.com/freebsd/kyua
Commit: 49b754dec2fe034a244ca042db896bf810278f13
https://github.com/freebsd/kyua/commit/49b754dec2fe034a244ca042db896bf810278f13
Author: Igor Ostapenko <p...@igoro.pro>
Date: 2025-02-21 (Fri, 21 Feb 2025)

Changed paths:
M engine/scheduler.cpp
M engine/scheduler_test.cpp
M integration/cmd_test_test.sh
M integration/helpers/config.cpp

Log Message:
-----------
Pass unprivileged user config prop to ATF using all known names

Kyua and ATF speak different naming styles. In this case, the
unprivileged user property can be named with underscore on the Kyua
side, and with a hyphen on the ATF side. Sometimes it is not obvious
which style should be used in which situation. For instance, a test case
may require this configuration property being set using require.config.
Also, a test case may want to read the property using something like
atf_tc_get_config_var(). Which names should be used in these cases?
From the perspective of the original code, it is expected to be this:
require.config unprivileged-user
atf_tc_get_config_var(tc, "unprivileged-user")

But, as long as Kyua is the main interface, its users expect to work
with kyua.conf(5), which says that it must be named as unprivileged_user
(with underscore). As a result, test authors tend to do this instead:
require.config unprivileged_user
atf_tc_get_config_var(tc, "unprivileged_user")

Kyua already has hacks to understand both unprivileged_user and
unprivileged-user coming from require.config. And this patch covers the
missing second part -- make Kyua pass both names back to ATF as two
identical configuration properties named different ways.

Signed-off-by: Igor Ostapenko <p...@igoro.pro>


Commit: d6d2ed9c833c8f3437b0ca555b129e679dd482ab
https://github.com/freebsd/kyua/commit/d6d2ed9c833c8f3437b0ca555b129e679dd482ab
Author: Enji Cooper <ng...@FreeBSD.org>
Date: 2025-02-22 (Sat, 22 Feb 2025)

Changed paths:
M engine/scheduler.cpp
M engine/scheduler_test.cpp
M integration/cmd_test_test.sh
M integration/helpers/config.cpp

Log Message:
-----------
Merge pull request #261 from ihoro/kyua-atf-unprivileged-user-naming

Pass unprivileged user config prop to ATF using all known names


Compare: https://github.com/freebsd/kyua/compare/79b916f3d73e...d6d2ed9c833c

To unsubscribe from these emails, change your notification settings at https://github.com/freebsd/kyua/settings/notifications
Reply all
Reply to author
Forward
0 new messages