Skip to content

Commit

Permalink
Fix Stack-Use-After-Return in various tests
Browse files Browse the repository at this point in the history
  • Loading branch information
FooBarWidget committed Oct 4, 2024
1 parent 701afd4 commit 0198655
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
7 changes: 5 additions & 2 deletions test/cxx/Core/SpawningKit/HandshakePerformTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,18 @@ namespace tut {
context.integrationMode = "standalone";
context.spawnDir = getSystemTempDir();

string user = lookupSystemUsernameByUid(getuid());
string group = lookupSystemGroupnameByGid(getgid());

config.appGroupName = "appgroup";
config.appRoot = "/tmp/myapp";
config.startCommand = "echo hi";
config.startupFile = "/tmp/myapp/app.py";
config.appType = "wsgi";
config.spawnMethod = "direct";
config.bindAddress = "127.0.0.1";
config.user = lookupSystemUsernameByUid(getuid());
config.group = lookupSystemGroupnameByGid(getgid());
config.user = user;
config.group = group;
config.internStrings();
}

Expand Down
7 changes: 5 additions & 2 deletions test/cxx/Core/SpawningKit/HandshakePrepareTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,18 @@ namespace tut {
context.spawnDir = getSystemTempDir();
context.finalize();

string user = lookupSystemUsernameByUid(getuid());
string group = lookupSystemGroupnameByGid(getgid());

config.appGroupName = "appgroup";
config.appRoot = "/tmp/myapp";
config.startCommand = "echo hi";
config.startupFile = "/tmp/myapp/app.py";
config.appType = "wsgi";
config.spawnMethod = "direct";
config.bindAddress = "127.0.0.1";
config.user = lookupSystemUsernameByUid(getuid());
config.group = lookupSystemGroupnameByGid(getgid());
config.user = user;
config.group = group;
config.internStrings();
}

Expand Down
7 changes: 5 additions & 2 deletions test/cxx/SpawnEnvSetupperTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,18 @@ namespace tut {
context.spawnDir = getSystemTempDir();
context.finalize();

string user = lookupSystemUsernameByUid(getuid());
string group = lookupSystemGroupnameByGid(getgid());

config.startCommand = "true";
config.appGroupName = "appgroup";
config.appRoot = "tmp.wsgi";
config.startupFile = "tmp.wsgi/passenger_wsgi.py";
config.appType = "wsgi";
config.spawnMethod = "direct";
config.bindAddress = "127.0.0.1";
config.user = lookupSystemUsernameByUid(getuid());
config.group = lookupSystemGroupnameByGid(getgid());
config.user = user;
config.group = group;
config.internStrings();
}

Expand Down

0 comments on commit 0198655

Please sign in to comment.