Commit Graph

2726 Commits

Author SHA1 Message Date
Dario Casalinuovo
ada4f9788f MediaClient: Add play and test options 2017-04-28 02:13:51 +02:00
Augustin Cavalier
3f2162c629 tests/kits/net: Remove old version of the DialUpPreflet.
Hopefully there aren't any more copies of this hiding in the tree....
2017-04-25 10:56:42 -04:00
Augustin Cavalier
5495e4f674 netperf: Remove from tree.
Not actively used and there is a recipe available.
2017-04-25 10:55:29 -04:00
Augustin Cavalier
15d60d5e45 stickit_BJoystick: Remove unused .proj file. 2017-04-18 16:02:49 -04:00
Adrien Destugues
a4834579f8 Add test for BNetworkAddress::Equals
Shows that #12247 is invalid.
2017-03-25 15:49:44 +01:00
John Scipione
dc0b0016ad StringSearchTest: Add unit tests for new methods 2017-02-21 18:03:03 -08:00
John Scipione
17a4134733 StringSearchTest: automatic whitespace cleanup 2017-02-21 18:03:03 -08:00
Augustin Cavalier
b6f76ebe71 s/OpenBeOS License/MIT License/ universally, as they're the same thing.
Fixes #8681.
2017-02-09 22:09:56 -05:00
Freeman Lou
aa3083e086 Style fixes to various parts of the system.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

This patch was never applied after GSoC 2012. Rebase the parts that
still apply so we can close the ticket.

Fixes #9490.
2017-01-29 22:47:28 +01:00
Andrew Aldridge
f31b1a2faf Implement scrypt-based password hashing
Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2017-01-17 23:09:04 +01:00
Dario Casalinuovo
7561d9ac5d Populate media/experimental with future media_kit classes
* Node implementations headers are move into src/kits/media.
2017-01-16 23:04:14 +01:00
Dario Casalinuovo
fdfd8a502e General MediaClient cleanup
* Avoid setting fRunning in different places.
* Fix SimpleMediaOutput kind mismatch.
* Other minor fixes.
2017-01-15 19:28:14 +01:00
Adrien Destugues
bdd02e0d9d BString: rename SetCharAt to SetByteAt
Makes it clear that it operates on bytes, not unicode codepoints.
Thanks to mmlr for remembering me of this subtlety.
2017-01-12 22:03:51 +01:00
Adrien Destugues
7556ae845b Fix unit tests for BString API change. 2017-01-11 21:54:31 +01:00
Dmytro Shynkevych
0e0f49e799 libroot: Implemented pthread barriers
This is an implementation of pthread barriers pursuant to the relevant specification.

Barriers are essentially a special case of conditional variables,
such that all threads waiting on one are woken up when the number of
waiters reaches a number provided at the initialization of the barrier.
In view of that, this implementation mimics the implementation of pthread_cond,
except it is more specialized and self-contained.

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2016-12-30 11:32:04 +01:00
Jérôme Duval
9969137ced fork(): Follow-up fix to 17b2a3cfc.
* Ingo rightly noticed that the defer_signals counter is reinitialized on
  thread's user area creation. Setting the flag THREAD_CREATION_FLAG_DEFER_SIGNALS
  indeed gives the expected behavior, deferring signals until undefer_signals() is
  called in the child thread. Thanks for the review and fix suggestion.
* Added a simple test showing the values of the defer_signals counter after fork().
2016-12-18 09:44:03 +01:00
Dario Casalinuovo
ecb395852e Introduce BSimpleMediaClient
* The idea is to move the callback based mechanism into a derived
class. The objects can be composed to create working systems.
* The BMediaClient class supply RegisterInput/RegisterOutput
and BeginInput/BeginOutput is moved to BSimpleMediaClient.
* Various minor fixes.
2016-11-29 01:22:35 +01:00
Dario Casalinuovo
6d0255216e MediaClient: Introduce BMediaInput and BMediaOutput 2016-11-25 17:38:44 +01:00
Dario Casalinuovo
8a8384b47f media_client test: Include debug header 2016-11-25 00:07:20 +01:00
Dario Casalinuovo
ace98a8db2 media_client test: Add delayed mode when debugging 2016-11-24 18:21:51 +01:00
Dario Casalinuovo
8e980a4066 media_client test: Set an actual format for connections 2016-11-24 00:27:58 +01:00
Dario Casalinuovo
5ec9bd1eff MediaClient: general cleanup 2016-11-18 17:46:19 +01:00
Dario Casalinuovo
ed0a5452c2 media_client_test: Add more complex tests 2016-11-17 18:47:38 +01:00
Dario Casalinuovo
63b4dd8cef Add simple BMediaClient test 2016-11-17 02:44:42 +01:00
Adrien Destugues
f4db7fdc68 BUrl: allow URLs without protocol or authority again.
Parsing an URL can never fail. The regexp is designed to match any
input. In the worst case, everything will end up in the "path"
component. WebPositive relies on this to generate file URLs from a plain
path.

URLs without a protocol are also possible, and can be used with an
implicit protocol. A typical example is network shares sometimes noted in
"//host.domain/path/file" form.

Add tests for these two cases and fix the parser to behave as expected.
2016-11-05 13:01:36 +01:00
Adrien Destugues
a9af524dbb BPrintJob test: build fix. But the app crashes. 2016-11-05 13:01:36 +01:00
Andrew Lindesay
cf65729463 Url: implement same URL parsing logic in C/C++ code
- Remove uses of group matching regular expression, not available on all
  build hosts,
- Parsing is faster than our old regexp engine.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

- Fixes #13002
- Fixed some indentation (tabs vs space), please configure your editor
  properly.
2016-10-31 09:14:44 +01:00
Adrien Destugues
f004acb098 HttpDate: fix parsing of 2-digit year dates.
Fixes #13043.
Added the affected cookies to the testsuite to avoid future regressions.
2016-10-31 08:59:23 +01:00
Dario Casalinuovo
0ba82236bd Streaming: Remove any pointer BUrl argument
* There's no need to pass BUrl by pointer, this is
potentially dangerous and leaky without any advantage,
copying is definitely safer.
2016-06-24 19:00:38 +02:00
Andrew Lindesay
fa2dd9c45f BPackageInfo::Parser: Validate URL strings.
Fixes #12710.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
I fixed the modifications to the Jamfiles in src/bin, they were all wrong
in the patch.
2016-06-18 18:40:07 -04:00
Dario Casalinuovo
2838795413 streamer_sniff_test: Little improvements
* Print tracks detected count.
* Delete media file before to exit.
2016-05-31 01:15:09 +02:00
Dario Casalinuovo
e7a7cd4eda Add streamer_sniff_test
* This is a simple test that open an url for streaming using
BMediaFile, the purpose is to test if streamers sniffing work
well.
2016-05-19 02:08:39 +02:00
Jérôme Duval
f022c304b0 readdir_r(): uses the logic of readdir()...
to retrieve more than one entry.
* readdir_r() is now affected by rewinddir(), thus fixing #12755.
* extends dirent_test with readdir_r().
2016-05-07 16:40:53 +02:00
Adrien Destugues
884412df8e Fix test_app_server build, again
- Interface Kit tests use a View class which is not BView, and has no
SetViewUIColor.
- Libexpat is now in a separate package.
- Shouldn't we add this to the buildbots so we can cath the breakage?
2016-02-14 21:12:33 +01:00
Kostadin Damyanov
00bb5b5957 unitests: fix the symlink to the resources directory
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2016-01-27 19:44:03 -05:00
Jessica Hamilton
b8878f83ca Build: adjust Jamfiles in unittests for libshared.a change. 2016-01-16 15:44:26 +13:00
Rene Gollent
8028ede7db Build: Add architecture rule for libshared.a.
- As suggested by Ingo, add libshared.a to the architecture name map.
  This allows it to be linked by its short name like other frequently
  used libraries.
- Adjust all Jamfiles referencing the lib accordingly.
2016-01-15 21:12:24 -05:00
looncraz
d231c2a7a5 tests: Convert to using Set*UIColor.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Patches 0018-0019 from looncraz.
2016-01-04 07:15:57 -05:00
Augustin Cavalier
d8ca833a35 SliderTest: dos2unix. 2016-01-04 07:10:54 -05:00
Simon South
dbf060a3f7 libroot: Add brk() and sbrk().
This commit replaces the placeholder implementation of sbrk(), which
operated on a process' heap, with real implementations of brk() and
sbrk() that adjust a process' program break.

* unistd.h: Add standard definitions of brk() and sbrk(); include
  stdint.h for intptr_t.
* thread.cpp: Recognize RLIMIT_AS and RLIMIT_DATA resource limits
  (both currently unlimited); order limit identifiers alphabetically.
* arch-specific.cpp: Remove sbrk_hook().
* malloc_debug_api.cpp: Remove sbrk_hook().
* unistd/Jamfile: Build brk.c instead of sbrk.c.
* unistd/brk.c: Add.
* unistd/sbrk.c: Delete (placeholder implementation).
* libroot_stubs.c: Remove sbrk_hook().
* libroot_stubs_legacy.c: Remove sbrk_hook().
* src/tests/.../posix/Jamfile: Build brk_test.c.
* brk_test.c: Add (simple unit test that demonstrates behaviour of
  sbrk()).

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2015-11-22 17:59:22 +01:00
Julian Harnath
345d9bb4a2 test_app_server: fix build 2015-11-18 14:04:19 +01:00
Julian Harnath
6109a2086d Merge branch 'app_server'
Conflicts:
	src/kits/interface/PicturePlayer.cpp
	src/servers/app/ServerPicture.cpp

In addition, the following files were also adapted to master branch
BPicture changes during the merge:
	src/kits/interface/PicturePlayer.h
	src/servers/app/PictureBoundingBoxPlayer.cpp
2015-11-10 23:09:54 +01:00
Simon South
75c31ae28d system: Build using public elf.h header
Reduce duplication of code by

* Removing from elf_common.h definitions available in os/kernel/elf.h
* Deleting elf32.h and elf64.h
* Renaming elf_common.h to elf_private.h
* Updating source to build using public and private ELF header files
  together

Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2015-11-07 11:49:56 +13:00
Simon South
6abbd31061 unittests: Build copied BAppTest files
This adds to the "unittests" target a dependency on the
"AppTestRunApp3a" (etc.) files meant to be copied as part of the
BApplication test suite so they are generated when "jam unittests" is
run.

* TestsRules: Add "UnitTestDependency" rule.
* testapps/Jamfile: Make unit tests depend on copied files.

Fixes #12441.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2015-11-01 14:19:04 +01:00
Simon South
1a28be27e8 Fix unittests build.
Signed-off-by: John Scipione <jscipione@gmail.com>
2015-10-27 10:28:36 -07:00
Axel Dörfler
d9bb9513c5 launch_daemon: "file_exists" now resolves $HOME, and '~'. 2015-10-19 21:22:21 +02:00
Stefano Ceccherini
e5f9dfebd7 FlattenPictureTest: Add FillTriangle() with gradients test 2015-09-18 23:20:09 +02:00
Stefano Ceccherini
00c573d643 FlattenPictureTest: Add tests for FillRoundRect with gradients 2015-09-18 23:20:09 +02:00
Stefano Ceccherini
b8c65995cd FlattenPictureTest: Add tests for FillRegion with gradients 2015-09-18 23:20:08 +02:00
Stefano Ceccherini
7cf26360d9 FlattenPictureTest: Add failing test
InvertRect, when mixed with SetDrawingMode calls, fails to draw correctly
to a BPicture.
2015-09-18 23:20:08 +02:00