freebsd-src icon indicating copy to clipboard operation
freebsd-src copied to clipboard

libc/tests: keep hostname during sethostname_test.

Open Rin0913 opened this issue 8 months ago • 4 comments

CI: https://ci.freebsd.org/job/FreeBSD-main-amd64-test/26164/testReport/lib.libc.gen/sethostname_test/

Workflow:

  1. Record the original hostname.
  2. Tests(Modifying the hostname).
  3. Restore the hostname.

I am not sure if there's extended issue.


UPD1:

The original issue is that the variable host is not initialized properly due to the complicated process fork relationship.

Rin0913 avatar Apr 09 '25 23:04 Rin0913

I'm not sure if the changes @Rin0913 pushed are all that are needed, but in any case I think another round of review is needed.

bsdimp avatar Apr 19 '25 15:04 bsdimp

@bsdimp

Thank you for replying. Which part do you think is unnecessary? Or should we keep this test skipped?

Rin0913 avatar Apr 19 '25 15:04 Rin0913

@bsdimp

Thank you for replying. Which part do you think is unnecessary? Or should we keep this test skipped?

I think that this just needs review. Anything else I was either confused about or I was badly communicating.

bsdimp avatar Apr 19 '25 15:04 bsdimp

@kprovost

What do you think? Should we use jail which would affect all other tests if we just simplify specify the jail using on Makefile. Or just fix the bug causing hostname screwed.

Rin0913 avatar Apr 20 '25 10:04 Rin0913