Systemd/src/test
Michael Karcher 8869a0b40b util-lib: Add sparc64 support for process creation (#3348)
The current raw_clone function takes two arguments, the cloning flags and
a pointer to the stack for the cloned child. The raw cloning without
passing a "thread main" function does not make sense if a new stack is
specified, as it returns in both the parent and the child, which will fail
in the child as the stack is virgin. All uses of raw_clone indeed pass NULL
for the stack pointer which indicates that both processes should share the
stack address (so you better don't pass CLONE_VM).

This commit refactors the code to not require the caller to pass the stack
address, as NULL is the only sensible option. It also adds the magic code
needed to make raw_clone work on sparc64, which does not return 0 in %o0
for the child, but indicates the child process by setting %o1 to non-zero.
This refactoring is not plain aesthetic, because non-NULL stack addresses
need to get mangled before being passed to the clone syscall (you have to
apply STACK_BIAS), whereas NULL must not be mangled. Implementing the
conditional mangling of the stack address would needlessly complicate the
code.

raw_clone is moved to a separete header, because the burden of including
the assert machinery and sched.h shouldn't be applied to every user of
missing_syscalls.h
2016-05-29 20:03:51 -04:00
..
.gitignore test: generate tests for OrderedHashmap from Hashmap tests 2014-10-23 17:38:02 +02:00
Makefile
test-acl-util.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-af-list.c util-lib: split our string related calls from util.[ch] into its own file string-util.[ch] 2015-10-24 23:05:02 +02:00
test-alloc-util.c tests: move alloc related tests to test-alloc-util.c 2016-03-03 18:46:58 +01:00
test-architecture.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-arphrd-list.c util-lib: split our string related calls from util.[ch] into its own file string-util.[ch] 2015-10-24 23:05:02 +02:00
test-ask-password-api.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-async.c util-lib: move more file I/O related calls into fileio.[ch] 2015-10-27 13:25:55 +01:00
test-barrier.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-bitmap.c bitmap: make bitmap_clear free the bitmap array 2015-07-31 19:08:26 +02:00
test-boot-timestamps.c shared/acpi-fpdt: use ENODATA for missing data and skip test 2016-03-04 21:45:45 -05:00
test-btrfs.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-calendarspec.c calendarspec: fix find_next skipping times 2016-02-22 08:02:48 -05:00
test-cap-list.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-capability.c tests: test ambient capabilities. 2016-01-12 12:14:50 +02:00
test-cgroup-mask.c Merge pull request #3290 from htejun/cgroup2-io-compat 2016-05-20 18:53:11 +02:00
test-cgroup-util.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-cgroup.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-clock.c test-clock: fix FILE* leak 2016-02-29 17:40:08 +01:00
test-condition.c selinux: split up mac_selinux_have() from mac_selinux_use() 2015-11-27 20:28:13 +01:00
test-conf-files.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-conf-parser.c tests: move conf-parser related tests to test-conf-parser.c 2016-03-03 19:04:06 +01:00
test-copy.c test-copy: never call alloca() in a loop 2016-04-29 14:28:04 +02:00
test-cpu-set-util.c tests: move cpu-set-util related tests to test-cpu-set-util.c 2016-03-03 18:46:58 +01:00
test-daemon.c Enable test-daemon, test-log, test-watchdog by default 2016-03-04 21:45:45 -05:00
test-date.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-device-nodes.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-dns-domain.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-ellipsize.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-engine.c basic: remove rm_rf_and_free, add rm_rf_physical_and_free, use rm_rf_physical_and_freep in tests (#3292) 2016-05-20 15:08:24 +02:00
test-env-util.c test-env-util: test env_{value,assignment}_is_valid 2016-03-21 16:49:42 -04:00
test-escape.c tests: move escape related tests to test-escape.c 2016-03-03 18:46:58 +01:00
test-execute.c core: remove ManagerRunningAs enum 2016-04-12 13:43:30 +02:00
test-extract-word.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-fd-util.c tests: move fd-util related tests to test-fd-util.c 2016-03-03 19:04:06 +01:00
test-fdset.c util-lib: move more file I/O related calls into fileio.[ch] 2015-10-27 13:25:55 +01:00
test-fileio.c basic: define HEXDIGITS 2016-05-17 16:55:20 -04:00
test-firewall-util.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-fs-util.c tests: move fs-util related tests to test-fs-util.c 2016-03-03 19:04:06 +01:00
test-fstab-util.c tests: move fstab-util related tests to test-fstab-util.c 2016-03-03 19:04:06 +01:00
test-glob-util.c tests: move glob-util related tests to test-glob-util.c 2016-03-03 19:04:07 +01:00
test-hashmap-plain.c test-hashmap: fix undefined behaviour on string constants 2016-02-18 19:39:10 -05:00
test-hashmap.c tree-wide: sort includes 2015-11-16 22:09:36 +01:00
test-helper.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-hexdecoct.c tests: move hexdecoct tests to test-hexdecoct.c 2016-03-03 18:46:58 +01:00
test-hostname-util.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-hostname.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-id128.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-install-root.c Merge pull request #3183 from crawford/preset-array 2016-05-03 16:24:09 -04:00
test-install.c core: Filter by unit name behind the D-Bus, instead on the client side (#3142) 2016-04-29 15:59:51 +02:00
test-io-util.c tests: move io-util related tests to test-io-util 2016-03-03 19:04:06 +01:00
test-ipcrm.c test-ipcrm: fix log message 2016-03-10 12:57:23 +01:00
test-job-type.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-libudev.c test-libudev: disable monitor mode by default and add to automatic tests 2016-03-04 21:45:45 -05:00
test-list.c basic: add LIST_INSERT_BEFORE 2015-08-04 03:23:43 -07:00
test-locale-util.c tree-wide: sort includes 2015-11-16 22:09:36 +01:00
test-log.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-loopback.c Move test-loopback to normal tests 2016-03-04 21:45:44 -05:00
test-namespace.c tests: don't silently skip test-namespace 2016-04-10 23:41:04 +00:00
test-netlink-manual.c tree-wide: minor formatting inconsistency cleanups 2016-02-23 14:20:34 -08:00
test-ns.c Remove kdbus custom endpoint support 2016-02-11 22:12:04 +01:00
test-nss.c build: fix test-nss.c build failure with --disable-{resolved,myhostname} (#3081) 2016-04-21 12:13:08 +02:00
test-parse-util.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-path-lookup.c systemctl: don't confuse sysv code with generated units 2016-04-12 13:43:32 +02:00
test-path-util.c test-path-util: add a trivial test for hidden_or_backup_file 2016-04-28 08:25:17 -04:00
test-path.c basic: remove rm_rf_and_free, add rm_rf_physical_and_free, use rm_rf_physical_and_freep in tests (#3292) 2016-05-20 15:08:24 +02:00
test-prioq.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-proc-cmdline.c tests: move proc-cmdline related tests to test-proc-cmdline.c 2016-03-03 19:04:06 +01:00
test-process-util.c tests: add personality tests 2016-02-22 23:23:06 +01:00
test-ratelimit.c tree-wide: sort includes 2015-11-16 22:09:36 +01:00
test-replace-var.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-rlimit-util.c core: make parsing of RLIMIT_NICE aware of actual nice levels 2016-04-29 16:27:49 +02:00
test-sched-prio.c basic: remove rm_rf_and_free, add rm_rf_physical_and_free, use rm_rf_physical_and_freep in tests (#3292) 2016-05-20 15:08:24 +02:00
test-selinux.c test-selinux: use yes_no() and strnull() 2016-03-04 21:45:58 -05:00
test-set.c core: set_put never returns -EEXIST 2015-04-10 17:13:15 +02:00
test-sigbus.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-signal-util.c tests: move signal-util related tests to test-signal-util.c 2016-03-03 18:46:58 +01:00
test-siphash24.c test-siphash24: add a test for concatenating very short buffers 2016-02-20 16:34:59 -05:00
test-sizeof.c test-sizeof: add a helper which prints variable sizes and signedness 2016-03-02 10:42:27 -05:00
test-sleep.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-socket-util.c util-lib: add new ifname_valid() call that validates interface names 2016-05-09 15:45:31 +02:00
test-stat-util.c tests: move stat-util related tests to test-stat-util.c 2016-03-03 19:04:06 +01:00
test-strbuf.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-string-util.c tests: move string related tests to test-string-util.c 2016-03-03 18:46:58 +01:00
test-strip-tab-ansi.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-strv.c test-strv: add a test that extending empty strv works as expected 2016-04-13 21:09:32 -04:00
test-strxcpyx.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-tables.c remove bus-proxyd 2016-02-12 19:10:01 +01:00
test-terminal-util.c tree-wide: sort includes 2015-11-16 22:09:36 +01:00
test-time.c tree-wide: make ++/-- usage consistent WRT spacing 2016-02-22 20:32:04 -08:00
test-tmpfiles.c tree-wide: remove unused variables (#3098) 2016-04-22 20:49:07 -04:00
test-udev.c tests: port udev-test to log_*_errno (#3015) 2016-04-11 21:31:57 +02:00
test-uid-range.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-unaligned.c tree-wide: sort includes 2015-11-16 22:09:36 +01:00
test-unit-file.c basic: remove rm_rf_and_free, add rm_rf_physical_and_free, use rm_rf_physical_and_freep in tests (#3292) 2016-05-20 15:08:24 +02:00
test-unit-name.c core: remove ManagerRunningAs enum 2016-04-12 13:43:30 +02:00
test-user-util.c tests: move user-util related tests to test-user-util.c 2016-03-03 19:04:06 +01:00
test-utf8.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-util.c util-lib: Add sparc64 support for process creation (#3348) 2016-05-29 20:03:51 -04:00
test-verbs.c test-verbs: add unit tests for verbs minilib 2015-01-08 15:57:38 -05:00
test-watchdog.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-web-util.c tests: move web-util related tests to test-web-util.c 2016-03-03 18:46:58 +01:00
test-xattr-util.c tests: move xattr-util related tests to test-xattr-util.c 2016-03-03 19:04:07 +01:00
test-xml.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00