Merge remote branch 'origin/wrtbooster' into wrtbooster

pull/1/head
Alexey Shilov 15 years ago
commit a3cd37b678

@ -1,2 +0,0 @@
usr/lib/pkgconfig/meegotouch-boostable.pc
usr/share/qt4/mkspecs/features/meegotouch-boostable.prf

@ -0,0 +1,10 @@
#!/bin/sh
echo
echo "**********************************************************"
echo
echo "NOTE: This package is deprecated. Instead of this package,"
echo " use the libmeegotouch-dev package."
echo
echo "**********************************************************"
echo

@ -1,7 +1,6 @@
<aegis>
<request>
<credential name="CAP::kill"/>
<request policy="add">
<credential name="applauncherd-launcher::access"/>
<for path="/usr/bin/invoker" id="client"/>
</request>

@ -10,7 +10,14 @@ usr/bin/fala_ft_creds1.launch
usr/bin/fala_ft_creds2
usr/bin/fala_ft_creds2.launch
usr/bin/fala_testapp
usr/bin/fala_wl
usr/bin/fala_wl.launch
usr/bin/fala_wol
usr/share/dbus-1/services/com.nokia.fala_testapp.service
usr/share/dbus-1/services/com.nokia.fala_wl.service
usr/share/dbus-1/services/com.nokia.fala_wol.service
usr/bin/fala_ft_themetest.launch
usr/bin/fala_ft_themetest
usr/share/themes/base/meegotouch/fala_ft_themetest/*
usr/share/applications/fala_wl.desktop
usr/share/applications/fala_wol.desktop

@ -3,3 +3,6 @@ usr/share/applauncherd-testscripts/ts_prestartapp.rb
usr/share/applauncherd-testscripts/check_pipes.py
usr/share/applauncherd-testscripts/test-perf-mbooster.py
usr/share/applauncherd-testscripts/tc_theming.rb
usr/share/applauncherd-testscripts/fala_sf.sh
usr/share/applauncherd-testscripts/fala_sf.py
usr/share/applauncherd-testscripts/test-perf.rb

27
debian/changelog vendored

@ -1,9 +1,30 @@
applauncherd (0.10.4) unstable; urgency=low
applauncherd (0.12.1) stable; urgency=low
* Changes: Launcher uses creds_confine2 to reset credentials during transmogrification
* Fixes: NB#187583 - Update application launcher to use creds_confine2() for credential setup
* Fixes: NB#187780 - Booster robustness improvement: launch applications even without applauncherd
-- Antti Kervinen <antti.kervinen@nokia.com> Mon, 30 Aug 2010 15:03:59 +0300
applauncherd (0.11.0) stable; urgency=low
* Changes: Signal-forwarding tests added
* Changes: Test for invoker can launch applications even without applauncherd
* Changes: "Deprecated" applauncherd-dev and made it depend on libmeegotouch-dev
* Changes: wait-term parameter support for applications started without launcher
* Changes: invoker can launch applications even without applauncherd
* Changes: remove CAP::kill from invoker's aegis file
* Changes: Updates to meego packaging files. Submitted to devel:ux:handset.
* Changes: signals forwarding update
* Changes: daemon error messages refactoring
* Changes: added Connection::peersPid() method
* Changes: Handle PWD correctly
* Changes: pass pid of invoker from booster to launcher
* Changes: PROG_NAME separated into PROG_NAME_INVOKER and PROG_NAME_LAUNCHER
* Changes: invoker's receiving of booster process exit code refactoring
* Fixes: NB#187780 - Booster robustness improvement: launch applications even without applauncherd
-- Jussi Lind <jussi.lind@nokia.com> Tue, 24 Aug 2010 18:04:39 +0300
-- Nimika Keshri <nimika.1.keshri@nokia.com> Mon, 30 Aug 2010 11:38:32 +0300
applauncherd (0.10.3) stable; urgency=low

2
debian/control vendored

@ -45,7 +45,7 @@ Description: Launcher debug package
Package: applauncherd-dev
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, pkg-config
Depends: ${shlibs:Depends}, ${misc:Depends}, libmeegotouch-dev
Description: Development files for applications using applauncherd
Development files for applications using applauncherd.

@ -1,2 +1,5 @@
* Wed Jul 14 2010 Pertti Kellomäki <pertti.kellomaki@nokia.com> - 0.0.0
* Wed Aug 25 2010 Pertti Kellomäki <pertti.kellomaki@nokia.com> - 0.10.3
- Updated to version 0.10.3.
* Wed Jul 14 2010 Pertti Kellomäki <pertti.kellomaki@nokia.com> - 0.8.0
- Initial packaging.

@ -1,6 +1,6 @@
Name: meegotouch-applauncherd
Summary: Application launcher for fast startup
Version: 0.9.0
Version: 0.10.3
Release: 1
Group: System/Daemons
License: LGPLv2+

@ -61,6 +61,7 @@ extern char ** environ;
// pid of invoked process
static pid_t invoked_pid = -1;
static void sigs_restore(void);
static void sig_forwarder(int sig)
{
@ -68,8 +69,10 @@ static void sig_forwarder(int sig)
{
if (kill(invoked_pid, sig) != 0)
{
die(1, "Can't send signal to application: %s \n", strerror(errno));
report(report_error, "Can't send signal to application: %s \n", strerror(errno));
}
sigs_restore();
raise(sig);
}
}
@ -179,7 +182,8 @@ static int invoker_init(enum APP_TYPE app_type)
fd = socket(PF_UNIX, SOCK_STREAM, 0);
if (fd < 0)
{
die(1, "Failed to open invoker socket.\n");
warning("Failed to open invoker socket.\n");
return -1;
}
sun.sun_family = AF_UNIX; //AF_FILE;
@ -206,7 +210,8 @@ static int invoker_init(enum APP_TYPE app_type)
if (connect(fd, (struct sockaddr *)&sun, sizeof(sun)) < 0)
{
die(1, "Failed to initiate connect on the socket.\n");
warning("Failed to initiate connect on the socket.\n");
return -1;
}
return fd;
@ -243,7 +248,7 @@ static uint32_t invoker_recv_exit(int fd)
// if nothing happend, just exit with error message
die(1, "receiving bad exit status (%08x)\n", action);
}
/* Receive pid. */
/* Receive exit status */
invoke_recv_msg(fd, &status);
return status;
}
@ -446,38 +451,68 @@ static int invoke(int prog_argc, char **prog_argv, char *prog_name,
int fd = invoker_init(app_type);
invoker_send_magic(fd, magic_options);
invoker_send_name(fd, prog_argv[0]);
invoker_send_exec(fd, prog_name);
invoker_send_args(fd, prog_argc, prog_argv);
invoker_send_prio(fd, prog_prio);
invoker_send_ids(fd, uid, gid);
invoker_send_io(fd);
invoker_send_env(fd);
invoker_send_end(fd);
if (prog_name)
if (fd == -1)
{
free(prog_name);
}
// connection with launcher is broken, try to launch application via execve
warning("Connection with launcher process is broken \n");
warning("Try to start application as a binary executable without launcher... \n");
// Wait for launched process to exit
if (wait_term)
if(!wait_term)
{
// Fork a new process
pid_t newPid = fork();
if (newPid == -1)
{
report(report_error, "Invoker failed to fork");
exit(EXIT_FAILURE);
}
if (newPid != 0) /* parent process */
{
return 0;
}
}
execve(prog_name, prog_argv, environ);
perror("execve"); /* execve() only returns on error */
exit(EXIT_FAILURE);
}
else
{
invoked_pid = invoker_recv_pid(fd);
debug("Booster's pid is %d \n ", invoked_pid);
// connection with launcher process is established
invoker_send_magic(fd, magic_options);
invoker_send_name(fd, prog_argv[0]);
invoker_send_exec(fd, prog_name);
invoker_send_args(fd, prog_argc, prog_argv);
invoker_send_prio(fd, prog_prio);
invoker_send_ids(fd, uid, gid);
invoker_send_io(fd);
invoker_send_env(fd);
invoker_send_end(fd);
if (prog_name)
{
free(prog_name);
}
// forward signals to invoked process
sigs_init();
// Wait for launched process to exit
if (wait_term)
{
invoked_pid = invoker_recv_pid(fd);
debug("Booster's pid is %d \n ", invoked_pid);
// wait for exit status from invoked application
status = invoker_recv_exit(fd);
// forward signals to invoked process
sigs_init();
// restore default signal handlers
sigs_restore();
}
// wait for exit status from invoked application
status = invoker_recv_exit(fd);
close(fd);
// restore default signal handlers
sigs_restore();
}
close(fd);
}
}
return status;
}

@ -19,6 +19,10 @@
#include "appdata.h"
#ifdef HAVE_CREDS
#include <sys/creds.h>
#endif
AppData::AppData() :
m_options(0),
m_argc(0),
@ -30,6 +34,9 @@ AppData::AppData() :
m_ioDescriptors(),
m_gid(0),
m_uid(0)
#if defined (HAVE_CREDS)
, m_peerCreds(NULL)
#endif
{}
void AppData::setOptions(int newOptions)
@ -143,7 +150,28 @@ void AppData::deleteArgv()
}
}
#if defined (HAVE_CREDS)
void AppData::setPeerCreds(creds_t peerCreds)
{
m_peerCreds = peerCreds;
}
creds_t AppData::peerCreds() const
{
return m_peerCreds;
}
void AppData::deletePeerCreds()
{
creds_free(m_peerCreds);
m_peerCreds = NULL;
}
#endif // defined (HAVE_CREDS)
AppData::~AppData()
{
deleteArgv();
#if defined (HAVE_CREDS)
deletePeerCreds();
#endif
}

@ -20,6 +20,10 @@
#ifndef APPDATA_H
#define APPDATA_H
#ifdef HAVE_CREDS
#include <sys/creds.h>
#endif
#include <string>
using std::string;
@ -101,6 +105,17 @@ public:
//! Frees the memory reserved for argv
void deleteArgv();
#if defined (HAVE_CREDS)
//! Store security credentials
void setPeerCreds(creds_t peerCreds);
//! Get the stored credentials
creds_t peerCreds() const;
//! Free the memory reserved for credentials
void deletePeerCreds();
#endif
private:
AppData(const AppData & r);
@ -117,6 +132,10 @@ private:
gid_t m_gid;
uid_t m_uid;
#if defined (HAVE_CREDS)
creds_t m_peerCreds;
#endif
};
#endif // APPDATA_H

@ -60,7 +60,7 @@ bool Booster::readCommand()
m_conn = new Connection(socketId());
// Accept a new invocation.
if (m_conn->acceptConn())
if (m_conn->acceptConn(m_app))
{
bool res = m_conn->receiveApplicationData(m_app);
if(!res)
@ -214,7 +214,14 @@ void* Booster::loadMain()
{
#ifdef HAVE_CREDS
// Set application's platform security credentials
creds_confine(m_app.fileName().c_str());
int err = creds_confine2(m_app.fileName().c_str(), credp_str2flags("set", NULL), m_app.peerCreds());
m_app.deletePeerCreds();
if (err < 0)
{
// Credential setup has failed, abort.
Logger::logErrorAndDie(EXIT_FAILURE, "Failed to setup credentials for launching application: %d\n", err);
}
#endif
// Load the application as a library
@ -266,7 +273,7 @@ pid_t Booster::invokersPid()
{
if (m_conn->isReportAppExitStatusNeeded())
{
return m_conn->peersPid();
return m_conn->peerPid();
}
else
{

@ -120,7 +120,7 @@ void Connection::initSocket(const string socketId)
}
}
bool Connection::acceptConn()
bool Connection::acceptConn(AppData & rApp)
{
m_fd = accept(m_curSocket, NULL, NULL);
@ -130,15 +130,19 @@ bool Connection::acceptConn()
return false;
}
#if defined (HAVE_CREDS) && ! defined (DISABLE_VERIFICATION)
#if defined (HAVE_CREDS)
// Get credentials of assumed invoker
creds_t ccreds = creds_getpeer(m_fd);
int allow = creds_have_p(ccreds, m_credsType, m_credsValue);
// Fetched peer creds will be free'd with rApp.deletePeerCreds
rApp.setPeerCreds(ccreds);
creds_free(ccreds);
#if ! defined (DISABLE_VERIFICATION)
if (!allow)
// This code checks if the assumed invoker has got enough
// rights to communicate with us
if (!creds_have_p(ccreds, m_credsType, m_credsValue))
{
Logger::logError("Connection: invoker doesn't have enough credentials to call launcher \n");
@ -147,7 +151,9 @@ bool Connection::acceptConn()
return false;
}
#endif
#endif // ! defined (DISABLE_VERIFICATION)
#endif // defined (HAVE_CREDS)
return true;
}
@ -548,7 +554,7 @@ bool Connection::isReportAppExitStatusNeeded()
return m_sendPid;
}
pid_t Connection::peersPid()
pid_t Connection::peerPid()
{
struct ucred cr;

@ -65,9 +65,12 @@ public:
/*! \brief Accept connection.
* Accept a socket connection from the invoker.
* Stores security credentials of the connected
* peer to rApp, if security is enabled. The credentials
* in rApp must be released by the caller.
* \return true on success.
*/
bool acceptConn();
bool acceptConn(AppData & rApp);
//! \brief Close the socket connection.
void closeConn();
@ -90,7 +93,7 @@ public:
static void closeAllSockets();
//! \brief Get pid of the process on the other end of socket connection
pid_t peersPid();
pid_t peerPid();
private:
@ -170,7 +173,7 @@ private:
gid_t m_gid;
uid_t m_uid;
#if defined (HAVE_CREDS) && ! defined (DISABLE_VERIFICATION)
#if defined (HAVE_CREDS)
static const char * m_credsStr;
creds_value_t m_credsValue;
creds_type_t m_credsType;

@ -181,7 +181,22 @@ void Daemon::run()
}
else
{
Logger::logError("Daemon: invokers pid: \n", invoker_pid);
Logger::logInfo("Daemon: invoker's pid: %d \n", invoker_pid);
}
if (invoker_pid != 0)
{
// store booster - invoker pids pair
pid_t booster_pid = 0;
if (MBooster::type() == msg)
{
booster_pid = MBooster::processId();
}
else if (QtBooster::type() == msg)
{
booster_pid = QtBooster::processId();
}
m_kindergarten[booster_pid] = invoker_pid;
}
// Fork a new booster of the given type
@ -323,12 +338,25 @@ void Daemon::reapZombies()
if (pid)
{
i = m_children.erase(i);
Logger::logError("Daemon: terminated process pid is %d", pid);
if (WIFSIGNALED(status))
PidMap::iterator it = m_kindergarten.find(pid);
if (it != m_kindergarten.end())
{
// todo: send signal to corresponding invoker form here
Logger::logError("Daemon: booster (pid=%d) terminated due to signal=%d\n", pid, WTERMSIG(status));
Logger::logInfo("Daemon: terminated process is in the kendergarten");
if (WIFSIGNALED(status))
{
int signal = WTERMSIG(status);
pid_t invoker_pid = (*it).second;
Logger::logInfo("Daemon: booster (pid=%d) terminated due to signal=%d\n", pid, signal);
Logger::logInfo("Daemon: kill invoker process %d by signal %d \n", invoker_pid, signal);
if (kill(invoker_pid, signal) != 0)
{
Logger::logError("Daemon: failed to send signal to invoker: %s \n", strerror(errno));
}
}
// remove dead booster
m_kindergarten.erase(it);
}
// Check if pid belongs to boosters, restart dead booster if needed

@ -22,10 +22,12 @@
#include <vector>
#include <string>
#include <map>
#include <sys/types.h>
using std::vector;
using std::string;
using std::map;
class Booster;
@ -115,6 +117,10 @@ private:
typedef vector<pid_t> PidVect;
PidVect m_children;
//! storage of booster-invoker pid pairs
typedef map<pid_t, pid_t> PidMap;
PidMap m_kindergarten;
// Pipe used to tell the parent that a new booster is needed
int m_pipefd[2];

@ -61,7 +61,6 @@ public:
*/
static int processId();
//! \reimp
virtual bool preload();

@ -43,7 +43,7 @@ const string & WRTBooster::socketId() const
bool WRTBooster::preload()
{
#ifdef HAVE_MCOMPONENTCACHE
MComponentCache::populateForWRTApplication();
// MComponentCache::populateForWRTApplication();
#endif
return true;
}

@ -30,6 +30,7 @@ add_executable(helloworld ${SRC})
# Install
install(PROGRAMS helloworld DESTINATION /usr/bin RENAME fala_ft_hello.launch)
install(PROGRAMS scripts/fala_ft_hello DESTINATION /usr/bin/)
install(PROGRAMS scripts/fala_ft_hello DESTINATION /usr/bin RENAME fala_wl)
# Install symlinks so that /usr/bin/helloworldX launches /usr/bin/helloworldX.launch
install(SCRIPT scripts/create_links.cmake)

@ -1,8 +0,0 @@
TEMPLATE = app
TARGET = fala_ft_hello
CONFIG = qt meegotouch
QMAKE_CXXFLAGS += -fPIC -fvisibility=hidden -fvisibility-inlines-hidden
QMAKE_LFLAGS += -pie -rdynamic
SOURCES += helloworld.cpp

@ -28,4 +28,8 @@ add_executable(fala_testapp ${SRC})
# Install
install(PROGRAMS fala_testapp DESTINATION /usr/bin/)
install(FILES com.nokia.fala_testapp.service DESTINATION /usr/share/dbus-1/services)
install(PROGRAMS fala_testapp DESTINATION /usr/bin RENAME fala_wl.launch)
install(PROGRAMS fala_testapp DESTINATION /usr/bin RENAME fala_wol)
install(FILES com.nokia.fala_testapp.service com.nokia.fala_wl.service com.nokia.fala_wol.service DESTINATION /usr/share/dbus-1/services)
install(FILES fala_wl.desktop fala_wol.desktop DESTINATION /usr/share/applications/)

@ -0,0 +1,3 @@
[D-BUS Service]
Name=com.nokia.fala_wl
Exec=/usr/bin/fala_wl

@ -0,0 +1,3 @@
[D-BUS Service]
Name=com.nokia.fala_wol
Exec=/usr/bin/fala_wol

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Name=fala_wl
Icon=icon-l-video
Exec=/usr/bin/invoker --type=m /usr/bin/fala_wl.launch
X-Maemo-Service=com.nokia.fala_wl
Categories=X-MeeGo;Demos;
OnlyShowIn=X-MeeGo;

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Name=fala_wol
Icon=icon-l-video
Exec=/usr/bin/fala_wol
X-Maemo-Service=com.nokia.fala_wol
Categories=X-MeeGo;Demos;
OnlyShowIn=X-MeeGo;

@ -1,14 +0,0 @@
######################################################################
# Automatically generated by qmake (2.01a) Wed Apr 21 10:44:49 2010
######################################################################
TEMPLATE = app
QMAKE_CXXFLAGS += -fPIC -fvisibility=hidden -fvisibility-inlines-hidden
QMAKE_LFLAGS += -pie -rdynamic
TARGET = testapp
DEPENDPATH += .
INCLUDEPATH += .
CONFIG += meegotouch
# Input
SOURCES += main.cpp

@ -7,4 +7,7 @@ install(FILES
install(PROGRAMS
ts_prestartapp.rb
tc_theming.rb
fala_sf.py
fala_sf.sh
test-perf.rb
DESTINATION /usr/share/applauncherd-testscripts)

@ -0,0 +1,15 @@
#!/usr/bin/env python
import os
import time
import commands
#Launching application from the script
os.system("/usr/share/applauncherd-testscripts/fala_sf.sh &")
time.sleep(2)
st, op = commands.getstatusoutput("pgrep fala_ft_hello")
#Killing application with a signal 11 (Segmentation Fault)
commands.getoutput("kill -11 %s" %op)
time.sleep(2)

@ -0,0 +1,3 @@
#!/bin/sh
invoker --type=m --wait-term /usr/bin/fala_ft_hello.launch

@ -704,6 +704,36 @@ class launcher_tests (unittest.TestCase):
self.assert_(grp_id == grp_id2, "The correct GID is not passed by invoker")
def test_019_signal_forwarding(self):
"""
To test that invoker is killed by the same signal as the application
"""
st, op = commands.getstatusoutput("/usr/share/applauncherd-testscripts/fala_sf.py")
print ("The Invoker killed by : %s" %op)
self.assert_(op == 'Segmentation fault (core dumped)', "The invoker was not killed by the same signal")
def test_020_launch_wo_applauncherd(self):
"""
To Test that invoker can launch applications even when the applauncherd is not running
"""
#Stop applauncherd
os.system("initctl stop xsession/applauncherd")
time.sleep(1)
#Try to launch an application using invoker
os.system('invoker --type=m /usr/bin/fala_ft_hello.launch &')
time.sleep(3)
process_id1 = self.get_pid('fala_ft_hello')
self.assert_(process_id1 != None , "application not launcherd running")
time.sleep(1)
self.kill_process(PREFERED_APP)
os.system("initctl start xsession/applauncherd")
# main
if __name__ == '__main__':
# When run with testrunner, for some reason the PATH doesn't include

@ -0,0 +1,140 @@
#!/usr/bin/ruby1.8
# Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# Contact: Nokia Corporation (directui@nokia.com)
#
# This file is part of applauncherd.
#
# If you have questions regarding the use of this file, please contact
# Nokia at directui@nokia.com.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License version 2.1 as published by the Free Software Foundation
# and appearing in the file LICENSE.LGPL included in the packaging
# of this file.
#
# * Description: Performance Test for applauncherd
#
# * Objectives: test the startup time for applications
#
require 'tdriver'
require 'date'
require 'test/unit'
include TDriverVerify
class TC_PerformanceTests < Test::Unit::TestCase
COUNT = 5
@start_time = 0
@end_time = 0
$path = string = `echo $PATH `
# method called before any test case
def setup
if $path.include?("scratchbox")
puts "Inside SB, Do Nothing to unlock"
else
system "mcetool --set-tklock-mode=unlocked"
# restart duihome so that qttasserver notices it
verify {
system("/sbin/initctl restart xsession/duihome")
}
sleep (5)
end
@sut = TDriver.sut(:Id=> 'sut_qt_maemo')
end
# method called after any test case for cleanup purposes
def teardown
puts "exit from teardown"
end
def open_Apps(appName)
#Remove the Log file if it exists
if FileTest.exists?("/tmp/testapp.log")
system "rm /tmp/testapp.log"
end
count = 0
#Open the Application from the application grid
@meegoHome = @sut.application(:name => 'duihome')
@meegoHome.MButton(:name => "ToggleLauncherButton").tap
sleep(2)
if @meegoHome.test_object_exists?("LauncherButton", :text => appName)
icon = @meegoHome.LauncherButton(:name => "LauncherButton", :text => appName)
totalPages = @meegoHome.children(:type => 'LauncherPage').length
while icon.attribute('visibleOnScreen') == 'false' and count < totalPages
@meegoHome.PagedViewport(:name => 'LauncherPagedViewport').MWidget(:name => 'glass').gesture(:Left, 1, 800)
sleep(0.2)
count = count +1
icon.refresh
end
@start_time = Time.now
@meegoHome.LauncherButton(:name => "LauncherButton", :text => appName).tap
sleep (2)
@app = @sut.application(:name => appName)
sleep (2)
@app.MEscapeButtonPanel.MButton( :name => 'CloseButton' ).tap
else
#icon does not
#raise error and exit
raise "Application not found in Application grid"
exit 1
end
end
def read_file
#Reading the log file to get the time
file_name="/tmp/testapp.log"
last_line = `tail -n 2 #{file_name}`
@end_time = last_line.split(" ")[0]
end
def measure_time
#Measuring the Startup Time for applications
start_t = "%10.6f" % @start_time.to_f
app_t = Float(@end_time) - Float(start_t)
return app_t
end
def test_performance
wL = []
woL = []
wLsum = 0.0
woLsum = 0.0
#Run Application with invoker
for i in 1..COUNT
open_Apps("fala_wl")
print "Now Launching fala_wl %d times\n" %i
sleep (5)
read_file
wL.push(measure_time)
end
#Run Application without invoker
for i in 1..COUNT
open_Apps("fala_wol")
print "Now Launching fala_wol %d times\n" %i
sleep (5)
read_file
woL.push(measure_time)
end
print "With Launcher \t\t Without Launcher\n"
#Printing the data
for i in 0..COUNT-1
print "%.2f \t\t\t %.2f\n" %[wL[i],woL[i]]
wLsum = wLsum + wL[i]
woLsum = woLsum + woL[i]
end
print "\nAverage Values \n"
print "%.2f \t\t\t %.2f\n\n" %[wLsum/COUNT, woLsum/COUNT]
end
end

@ -10,19 +10,24 @@
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="no-aegis-test" type="Functional" description="Check that an application that doesn't have aegis file doesn't get any funny credentials." timeout="120" level="System" insignificant="true" >
<case name="launch-multi-app-cont" type="Functional" description="Test that launcher and invoker have correct credentials" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_009_launch_multiple_apps_cont</step>
</case>
<case name="launch-without-applauncherd" type="Functional" description="Test invoker can launch applications even when applauncherd is not running" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_020_launch_wo_applauncherd</step>
</case>
<case name="no-aegis-test" type="Functional" description="Check that an application that doesn't have aegis file doesn't get any funny credentials." timeout="360" level="System" insignificant="true" >
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_007_no_aegis_Bug170905</step>
</case>
<case name="invoker-creds" type="Functional" description="Test that launcher and invoker have correct credentials" timeout="120" level="System" insignificant="true">
<case name="invoker-creds" type="Functional" description="Test that launcher and invoker have correct credentials" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_008_invoker_creds</step>
</case>
<case name="launch-multi-app-cont" type="Functional" description="Test that launcher and invoker have correct credentials" timeout="120" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_009_launch_multiple_apps_cont</step>
</case>
<case name="creds-test" type="Functional" description="Test that launched applications get correct credentials when they provide Aegis files" timeout="120" level="System" insignificant="true">
<case name="creds-test" type="Functional" description="Test that launched applications get correct credentials when they provide Aegis files" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_006_creds</step>
</case>
<environments>
@ -39,11 +44,11 @@
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="app-specific" type="Functional" description="Application specific theming tests" timeout="120" level="System" insignificant="true">
<case name="app-specific" type="Functional" description="Application specific theming tests" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/tc_theming.rb --name test_application_specific_theming</step>
</case>
<case name="global-theming" type="Functional" description="Tests that global theming changes affect launched applications" timeout="120" level="System" insignificant="true">
<case name="global-theming" type="Functional" description="Tests that global theming changes affect launched applications" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/tc_theming.rb --name test_global_theming</step>
</case>
@ -61,18 +66,21 @@
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="invoker-wait-term" type="Functional" description="Test that the launched application is killed when killing invoker that is waiting for app to terminate" timeout="120" level="System" insignificant="true">
<case name="invoker-wait-term" type="Functional" description="Test that the launched application is killed when killing invoker that is waiting for app to terminate" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_010</step>
</case>
<case name="invoker-status" type="Functional" description="To test that invoker returns the same exit status as the application" timeout="120" level="System" insignificant="true">
<case name="invoker-status" type="Functional" description="To test that invoker returns the same exit status as the application" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_017_invoker_exit_status</step>
</case>
<case name="gid-uid" type="Functional" description="To Test that the set gid and uid is passed from invoker process to launcher" timeout="120" level="System" insignificant="true">
<case name="gid-uid" type="Functional" description="To Test that the set gid and uid is passed from invoker process to launcher" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_018_invoker_gid_uid</step>
</case>
<case name="signal-forwarding" type="Functional" description="To Test that invoker is killed by the same signal as the application" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_019_signal_forwarding</step>
</case>
<environments>
<scratchbox>true</scratchbox>
@ -85,15 +93,15 @@
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="fd-booster-m" type="Functional" description="File descriptor test for booster-m" timeout="120" level="System" insignificant="false">
<case name="fd-booster-m" type="Functional" description="File descriptor test for booster-m" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_014_fd_booster_m</step>
</case>
<case name="fd-booster-q" type="Functional" description="File descriptor test for booster-q" timeout="120" level="System" insignificant="false">
<case name="fd-booster-q" type="Functional" description="File descriptor test for booster-q" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_015_fd_booster_q</step>
</case>
<case name="kill-boosters" type="Functional" description="Test that booster is restarted if it is killed" timeout="120" level="System" insignificant="false">
<case name="kill-boosters" type="Functional" description="Test that booster is restarted if it is killed" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_016_restart_booster</step>
</case>
<environments>

@ -5,7 +5,7 @@
<!-- Schema: https://projects.maemo.org/docs/testing/xml-definition.html -->
<suite name="applauncherd-performance-tests" domain="Application framework">
<set name="applauncherd-performance-tests" description="applauncherd performance tests for Meego touch applications" feature="AF DUI Booster for Launcher daemon" requirement="300195">
<set name="test-commandline" description="applauncherd application startup time from command line" feature="AF DUI Booster for Launcher daemon" requirement="300195">
<pre_steps>
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
@ -21,7 +21,24 @@
<get>
<file>/tmp/launcher_perf.txt</file>
<file>/tmp/testapp.log</file>
</get>
</set>
<set name="test-applicationGrid" description="applauncherd application startup time from application grid" feature="AF DUI Booster for Launcher daemon" requirement="300195">
<pre_steps>
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="Perf-Test" type="Performance" description="Measure launcher performance" timeout="360" level="System">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/test-perf.rb --name test_performance &gt; /tmp/launcher_perf_new.txt</step>
</case>
<environments>
<scratchbox>false</scratchbox>
<hardware>true</hardware>
</environments>
<get>
<file>/tmp/launcher_perf_new.txt</file>
</get>
</set>

Loading…
Cancel
Save