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)
Dec 20 2023, 8:32 AM
Unknown Object (File)
Dec 10 2023, 10:11 PM
Unknown Object (File)
Nov 11 2023, 12:37 PM
Unknown Object (File)
Oct 10 2023, 11:40 AM
Unknown Object (File)
Aug 3 2023, 4:17 PM
Unknown Object (File)
Jul 9 2023, 7:47 PM
Unknown Object (File)
Dec 31 2022, 8:05 AM
Unknown Object (File)
Dec 18 2022, 6:40 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