Bug 249960 - Capsicum test OpenatTest.WithFlag and ForkedOpenatTest_WithFlagInCapabilityMode._ failed after (r366012, r366036]
Summary: Capsicum test OpenatTest.WithFlag and ForkedOpenatTest_WithFlagInCapabilityMo...
Status: In Progress
Alias: None
Product: Base System
Classification: Unclassified
Component: tests (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Konstantin Belousov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-28 20:03 UTC by Li-Wen Hsu
Modified: 2020-10-19 19:14 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Li-Wen Hsu freebsd_committer 2020-09-28 20:03:32 UTC
Changes: https://ci.freebsd.org/job/FreeBSD-head-amd64-test/16605/

Output:
https://ci.freebsd.org/job/FreeBSD-head-amd64-test/16605/testReport/junit/sys.capsicum/capsicum-test/main/


[ RUN      ] OpenatTest.WithFlag
/usr/src/contrib/capsicum-test/openat.cc:269: Failure
Expected: (0) > (result), actual: 0 vs 59
/usr/src/contrib/capsicum-test/openat.cc:279: Failure
Expected equality of these values:
  93
  (* __error())
    Which is: 2
[  FAILED  ] OpenatTest.WithFlag (11 ms)


[ RUN      ] ForkedOpenatTest_WithFlagInCapabilityMode._
/usr/src/contrib/capsicum-test/openat.cc:269: Failure
Expected: (0) > (result), actual: 0 vs 60
/usr/src/contrib/capsicum-test/openat.cc:279: Failure
Expected equality of these values:
  93
  (* __error())
    Which is: 2
/usr/src/contrib/capsicum-test/openat.cc:357: Failure
Expected equality of these values:
  0
  rc
    Which is: 1
[  FAILED  ] ForkedOpenatTest_WithFlagInCapabilityMode._ (22 ms)
Comment 1 Ed Maste freebsd_committer 2020-09-30 21:07:28 UTC
See BENEATH changes between r366015 and r366022
Comment 2 commit-hook freebsd_committer 2020-10-06 12:58:02 UTC
A commit references this bug:

Author: lwhsu
Date: Tue Oct  6 12:57:54 UTC 2020
New revision: 366485
URL: https://svnweb.freebsd.org/changeset/base/366485

Log:
  Temporarily skip failing test cases in CI:

  sys.capsicum.functional.ForkedOpenatTest_WithFlagInCapabilityMode___
  sys.capsicum.functional.OpenatTest__WithFlag

  PR:		249960
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/tests/sys/capsicum/functional.sh
Comment 3 Konstantin Belousov freebsd_committer 2020-10-06 15:57:28 UTC
So one of the tests seems to behave as intended, where we escape the topping dir
but return to it eventually.

Another one, with changed error from ENOTCAPABLE to ENOENT while escaping,
ought to be fixed.
https://reviews.freebsd.org/D26695
Comment 4 commit-hook freebsd_committer 2020-10-08 22:31:33 UTC
A commit references this bug:

Author: kib
Date: Thu Oct  8 22:31:12 UTC 2020
New revision: 366549
URL: https://svnweb.freebsd.org/changeset/base/366549

Log:
  Do not allow to use O_BENEATH as an oracle.

  Specifically, if lookup() returned any error and the topping directory
  was not latched, which means that (non-existent) path did not returned
  to the topping location, give ENOTCAPABLE a priority over the lookup()
  error.

  PR:	249960
  Reviewed by:	emaste, ngie
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week
  Differential revision:	https://reviews.freebsd.org/D26695

Changes:
  head/sys/kern/vfs_lookup.c