Commit Graph

31 Commits

Author SHA1 Message Date
Mike Frysinger
fdaf1c65cd Add a new function, bool rc_getfile(const char *, char **, size_t *)
<snip>
Read the entire @file into the buffer and set @len to the
size of the buffer when finished. For C strings, this will
be strlen(buffer) + 1.
Don't forget to free the buffer afterwards!
</snip>

We also fix bug 374899 by adding this new function.

X-Gentoo-Bug: 374899
X-Gentoo-Bug-URL: http://bugs.gentoo.org/374899
2011-07-13 21:31:20 +02:00
Mike Frysinger
c0aa27ef32 tests: filter valid parisc relocs
Parisc generates a few relocs against internal symbols which are OK.

X-Gentoo-Bug: 258913
X-Gentoo-Bug-URL: http://bugs.gentoo.org/258913
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-14 12:06:58 -05:00
Mike Frysinger
c825a74dd1 tests: check for trailing blank newlines
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17 20:04:53 -05:00
Robin H. Johnson
f3f55f1f6d Build cleanup: librc.funcs.hidden.list is generated by testsuite. 2011-01-17 19:34:09 +00:00
Robin H. Johnson
2b7c2b8cf1 Bug #351570: Hidden function fixes: rc_conf_value.
Refactor rc_conf_value into librc for use in library context.
Also requires moving:
- rc_conf internal static
- Defines: PROFILE_ENV, SYS_WHITELIST, USR_WHITELIST, RC_PATH_PREFIX
  moved to rc.h with new RC_ prefix added.
- Defines: RC_CONF, RC_CONF_OLD moved to rc.h.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-01-17 19:29:45 +00:00
Mike Frysinger
6e876bca13 tests: check for common style issues
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17 04:49:35 -05:00
Robin H. Johnson
0e90ae266a Factor out new function rc_deptree_load_file to aid in debugging deptree files from users. Loads from a given filename instead of the hardcoded RC_DEPTREE_CACHE define. 2011-01-17 06:32:46 +00:00
Robin H. Johnson
09f990a7c8 Implement explicit selection of subsystem types.
- Fixes bugs #347583, #349389, both of which were triggered by cgroups
  being detected as the LXC subsystem type.
- Makes it much easier to select "prefix" type.
- "rc -S" will now print a warning if you have not configured rc_sys in
  /etc/rc.conf
- All other semantics of rc_sys are unchanged in this patch.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-01-05 22:09:34 -08:00
Roy Marples
6abeec7430 Use rc_getline instead of assuming a fixed kernel cmdline length.
This is now requires as COMMAND_LINE_SIZE isn't exposed by kernel
headers anymore.
Fixes #177.
2009-06-21 12:20:53 +01:00
Roy Marples
6615eb4b68 Add runlevel stacking, #88
This implementation has the limitation that you cannot have a stacked
runlevel and service of the same name in a runlevel.
2009-05-02 12:26:45 +01:00
Roy Marples
e040bd77e9 Ignore test results 2009-05-02 12:18:34 +01:00
Roy Marples
f38ef00939 Fix unit test. 2009-02-23 10:43:24 +00:00
Roy Marples
749938d439 Style. 2009-02-23 09:35:57 +00:00
Roy Marples
38e6c9ba5c make ignore now configures the sv:ignore property. 2008-12-04 12:38:23 +00:00
Roy Marples
2c98c5326a Punt .gitignore files. 2008-12-04 12:12:09 +00:00
Roy Marples
d117b2d644 Fix tests, #Gentoo 240350. 2008-10-07 12:14:53 +00:00
Roy Marples
a88a177f99 Add older_than function to complement newer_than function. Also make the userland instance reversed to be compatable with current baselayout, which truely does suck. 2008-07-03 13:11:47 +00:00
Roy Marples
28a65393ca More unit fixes. 2008-07-03 13:09:10 +00:00
Roy Marples
aa57dd1ff6 More unit fixes. 2008-07-03 12:33:42 +00:00
Roy Marples
e0968a1c2e Fix test. 2008-07-03 12:20:32 +00:00
Roy Marples
2f5d2855ba Add an is_older_than unit test, thanks to zzam 2008-07-03 12:07:46 +00:00
Roy Marples
ee4e861796 Put some dir locations in rc.h so that 3rd party apps can become awware of them. 2008-03-28 10:46:12 +00:00
Roy Marples
11e33e81c8 Remove rc_service_start/stop from librc as they block and unmask signals. The application may not wish this behaviour and should fork/exec the service itself. 2008-03-28 08:42:05 +00:00
Roy Marples
1b40379a79 We should sort using LC_ALL=C to avoid locale issues. 2008-03-26 08:43:05 +00:00
Mike Frysinger
486d517674 setup a bit of a test framework 2008-03-24 07:17:05 +00:00
Mike Frysinger
1c9c2f9fcf fixup testing 2008-03-24 06:30:21 +00:00
Mike Frysinger
58caa0864f ignore generated files 2008-03-24 06:18:51 +00:00
Mike Frysinger
9ed5d28d15 add check/test rules 2008-03-24 06:10:40 +00:00
Roy Marples
ac9279cc0d Massive whitespace cleanup 2007-11-28 15:45:03 +00:00
Roy Marples
675d0a94c7 No need for bash here 2007-09-26 09:16:41 +00:00
Mike Frysinger
727a2d90ee add some tests to make sure our exported symbols are sane 2007-09-26 08:44:39 +00:00