Source: rust-dns-lookup
Version: 1.0.8-4
Severity: wishlist
Tags: ftbfs
User: debian-loonga...@lists.debian.org
Usertags: loong64

Dear maintainers,

Compiling the rust-dns-lookup package failed for loong64 in the Debian Package Auto-Building environment, the error log is as follows:
```
test lookup::test_rev_localhost ... FAILED
failures:

---- lookup::test_rev_localhost stdout ----
thread 'lookup::test_rev_localhost' panicked at 'assertion failed: `(left == right)`
  left: `"loong64-loongson-03.local"`,
 right: `"localhost"`', src/lookup.rs:77:3
```

The full build log can be found at https://buildd.debian.org/status/logs.php?pkg=rust-dns-lookup&ver=1.0.8-4&arch=loong64.

After analysis, I think the maintainer may need to improve the test_rev_localhost() test case in the rust-dns-lookup-1.0.8/src/lookup.rs file.
The reasons are as follows:
1. If the first line of the /etc/hosts file is "127.0.0.1 localhost", the test case is successful.
```
# cat /etc/hosts
127.0.0.1       localhost
127.0.0.1       loong64-loongson-03.local loong64-loongson-03
```
Based on the above configure in /etc/hosts, the rust-dns-lookup package was compiled successfully on my local loong64 rootfs environment.

2. On the contrary, if the first line's content of the /etc/hosts file is not "127.0.0.1 localhost", the test case fails. Even if the /etc/hosts file contains "127.0.0.1 localhost" in other lines except the first line, the test case fails.
```
# cat /etc/hosts
127.0.0.1       loong64-loongson-03.local loong64-loongson-03
127.0.0.1       localhost
```

Alternatively, we could set the first line of the '/etc/hosts' file to '127.0.0.1 localhost' on the loong64 buildd machines.
Your opinions are welcome.
If you have any questions, you can contact me at any time.

Thanks,
Dandan Zhang

Reply via email to