GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test(desktop): skip the AppImage mount signal tests where setsid is m… · pingdotgg/t3code@0e05de5

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/desktop/src/app
    • DesktopCliShim.test.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/desktop/src/app/DesktopCliShim.test.ts‎

Copy file name to clipboardExpand all lines: apps/desktop/src/app/DesktopCliShim.test.ts
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ const SLOW_SERVER = [
7575
"",
7676
].join("\n");
7777

78+
// The launcher mounts only under setsid, which stock macOS and Windows lack; there it extracts instead.
79+
const hasSetsid = NodeChildProcess.spawnSync("setsid", ["true"]).status === 0;
80+
7881
const lines = (stream: NodeJS.ReadableStream) => {
7982
const seen: Array<string> = [];
8083
const waiters: Array<() => void> = [];
@@ -98,7 +101,7 @@ const lines = (stream: NodeJS.ReadableStream) => {
98101
};
99102

100103
describe("renderCliShim", () => {
101-
it.each(["SIGTERM", "SIGHUP"] as const)(
104+
it.skipIf(!hasSetsid).each(["SIGTERM", "SIGHUP"] as const)(
102105
"keeps the AppImage mounted until the server exits after %s to the process group",
103106
async (signal) => {
104107
const { root, shim } = fakeAppImage(true, SLOW_SERVER);
@@ -117,8 +120,8 @@ describe("renderCliShim", () => {
117120

118121
// Ctrl-C in a terminal, a closed SSH session, or a service manager signals the whole group.
119122
process.kill(-child.pid!, signal);
120-
// The shell runs pending traps in signal order, so a mounter that also got the group
121-
// signal unmounts before it can answer this probe.
123+
// The shell runs pending traps in ascending signal number, and WINCH outnumbers TERM and
124+
// HUP, so a mounter that also got the group signal unmounts before it answers this probe.
122125
process.kill(mounter, "SIGWINCH");
123126
const mount = await events.until((line) => line === "mounted" || line === "unmounted");
124127
expect(mount).toBe("mounted");

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.