Bug 250179 - Failing test case: sys.capsicum.functional.Pdfork__OtherUserForked
Summary: Failing test case: sys.capsicum.functional.Pdfork__OtherUserForked
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: tests (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-testing (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-07 09:50 UTC by Li-Wen Hsu
Modified: 2021-03-02 17: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 freebsd_triage 2020-10-07 09:50:00 UTC
This test case was skipped before because it was not running with root.

https://ci.freebsd.org/job/FreeBSD-head-amd64-test/16739/testReport/junit/sys.capsicum/functional/Pdfork__OtherUserForked/

/usr/src/contrib/capsicum-test/procdesc.cc:538: Failure
Expected equality of these values:
  -1
  kill(pid, 9)
    Which is: 0
/usr/src/contrib/capsicum-test/procdesc.cc:539: Failure
Expected equality of these values:
  1
  (* __error())
    Which is: 2
/usr/src/contrib/capsicum-test/procdesc.cc:540: Failure
Value of: state == 'R' || state == 'S'
  Actual: false
Expected: true
 pid 22844 in state Z
/usr/src/contrib/capsicum-test/procdesc.cc:522: Failure
Expected equality of these values:
  0
  rc
    Which is: 1
Comment 1 commit-hook freebsd_committer freebsd_triage 2020-10-07 09:54:01 UTC
A commit references this bug:

Author: lwhsu
Date: Wed Oct  7 09:53:25 UTC 2020
New revision: 366512
URL: https://svnweb.freebsd.org/changeset/base/366512

Log:
  Temporarily skip failing test cases in CI:

  sys.capsicum.functional.Capability__NoBypassDAC
  sys.capsicum.functional.Pdfork__OtherUserForked

  PR:		250178, 250179
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/tests/sys/capsicum/functional.sh
Comment 2 Ed Maste freebsd_committer freebsd_triage 2020-10-13 15:01:53 UTC
Failing case:

   533    // Now that the second process has been pdfork()ed, change euid.
   534    setuid(other_uid);
   535    if (verbose) fprintf(stderr, "uid=%d euid=%d\n", getuid(), geteuid());
   536
   537    // Fail to kill child with normal PID operation.
   538    EXPECT_EQ(-1, kill(pid, SIGKILL));
   539    EXPECT_EQ(EPERM, errno);
   540    EXPECT_PID_ALIVE(pid);
   541
   542    // Succeed with pdkill though.
   543    EXPECT_OK(pdkill(pd, SIGKILL));
   544    EXPECT_PID_ZOMBIE(pid);