Skip to content

Commit fe64077

Browse files
authored
Merge pull request #9257 from lcheylus/openbsd-test_hostname_ip
Enable test test_hostname_ip on OpenBSD
2 parents e2b5dd6 + 4ee3edf commit fe64077

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/openbsd.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ jobs:
147147
useradd -m -G wheel ${TEST_USER}
148148
chown -R ${TEST_USER}:wheel /root/ "${WORKSPACE_PARENT}"/
149149
whoami
150+
# Add fake host for reverse DNS lookup (needed for hostname test)
151+
printf "10.0.2.15\topenbsd.my.domain openbsd\n" >> /etc/hosts
150152
#
151153
# Further work needs to be done in a sudo as we are changing users
152154
sudo -i -u ${TEST_USER} sh << EOF

tests/by-util/test_hostname.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ fn test_hostname() {
1414
assert!(ls_default_res.stdout().len() >= ls_domain_res.stdout().len());
1515
}
1616

17-
// FixME: fails for "MacOS" and "OpenBSD" => "failed to lookup address information"
18-
#[cfg(not(any(target_os = "macos", target_os = "openbsd")))]
17+
// FixME: fails for "MacOS" => "failed to lookup address information"
18+
#[cfg(not(any(target_os = "macos")))]
1919
#[test]
2020
fn test_hostname_ip() {
2121
let result = new_ucmd!().arg("-i").succeeds();

0 commit comments

Comments
 (0)