Bug 247559 - Flakey test case: bin.sh.execution.functional_test.bg12
Summary: Flakey test case: bin.sh.execution.functional_test.bg12
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-06-26 09:33 UTC by Li-Wen Hsu
Modified: 2020-07-09 17:44 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Li-Wen Hsu freebsd_committer 2020-06-26 09:40:26 UTC
jilles: Can you help check this one? Thanks!
Comment 2 Li-Wen Hsu freebsd_committer 2020-06-26 09:41:32 UTC
Temporarily skip this case in CI: https://svnweb.freebsd.org/changeset/base/362646
Comment 3 commit-hook freebsd_committer 2020-06-26 17:35:21 UTC
A commit references this bug:

Author: lwhsu
Date: Fri Jun 26 17:35:09 UTC 2020
New revision: 362655
URL: https://svnweb.freebsd.org/changeset/base/362655

Log:
  MFC r362646:

  Temporarily skip flakey bin.sh.execution.functional_test.bg12 in CI

  PR:		247559
  Sponsored by:	The FreeBSD Foundation

Changes:
_U  stable/12/
  stable/12/bin/sh/tests/functional_test.sh
Comment 4 commit-hook freebsd_committer 2020-06-28 21:15:54 UTC
A commit references this bug:

Author: jilles
Date: Sun Jun 28 21:15:29 UTC 2020
New revision: 362737
URL: https://svnweb.freebsd.org/changeset/base/362737

Log:
  sh/tests: Fix flaky execution/bg12.0

  When job control is not enabled, the shell ignores SIGINT while waiting for
  a foreground process unless that process exits on SIGINT. In this case, the
  foreground process is sleep and it does not exit on SIGINT because the
  signal is only sent to the shell. Depending on order of events, this could
  cause the SIGINT to be unexpectedly ignored.

  On lightly loaded bare metal, the chance of this happening tends to be less
  than 0.01% but with higher loads and/or virtualization it becomes more
  likely.

  Starting the sleep in background and using the wait builtin ensures SIGINT
  will not be ignored.

  PR:		247559
  Reported by:	lwhsu
  MFC after:	1 week

Changes:
  head/bin/sh/tests/execution/bg12.0
Comment 5 commit-hook freebsd_committer 2020-06-28 21:33:58 UTC
A commit references this bug:

Author: jilles
Date: Sun Jun 28 21:33:08 UTC 2020
New revision: 362738
URL: https://svnweb.freebsd.org/changeset/base/362738

Log:
  sh/tests: Re-enable bin.sh.execution.functional_test.bg12.0

  This reverts r362646.

  PR:		247559
  MFC after:	1 week

Changes:
  head/bin/sh/tests/functional_test.sh
Comment 6 commit-hook freebsd_committer 2020-07-09 17:43:31 UTC
A commit references this bug:

Author: jilles
Date: Thu Jul  9 17:42:31 UTC 2020
New revision: 363053
URL: https://svnweb.freebsd.org/changeset/base/363053

Log:
  MFC r362737: sh/tests: Fix flaky execution/bg12.0

  When job control is not enabled, the shell ignores SIGINT while waiting for
  a foreground process unless that process exits on SIGINT. In this case, the
  foreground process is sleep and it does not exit on SIGINT because the
  signal is only sent to the shell. Depending on order of events, this could
  cause the SIGINT to be unexpectedly ignored.

  On lightly loaded bare metal, the chance of this happening tends to be less
  than 0.01% but with higher loads and/or virtualization it becomes more
  likely.

  Starting the sleep in background and using the wait builtin ensures SIGINT
  will not be ignored.

  PR:		247559
  Reported by:	lwhsu

Changes:
_U  stable/12/
  stable/12/bin/sh/tests/execution/bg12.0
Comment 7 commit-hook freebsd_committer 2020-07-09 17:43:33 UTC
A commit references this bug:

Author: jilles
Date: Thu Jul  9 17:43:25 UTC 2020
New revision: 363054
URL: https://svnweb.freebsd.org/changeset/base/363054

Log:
  MFC r362738: sh/tests: Re-enable bin.sh.execution.functional_test.bg12.0

  PR:		247559

Changes:
_U  stable/12/
  stable/12/bin/sh/tests/functional_test.sh