Page MenuHomeFreeBSD

Add test for '-F' option of ln(1)
ClosedPublic

Authored by shivansh on Jun 12 2017, 3:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 19, 3:40 PM
Unknown Object (File)
Sep 22 2024, 3:25 AM
Unknown Object (File)
Sep 17 2024, 4:20 PM
Unknown Object (File)
Sep 1 2024, 12:35 AM
Unknown Object (File)
Aug 31 2024, 8:00 PM
Unknown Object (File)
Aug 22 2024, 4:11 AM
Unknown Object (File)
Aug 22 2024, 4:10 AM
Unknown Object (File)
Aug 22 2024, 4:10 AM
Subscribers
None

Details

Summary

The test case should fail as per "Bug 219943".

Test Plan
  • Run make install from bin/ln/tests.
  • Run kyua test from /usr/tests/bin/ln. 11/12 test cases should succeed, with 1 failing.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 9821
Build 10256: arc lint + arc unit

Event Timeline

ngie requested changes to this revision.Jun 12 2017, 4:00 PM
ngie added inline comments.
bin/ln/tests/ln_test.sh
48

Please don't rely on file(1); use readlink(1)/stat(1) instead:

$ readlink /boot/kernel                                                                                                                                                               
GENERIC-NODEBUG.r319295M
$ stat -f %SHT /boot/kernel                                                                                                                                                           
Symbolic Link
49

This needs to be moved up to line 46 or line 47.

This revision now requires changes to proceed.Jun 12 2017, 4:00 PM
bin/ln/tests/ln_test.sh
232

Also, please put the test in an appropriate spot in the list (sF_flag comes before sf_flag and after f_flag).

shivansh edited edge metadata.

Address changes pointed by @ngie -

  • Position the test case appropriately.
  • Replace calls to file(1) with stat(1) and readlink(1).

I'll commit the file->stat/readlink changes separately. Please hold.

Ok -- I just committed the file -> stat/readlink change. Please rebase your change (thanks :)!!).

In D11159#230864, @ngie wrote:

Ok -- I just committed the file -> stat/readlink change. Please rebase your change (thanks :)!!).

Actually... I'll just do it. It's easy enough for me.

This revision is now accepted and ready to land.Jun 12 2017, 4:39 PM