From b50812ff5ef5009b7c6babb19fd9caa315f31515 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Wed, 1 Mar 2023 08:52:53 -0500 Subject: appimage testing --- test/appimage/main.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 test/appimage/main.c (limited to 'test/appimage/main.c') diff --git a/test/appimage/main.c b/test/appimage/main.c new file mode 100644 index 000000000..83c495183 --- /dev/null +++ b/test/appimage/main.c @@ -0,0 +1,32 @@ +// This is a simple hello program compiled on Debian 11 (glibc 2.31) +// and packaged as an appimage using appimagetool from +// https://github.com/AppImage/AppImageKit. The tool in installed +// in the current directory. +// +// Building the appimage: +// mkdir -p AppDir/usr/bin +// gcc -o AppDir/usr/bin/hello main.c && strip AppDir/usr/bin/hello +// ./appimagetool AppDir + + +#include +#include +#include + +int main(int argc, char **argv) { + // test args + int i; + for (i = 1; i < argc; i++) + printf("%d - %s\n", i, argv[i]); + + printf("Hello, World!\n"); + + // elevate privileges - firejail should block it + system("ping -c 3 127.0.0.1\n"); + + printf("Hello, again!\n"); + sleep(30); + + return 0; +} + -- cgit v1.2.3-54-g00ecf