tools/fuzz-testing.git
6 years agoFix variables names conflict in the 'build' command script 19/158719/2
Dmitriy Nikiforov [Thu, 2 Nov 2017 14:20:53 +0000 (17:20 +0300)]
Fix variables names conflict in the 'build' command script

Change-Id: Iaf39f0cccb6fea08831c733f85860d6cfe58d1be

6 years agoClean all previously published targets in the 'publish' command 03/158403/4
Dmitriy Nikiforov [Tue, 31 Oct 2017 16:44:46 +0000 (19:44 +0300)]
Clean all previously published targets in the 'publish' command

This should save us a lot of space on device.

Change-Id: I42e47c223cb6c07c8c46ccbda844a167bc20a235

6 years agoSet UBSAN_OPTIONS=print_stacktrace=0 in coverage dump mode 95/158395/4
Dmitriy Nikiforov [Tue, 31 Oct 2017 13:14:51 +0000 (16:14 +0300)]
Set UBSAN_OPTIONS=print_stacktrace=0 in coverage dump mode

This should speed up coverage generation with UBSan.

Change-Id: Idbd0552fd4652a7f3f9a48f67d3831f803599f73

6 years agoRemove ASan logs printing in the 'run' command 88/158388/4
Dmitriy Nikiforov [Tue, 31 Oct 2017 12:22:50 +0000 (15:22 +0300)]
Remove ASan logs printing in the 'run' command

ASan and UBSan logs are merged with the libFuzzer logs currently.

Change-Id: I1d349638fc8d091bf78f234320f24c7482e4fa07

6 years agoRemoved no longer needed logs symbolization in the 'report' command 82/158382/6
Dmitriy Nikiforov [Tue, 31 Oct 2017 11:37:49 +0000 (14:37 +0300)]
Removed no longer needed logs symbolization in the 'report' command

Change-Id: If67993ad181fdfbc9054838be031b0fc191a9e58

6 years agoFix UBSan errors counter in the 'report' command script 81/158381/5
Dmitriy Nikiforov [Tue, 31 Oct 2017 11:23:15 +0000 (14:23 +0300)]
Fix UBSan errors counter in the 'report' command script

Count number of matches instead of words in every matched line.

Also, changed [CRASH] label to less confusing [FAILED].

Change-Id: I7bfdbcfc1de5deafba543824563905c36f91866b

6 years agoExclude system headers from coverage reports 32/158532/2
Dmitriy Nikiforov [Wed, 1 Nov 2017 13:25:30 +0000 (16:25 +0300)]
Exclude system headers from coverage reports

Change-Id: I3d103fc78080188fd077278279e3b6010caad249

6 years agoPush target sources to device in 'report' command 92/158092/3
Dmitriy Nikiforov [Fri, 27 Oct 2017 20:32:10 +0000 (23:32 +0300)]
Push target sources to device in 'report' command

Needed to generate target source coverage visualization.

Change-Id: I20e0427af9b9a1109e5e35a5a22c7ab720e23af3

6 years agoArchive target sources in 'build' command 91/158091/3
Dmitriy Nikiforov [Fri, 27 Oct 2017 16:53:56 +0000 (19:53 +0300)]
Archive target sources in 'build' command

Change-Id: I8d884b6c8e7e38994435f94d7f77b4f8e8150e03

6 years agoMake a separate directory for target sources in the GBS container 90/158090/3
Dmitriy Nikiforov [Fri, 27 Oct 2017 19:48:55 +0000 (22:48 +0300)]
Make a separate directory for target sources in the GBS container

Change-Id: I2c546b59d81529a686dd86cbae9dab2fbf18c076

6 years agoChange used sanitizer detection method 70/158370/2
Dmitriy Nikiforov [Tue, 31 Oct 2017 10:08:59 +0000 (13:08 +0300)]
Change used sanitizer detection method

'nm' utility is replaced with 'ldd' which is more precise and reliable way
to determine which sanitizer was used in the target.

This change also makes 'binutils' package dependency no longer necessary and
the corresponding '--install-deps' option for the 'run' command is removed.

Change-Id: Ie8577dc91b8657a7e987e84a2281f55c230f372a

6 years agoFix 'publish' command issues 43/158343/2
Dmitriy Nikiforov [Tue, 31 Oct 2017 06:51:51 +0000 (09:51 +0300)]
Fix 'publish' command issues

 * Replaced rpm '-i' flag with '-U' to remove older version of installed
   packages.
 * Added cleaning of /sanitized directory to remove artifacts from previous
   runs.

Change-Id: Idf91f2408a1d48c55973fbada498dc3f3caab07b

6 years agoCount UBSan errors in post-build script 87/158087/3
Dmitriy Nikiforov [Fri, 27 Oct 2017 18:56:51 +0000 (21:56 +0300)]
Count UBSan errors in post-build script

Change-Id: I68a572805a90c223eca8e8ba254e106545fb0c92

6 years agoRefactoring in 'build' command script 89/158089/3
Dmitriy Nikiforov [Fri, 27 Oct 2017 16:50:54 +0000 (19:50 +0300)]
Refactoring in 'build' command script

Renamed variables:
 target_dir  -> project_dir
 target_name -> project_name

Change-Id: I6de6f920d4ec4778d8f6f2163540b49d20ab9b70

6 years agoRefactoring in 'build' and 'report' commands scripts 88/158088/3
Dmitriy Nikiforov [Fri, 27 Oct 2017 16:30:03 +0000 (19:30 +0300)]
Refactoring in 'build' and 'report' commands scripts

Added utility function to infra/utils.sh: clean_dir()

Change-Id: Ie8ace79c111e0f2f6295a65a44db10bb44df6ef1

6 years agoAdd target for json-c project 77/158277/3
Dmitriy Nikiforov [Mon, 30 Oct 2017 15:18:52 +0000 (18:18 +0300)]
Add target for json-c project

Fuzzed functions:
 * json_tokener_parse()
 * json_object_to_json_string()
 * json_object_put()

Change-Id: I4265275f46586d8b73f55b03fb98aadea5def898

6 years agoApply fuzzing for capi-media-image-util 66/155166/19
Anastasia Lyupa [Thu, 12 Oct 2017 07:49:58 +0000 (10:49 +0300)]
Apply fuzzing for capi-media-image-util

Add fuzz target environment, create initial decode
and encode fuzz targets.

Change-Id: I7639bbdab1d03d736e9ebf5067078ee101b2a9ae
Signed-off-by: Anastasia Lyupa <a.lyupa@samsung.com>
6 years agoFix check on 'sanitizer' variable value in the 'run' command script 53/158253/2
Dmitriy Nikiforov [Mon, 30 Oct 2017 12:10:00 +0000 (15:10 +0300)]
Fix check on 'sanitizer' variable value in the 'run' command script

Change-Id: I91f863328d28e58763283169de16dde599def51c

6 years agoFix check_deps and install_deps functions 93/158093/3
Dmitriy Nikiforov [Fri, 27 Oct 2017 20:44:42 +0000 (23:44 +0300)]
Fix check_deps and install_deps functions

Fixed issues:
 * striped extra newline characters from sdb output
 * added '.rpm' suffix to rpm output
 * rpms are pushed to the auto-generated temporary directory instead of /tmp

Change-Id: I18d5cac3d2636785cc30ad66ff62dde736a28b9d

6 years agoAdd check on available new versions of installed dependencies 95/154995/4
Dmitriy Nikiforov [Wed, 11 Oct 2017 14:25:46 +0000 (17:25 +0300)]
Add check on available new versions of installed dependencies

Force user to install dependencies on device if they are older than currently
available or if they are not installed on device.

Change-Id: I7fd3f3fe7bf64ad8c5deb251208b81822b06be1d

6 years agoAdd support for UBSan to 'report' command 70/157470/4
Dmitriy Nikiforov [Tue, 24 Oct 2017 14:07:38 +0000 (17:07 +0300)]
Add support for UBSan to 'report' command

Change-Id: I03f9bb2e79749d429ac2968698bc931b3df1aea0

6 years agoAdd support for UBSan to 'run-all' command 14/157214/4
Dmitriy Nikiforov [Mon, 23 Oct 2017 19:48:02 +0000 (22:48 +0300)]
Add support for UBSan to 'run-all' command

Updated 'publish' and 'run' commands arguments.

Change-Id: I13fdc1fcc229fda213590a40d6b32f6f7a75878e

6 years agoAdd support for UBSan to 'run' command 13/157213/4
Dmitriy Nikiforov [Mon, 23 Oct 2017 19:41:12 +0000 (22:41 +0300)]
Add support for UBSan to 'run' command

Now 'run' command requires 'binutils' package installed on device.
So '--install-deps' option is added to the command.

'run' command will check which sanitizer instrumentation was used
for the target and execute it with according options.

Change-Id: Id466dd5b6d4a6120e944e2547f0535b12a462426

6 years agoAdd check on build result in post-build script 82/157682/2
Dmitriy Nikiforov [Wed, 25 Oct 2017 18:04:52 +0000 (21:04 +0300)]
Add check on build result in post-build script

Need to avoid misleading Groovy-script errors in case of failed build.

Change-Id: Ie2f1d827ccea4f9cdc04473f07b7e0e12770bb09

6 years agoAdd support for UBSan to 'build' and 'build-all' commands 85/157485/4
Dmitriy Nikiforov [Tue, 24 Oct 2017 16:49:06 +0000 (19:49 +0300)]
Add support for UBSan to 'build' and 'build-all' commands

Added '--sanitizer' option to both commands specifying necessary sanitizer.
Updated infra/jenkins/rv_job_build.sh accordingly.

Change-Id: Ie9c4e74542885ba1425bf2b86e3a11835a3ced42

6 years agoAdd support for UBSan to 'publish' command 12/157212/2
Dmitriy Nikiforov [Mon, 23 Oct 2017 19:38:04 +0000 (22:38 +0300)]
Add support for UBSan to 'publish' command

Option '--with-asan' is renamed to '--with-sanitizers' now.

Change-Id: If1ab47255719e12c7c8d7b13fe4044b53cc347cc

6 years agoAdd '--repository' option to 'build' and 'build-all' commands 84/157484/2
Dmitriy Nikiforov [Tue, 24 Oct 2017 16:30:26 +0000 (19:30 +0300)]
Add '--repository' option to 'build' and 'build-all' commands

This option allows to specify a local repository to be used by GBS.
Mainly to be used for libFuzzer packages testing purpose.

Change-Id: I94cc5ebdb7b9c39ea01f3c97810bc7aa124d8e75

6 years agoFix printf in 'build' command 15/157215/2
Dmitriy Nikiforov [Mon, 23 Oct 2017 19:52:37 +0000 (22:52 +0300)]
Fix printf in 'build' command

Change-Id: I16e17b4648a4a006aa166c377a57ba66b3c8cbf5

6 years agoAdd fuzzing target for calendar_vcalendar_parse_to_calendar public API method 38/155838/5
p.privalov [Mon, 16 Oct 2017 09:02:29 +0000 (12:02 +0300)]
Add fuzzing target for calendar_vcalendar_parse_to_calendar public API method

Change-Id: I91590d3122f2596d1491a2913ac40bfaf41b776a

6 years agoChange default build architecture to i586 86/157486/2
Dmitriy Nikiforov [Tue, 24 Oct 2017 17:06:44 +0000 (20:06 +0300)]
Change default build architecture to i586

Change-Id: I9e6e31148faf20696a9e1a571b176df3898ad2dc

6 years agoAdd gif, jpeg, bmp dictionaries 37/155137/8
Anastasia Lyupa [Thu, 12 Oct 2017 06:45:01 +0000 (09:45 +0300)]
Add gif, jpeg, bmp dictionaries

Copy gif, jpeg dictionaries from afl
https://github.com/rc0r/afl-fuzz/tree/master/dictionaries
Create bmp dictionary as it is described here
http://cybersphinx.com/2017/03/01/simple-bitmap-file-fuzzer/

Change-Id: I19b407f291b60ccb6113491db7d67ad6797742b5
Signed-off-by: Anastasia Lyupa <a.lyupa@samsung.com>
6 years agoAdd '--merge' option to 'run' command for corpus minimization 54/155954/2
Dmitriy Nikiforov [Mon, 16 Oct 2017 13:35:41 +0000 (16:35 +0300)]
Add '--merge' option to 'run' command for corpus minimization

Change-Id: If7c839121abd8b7224de01998111a5e8a918034b

6 years agoFix found issues in targets for msg-service 67/155967/4
p.privalov [Mon, 16 Oct 2017 16:10:29 +0000 (19:10 +0300)]
Fix found issues in targets for msg-service

Change-Id: Ie0773e324edcafb8df6f90b2f4ee01c95534aacc

6 years agoAdd corpus synchronization to 'publish' command 98/154598/7
Dmitriy Nikiforov [Tue, 10 Oct 2017 14:59:13 +0000 (17:59 +0300)]
Add corpus synchronization to 'publish' command

Now all pulled corpora is located in the TIZEN_FUZZ_HOME/corpora directory.

Change-Id: I4de878b88822f93291e8eb2b4c99463667035146

6 years agoRefactoring in infra/commands/publish.sh script 75/155575/2
Dmitriy Nikiforov [Fri, 13 Oct 2017 14:19:23 +0000 (17:19 +0300)]
Refactoring in infra/commands/publish.sh script

Renamed variables:
  target_name     -> PROJECT_NAME
  destination     -> PROJECT_DEST_DIR
  target_bins     -> targets
  target_bin      -> target
  target_bin_name -> target_name
  target_bin_dir  -> target_dir

Change-Id: Iab7c78b93baafcf886a8b1f80d917e433ed4c587

6 years agoRefactoring in infra/commands/run.sh 97/154597/3
Dmitriy Nikiforov [Tue, 10 Oct 2017 14:44:07 +0000 (17:44 +0300)]
Refactoring in infra/commands/run.sh

Renamed variables:
 TARGET_NAME -> PROJECT_NAME
 TEST_NAME   -> TARGET_NAME

Change-Id: Id1c7b125f4822986d1b733267823932611f4c3ad

6 years agoMake summary report generation independent from CREATE_REPORTS env 52/155552/1
Dmitriy Nikiforov [Fri, 13 Oct 2017 13:02:27 +0000 (16:02 +0300)]
Make summary report generation independent from CREATE_REPORTS env

Change-Id: I14b67e80bdc75d95aff3815ce6d54d2f134e64bb

6 years agoChange links in summary report to archived build artifacts 99/154999/2
Dmitriy Nikiforov [Wed, 11 Oct 2017 15:22:21 +0000 (18:22 +0300)]
Change links in summary report to archived build artifacts

Change-Id: I3144c46fabcd9b6def53ffa721f9a669d24c2c81

6 years agoAdd option to disable reports generation in Groovy post-build script 01/154601/2
Dmitriy Nikiforov [Tue, 10 Oct 2017 18:03:24 +0000 (21:03 +0300)]
Add option to disable reports generation in Groovy post-build script

If CREATE_REPORTS environment variable value is not 'true', then reports
generation is skipped.

Change-Id: I011d223c856decd54974e0e8c3f3efdf6aa708d9

6 years agoFix 'log' variable usage in post-build script 49/154149/4
Dmitriy Nikiforov [Fri, 6 Oct 2017 20:10:13 +0000 (23:10 +0300)]
Fix 'log' variable usage in post-build script

Now all 'global' variables in the script are defined with the @Field annotation
changing their scope to the class level of the script.

Reference: http://docs.groovy-lang.org/latest/html/gapi/groovy/transform/Field.html

Change-Id: Ibcd4c1ba6b280c5b2b329fc9be9474381a0f494e

6 years agoAdd report generation in JUnit XML reports format 46/154146/4
Dmitriy Nikiforov [Fri, 6 Oct 2017 18:15:41 +0000 (21:15 +0300)]
Add report generation in JUnit XML reports format

Change-Id: I0c999ea8cdaca2213fd2ac6f742594cd494992b6

6 years agoFuzzing target for msg-service 30/144430/9
p.privalov [Fri, 7 Jul 2017 14:40:41 +0000 (17:40 +0300)]
Fuzzing target for msg-service

Fuzzed
 SmsPluginTpduCodec::decodeTpdu
 SmsPluginParamCodec::decodeAddress
 SmsPluginParamCodec::encodeAddress
 SmsPluginUDCodec::decodeUserData
 SmsPluginUDCodec::encodeUserData
 vmsg_decode
 vmsg_encode
 MsgTextConvert::convertEUCKRToUTF8
 MsgTextConvert::convertGSM7bitToUTF8
 MsgTextConvert::convertSHIFTJISToUTF8
 MsgTextConvert::convertUCS2ToUTF8
 MsgTextConvert::convertUTF8ToAuto
 MsgTextConvert::convertUTF8ToGSM7bit
 MsgTextConvert::convertUTF8ToUCS2

Also added required build.sh and targetspec with local and remote git

Change-Id: I85c6cb09b1f76f7a83af0b991230bb42a0a5f871

6 years agoAdd 'sdb shell' wrapper for long commands 50/154150/2 Protex-check-11102017
Dmitriy Nikiforov [Fri, 6 Oct 2017 20:54:30 +0000 (23:54 +0300)]
Add 'sdb shell' wrapper for long commands

sdb has some limit for a length of command to be executed.

Change-Id: Ie824bb9b1580b393f720c6717a4f8fb39acb4e39

6 years agoUse 'run' with '--timeout' option in 'run-all' for job rotation 35/153035/10
Dmitriy Nikiforov [Wed, 27 Sep 2017 17:57:28 +0000 (20:57 +0300)]
Use 'run' with '--timeout' option in 'run-all' for job rotation

Simplified job rotation by utilizing new '--timeout' option of the 'run'
command.

Change-Id: Ib23d485450dab7dcca127631280c5b32d0a39455

6 years agoAdd option to 'run' command to set maximum total time for fuzzing 34/153034/4
Dmitriy Nikiforov [Wed, 27 Sep 2017 17:49:24 +0000 (20:49 +0300)]
Add option to 'run' command to set maximum total time for fuzzing

'--timeout' option sets the value for '-max_total_time' libFuzzer option.

Change-Id: Ic72f6ea7b2d92a73b840d7c06483ef53186551d0

6 years agoRenamed TARGET variable in jenkins scripts to PROJECT 94/153994/2
Dmitriy Nikiforov [Wed, 4 Oct 2017 16:33:22 +0000 (19:33 +0300)]
Renamed TARGET variable in jenkins scripts to PROJECT

Change-Id: I80d1e31c766cb7bc6c4f29f6713b95dfec19d887

6 years agoFixed typo in the name of the tizen-platform-config target 98/154098/1
Dmitriy Nikiforov [Fri, 6 Oct 2017 13:05:51 +0000 (16:05 +0300)]
Fixed typo in the name of the tizen-platform-config target

Change-Id: I83b72abce66b9d8e522bbfdcf803c10aa920d6d2

6 years agoFuzzing target for system-info package 56/153956/5
Dmitry Kovalenko [Wed, 4 Oct 2017 05:28:30 +0000 (08:28 +0300)]
Fuzzing target for system-info package

Fuzzed functions:
* system_info_get_platform_bool()
* system_info_get_platform_int()
* system_info_get_platform_double()
* system_info_get_platform_string()
* system_info_get_platform_type()
* system_info_get_custom_bool()
* system_info_get_custom_int()
* system_info_get_custom_string()

Change-Id: I2c2fef391277326b15262aabaefbfc508d7b0e17
Signed-off-by: Dmitry Kovalenko <d.kovalenko@samsung.com>
6 years agoParse total edge and functions coverage values from coverage report 55/153755/8
Dmitriy Nikiforov [Fri, 29 Sep 2017 09:18:30 +0000 (12:18 +0300)]
Parse total edge and functions coverage values from coverage report

Now correct total coverage percentage is read from the coverage report instead
of being calculated as an average file coverage.

And 2 new columns are added:
 - Max Functions Coverage
 - Total Functions Coverage

Change-Id: I5d6ebb09bdae625a9067e72485f7ea47a650f693

6 years agoHighlight all 'Average Exec/s' values below 1000 in red color 19/153519/7
Dmitriy Nikiforov [Thu, 28 Sep 2017 15:06:48 +0000 (18:06 +0300)]
Highlight all 'Average Exec/s' values below 1000 in red color

1000 exec/s is a minimal recommended average speed for fuzzing.

Change-Id: Ia74f823ffd885fcdfc2c53c989c9a02747221ac8

6 years agoAdd option to 'build-all' command to exclude specific projects 33/153033/2
Dmitriy Nikiforov [Wed, 27 Sep 2017 17:13:59 +0000 (20:13 +0300)]
Add option to 'build-all' command to exclude specific projects

Change-Id: I3e18723f29c0ec5c9c7cb72ed58b5c6310e3bf7d

6 years agoPostbuild script refactoring 18/153518/5
Dmitriy Nikiforov [Thu, 28 Sep 2017 15:04:54 +0000 (18:04 +0300)]
Postbuild script refactoring

Change-Id: Ic86c6b8b0780d7f4458ed564f86e1bd4c31c4789

6 years agoAdd 'Average Exec/s' and 'Peak RSS' columns to summary report 41/152641/11
Dmitriy Nikiforov [Tue, 26 Sep 2017 16:32:09 +0000 (19:32 +0300)]
Add 'Average Exec/s' and 'Peak RSS' columns to summary report

Change-Id: I1b67b915c6274e604644f357ad00753e603b41b0

6 years agoAdd 'Corpus Size' column to summary report 27/152627/9
Dmitriy Nikiforov [Tue, 26 Sep 2017 14:05:06 +0000 (17:05 +0300)]
Add 'Corpus Size' column to summary report

The corpus itself will be within the target artifacts directory.

Change-Id: Ib41bd01e3a9bb9989074d11a1a845be76af78554

6 years agoAdd generated corpus pulling in 'report' command 26/152626/8
Dmitriy Nikiforov [Tue, 26 Sep 2017 13:19:50 +0000 (16:19 +0300)]
Add generated corpus pulling in 'report' command

Also, renamed some confusing variables:
 TARGET_NAME -> PROJECT_NAME
 TEST_NAME   -> TARGET_NAME

Change-Id: Ie087c543678ea70716a13a3beb420bb2001adae5

6 years agoChange TIZEN_FUZZ_HOME to default value 72/151972/7
Dmitriy Nikiforov [Fri, 22 Sep 2017 13:51:41 +0000 (16:51 +0300)]
Change TIZEN_FUZZ_HOME to default value

This is needed to make RV_build and RV_run jobs execute in separate workspaces
and share one lockable resource - /var/lib/jenkins/TizenFuzz directory.

Change-Id: I67442749dda51e0f5c99b2d3b3da7aa87e93caa7

6 years agoAdd Groovy Postbuild plugin script for Jenkins RV_run job 59/151959/7
Dmitriy Nikiforov [Fri, 22 Sep 2017 11:53:02 +0000 (14:53 +0300)]
Add Groovy Postbuild plugin script for Jenkins RV_run job

This script generates XML summary file for Summary Display plugin.

Change-Id: I1b59c5d1de7dfb47862edd9c4fbd38eb73bce7a4

6 years agoAdd CGI-script for graceful stop of current fuzzing process 78/151078/10
Dmitriy Nikiforov [Tue, 19 Sep 2017 14:38:43 +0000 (17:38 +0300)]
Add CGI-script for graceful stop of current fuzzing process

Also, renamed install_rv_daemon.sh script to install_rv_utils.sh.

Change-Id: Id8a79e2c028af96d32083f1b5fd8e0f5c12702d6

6 years agoAdd 'rv-daemon' systemd service 03/150203/12
Dmitriy Nikiforov [Fri, 15 Sep 2017 18:27:49 +0000 (21:27 +0300)]
Add 'rv-daemon' systemd service

This service is a daemon that can start/stop specified emulator VMs and
gracefully stop current fuzzing process.

All communication is done through /run/jenkins/rv-daemon.pipe.

Commands:
 * start <vm>   - starts given vm
 * stop <vm>    - stops given vm
 * stop-fuzzing - stops current fuzzing process

Added files:
 * rv-daemon.sh         - daemon script
 * rv-daemon.service    - systemd service file
 * install_rv_daemon.sh - script for automatic daemon installation, should be
   executed with root access rights

Change-Id: Ia80cb201de174b98baa7d4b6216694b43ba33bc1

6 years agoAdd option to build a single specified target in RV_build job 22/153522/2
Dmitriy Nikiforov [Thu, 28 Sep 2017 15:40:41 +0000 (18:40 +0300)]
Add option to build a single specified target in RV_build job

If the TARGET environment variable is not empty, it will be used as a name of
the single fuzz project to be built.

Change-Id: Id8cd1e589ba6d3293a7c81db069de68a3af872ad

6 years agoFix typo in utils.sh ( {} instead of () ) 30/153930/2
Dmitry Kovalenko [Tue, 3 Oct 2017 12:33:54 +0000 (15:33 +0300)]
Fix typo in utils.sh ( {} instead of () )

Change-Id: Ib02b6764ea0452aa6c05a00669ef25c142976b44

6 years agoFix rpm_n_reqs.py script to support all architectures 27/153027/1
Dmitriy Nikiforov [Wed, 27 Sep 2017 15:40:58 +0000 (18:40 +0300)]
Fix rpm_n_reqs.py script to support all architectures

Now script accepts 3 argumets:
 1. path to GBS root
 2. architecture
 3. required package name

Change-Id: I69869b4b103807f4564815e209e4532db15ec221

6 years agoFix 'publish' to use real device arch when searching for libasan 74/152974/2
Dmitriy Nikiforov [Wed, 27 Sep 2017 11:51:32 +0000 (14:51 +0300)]
Fix 'publish' to use real device arch when searching for libasan

Change-Id: I013d20269456563a6bdc9383510632048de650b0

6 years agoFix 'install_deps' function for i686 architecture 44/152644/3
Dmitriy Nikiforov [Tue, 26 Sep 2017 17:11:23 +0000 (20:11 +0300)]
Fix 'install_deps' function for i686 architecture

Added functions:
 * get_device_real_arch - prints the output of the 'uname -m' command
   executed on device.

Change-Id: I36f46744903b77131196df66457c3ba3aee2483c

6 years agoMake 'publish' command to not fail on 'find' for optional files 42/152642/1
Dmitriy Nikiforov [Tue, 26 Sep 2017 16:42:09 +0000 (19:42 +0300)]
Make 'publish' command to not fail on 'find' for optional files

Change-Id: I1729271927df3fed4d74134bebadd71e554949ea

6 years agoAdd .options file for bundle-fuzz.out target 28/146828/5
Dmitriy Nikiforov [Wed, 30 Aug 2017 16:26:53 +0000 (19:26 +0300)]
Add .options file for bundle-fuzz.out target

ASan options:
 * allocator_may_return_null=1 - needed to test exceptional cases with large
   callocs.

libFuzzer options:
 * max_len=128 - in absense of any dictionaries max_len=4096 is too much and
   fuzzing process becomes pretty slow.

Change-Id: I4afb1abd2e14782bf937eced876bbd5df906d589

6 years agoFix wget wildcard in the install_deps function 00/148100/7
Dmitriy Nikiforov [Fri, 15 Sep 2017 18:27:31 +0000 (21:27 +0300)]
Fix wget wildcard in the install_deps function

Now wget only loads dependencies for current arch or 'noarch' and rejects
any packages with the '-32bit-' string in its name.

Change-Id: I0b78f24c709ef972cf7687a44e2e4523cd367d05

6 years agoCut all newline characters from the 'uname -m' command output 99/148099/8
Dmitriy Nikiforov [Fri, 15 Sep 2017 18:27:19 +0000 (21:27 +0300)]
Cut all newline characters from the 'uname -m' command output

Change-Id: I25de911701ff58549f21c016e47b0255cb9a33da

6 years agoAdd Jenkins script for 'RV_run' job 90/148090/12
Dmitriy Nikiforov [Fri, 15 Sep 2017 18:26:55 +0000 (21:26 +0300)]
Add Jenkins script for 'RV_run' job

Change-Id: I6db1158463bdf1b72baf26287931593c2b77b64e

6 years agoAdd 'version' command 33/149933/2
Dmitriy Nikiforov [Wed, 13 Sep 2017 14:53:42 +0000 (17:53 +0300)]
Add 'version' command

Current version is 1.0.0.

Change-Id: I4cf6507652c6795e2c21b9d48babf8204f488fa4

6 years agoChange '--corpus' option behaviour to search for target's corpus 86/148086/2
Dmitriy Nikiforov [Wed, 6 Sep 2017 15:57:35 +0000 (18:57 +0300)]
Change '--corpus' option behaviour to search for target's corpus

Now --corpus feature does not demand of corpus directory to have any fixed
structure and just searches for <target-name>.zip archive in it.

Change-Id: I1d403d971ddf8f539b59ebe8437527417666a46d

6 years agoUpdate help messages for all tizen_fuzz.sh script commands 97/147797/2
Dmitriy Nikiforov [Tue, 5 Sep 2017 19:10:27 +0000 (22:10 +0300)]
Update help messages for all tizen_fuzz.sh script commands

Change-Id: I54c642d8b6b6ab67953f607c01357ffc6d618cf0

6 years agoAdd cleaning of previously pushed rpms on device 98/147798/3
Dmitriy Nikiforov [Tue, 5 Sep 2017 19:52:43 +0000 (22:52 +0300)]
Add cleaning of previously pushed rpms on device

Change-Id: I105a46334f2d023e19718f1dc4cce9238762558a

6 years agoAdd 'deps' fields to targetspec files in tpk/wgt-manifest-handlers 27/146827/5
Dmitriy Nikiforov [Wed, 30 Aug 2017 16:24:50 +0000 (19:24 +0300)]
Add 'deps' fields to targetspec files in tpk/wgt-manifest-handlers

Added boost libraries as targets run-time dependencies. Without these
libraries target cannot be executed on device.

Change-Id: Ia89dfc7f136e4d7fba54f50b9ad9a538ea51e9e7

6 years agoRemove redundant 'sdb root on' invocation 26/146826/4
Dmitriy Nikiforov [Wed, 30 Aug 2017 16:21:08 +0000 (19:21 +0300)]
Remove redundant 'sdb root on' invocation

Change-Id: I162967ff50b235ffae9ba619abdc792ffbddc711

6 years agoAdd missing help information for '--dump-coverage' option 95/145495/4
Dmitriy Nikiforov [Tue, 22 Aug 2017 12:12:31 +0000 (15:12 +0300)]
Add missing help information for '--dump-coverage' option

Change-Id: I4154e5eab2a36f0ffddd1afe3e7fcb12a3481db7

6 years agoFix '--long' option for 'list' command 27/147027/3
Dmitriy Nikiforov [Thu, 31 Aug 2017 16:23:19 +0000 (19:23 +0300)]
Fix '--long' option for 'list' command

Fixed 'architecture' field which displayed list of names of all directories
inside target build directory. This list included besides architecture
directories also 'dicts' and 'options' directories.

Now this field only shows 'i586' and 'x86_64' as was initially intended.

Also, fixed shellcheck warnings in this script.

Change-Id: Icd46f370fa9e76666a4f3e9e26ab23806fd063d0

6 years agoUpdate GBS configuration files 51/148051/3
Dmitriy Nikiforov [Wed, 6 Sep 2017 11:03:47 +0000 (14:03 +0300)]
Update GBS configuration files

Replaced gbs_emulator64.conf and gbs_emulator32.conf with one gbs_emulator.conf
file which now uses 'standard' repository for Tizen:Base.

Change-Id: I31c7c4083aeee7171857d0724feb0add4dda119a

6 years agoAdd support for target dependencies to the 'publish' command 25/146825/3
Dmitriy Nikiforov [Wed, 30 Aug 2017 16:20:22 +0000 (19:20 +0300)]
Add support for target dependencies to the 'publish' command

Change-Id: I8c428be7b1a7d9cba2ba5be5a95141539b226744

6 years agoPrint errors and warnings from 'rpm_n_reqs.py' to stderr 24/146824/3
Dmitriy Nikiforov [Wed, 30 Aug 2017 16:17:25 +0000 (19:17 +0300)]
Print errors and warnings from 'rpm_n_reqs.py' to stderr

This is needed for easy filtering of useful output (list of rpm packages)
from other information.

Change-Id: I86664a8b385ebbcc33bbfb8f197124532aaa9a39

6 years agoAdd support for 'deps' field in targetspec to the 'build' command 23/146823/3
Dmitriy Nikiforov [Wed, 30 Aug 2017 16:14:32 +0000 (19:14 +0300)]
Add support for 'deps' field in targetspec to the 'build' command

This optional field will specify a list of additional target run-time
dependencies that need to be installed on device.

Change-Id: I39fd88fa89ec51520005009a1a3f142d8dc9d938

6 years agoReduce the number of jobs for '--test-input' option to 1 job 22/146822/3
Dmitriy Nikiforov [Wed, 30 Aug 2017 16:12:47 +0000 (19:12 +0300)]
Reduce the number of jobs for '--test-input' option to 1 job

There is no need to test one input multiple times.

Change-Id: I69ecfe78a8566357f803d8da8066ce1e36829eb6

6 years agoAdd initial version of script rpm_n_reqs.py 89/144589/5
Dmitry Kovalenko [Thu, 17 Aug 2017 07:43:07 +0000 (10:43 +0300)]
Add initial version of script rpm_n_reqs.py

Script searches rpm and all its dependecies in GBS cache.
It's expected to use this script to install all dependecies of fuzzed package.

Change-Id: I45d08f67c4a2d011c2db59d07cc751991a143db8
Signed-off-by: Dmitry Kovalenko <d.kovalenko@samsung.com>
6 years agoUpdate general help message 10/146610/3
Dmitriy Nikiforov [Tue, 29 Aug 2017 12:12:46 +0000 (15:12 +0300)]
Update general help message

Change-Id: Ifb509891f76f311fc76aa470d9f663368c9066b5

6 years agoFix list of target binaries in 'publish' command 94/146594/4
Dmitriy Nikiforov [Tue, 29 Aug 2017 09:20:25 +0000 (12:20 +0300)]
Fix list of target binaries in 'publish' command

Change-Id: I934cf671bfa3549992cd47961efd7e9d22f52003

6 years agoRedirect some of the output of 'report' command to stderr 64/146064/5
Dmitriy Nikiforov [Thu, 24 Aug 2017 18:18:20 +0000 (21:18 +0300)]
Redirect some of the output of 'report' command to stderr

Needed to filter out useful information in 'run-all' command.

Change-Id: I1ab63982c6d524cd1eaa17918c003054e2d04baa

6 years agoAdd 'run-all' command to execute multiple targets on multiple devices 63/146063/5
Dmitriy Nikiforov [Thu, 24 Aug 2017 18:17:37 +0000 (21:17 +0300)]
Add 'run-all' command to execute multiple targets on multiple devices

Change-Id: Id2db9249756dbd19e5cc44d66037e74dcc0f93de

6 years agoRemove quoting of SDB_CMD in infra/utils.sh to allow word-splitting 62/146062/4
Dmitriy Nikiforov [Thu, 24 Aug 2017 18:15:46 +0000 (21:15 +0300)]
Remove quoting of SDB_CMD in infra/utils.sh to allow word-splitting

Change-Id: I62cf551870bea331401387a8c593450c342d45f7

6 years agoFix list of '.options' files to pushed in 'publish' command 61/146061/4
Dmitriy Nikiforov [Thu, 24 Aug 2017 18:14:48 +0000 (21:14 +0300)]
Fix list of '.options' files to pushed in 'publish' command

Change-Id: I39cd01e0d7fdf2382a2625b7c66f3176dbee1e1e

6 years agoFix incorrect sdb commands to use specified serial numbers 60/146060/4
Dmitriy Nikiforov [Thu, 24 Aug 2017 18:13:40 +0000 (21:13 +0300)]
Fix incorrect sdb commands to use specified serial numbers

Change-Id: I67d004e21afc3962ff8f14f6268160d7816a94c0

6 years agoAdd '--test-input' option to test single input 94/145494/4
Dmitriy Nikiforov [Tue, 22 Aug 2017 12:07:47 +0000 (15:07 +0300)]
Add '--test-input' option to test single input

Can be used with '--dump-coverage' to produce coverage for this input.

Change-Id: Ic213da59022f4a8b85e8b8fdc4b0924bade20353

6 years agoMake the location of fuzzing targets fixed 54/144754/7
Dmitriy Nikiforov [Thu, 17 Aug 2017 15:23:31 +0000 (18:23 +0300)]
Make the location of fuzzing targets fixed

Now all targets will be pushed to the /fuzzing directory by default.

Also, fixed help message for 'run' command.

Change-Id: I53e062df496628fef5bf8dd6ad1a256ce01ece3f

6 years agoAdd 'prepare_device' function to enable root and remount root fs 21/144721/5
Dmitriy Nikiforov [Thu, 17 Aug 2017 13:45:00 +0000 (16:45 +0300)]
Add 'prepare_device' function to enable root and remount root fs

Function is used in 'publish', 'run' and 'report' commands.

Change-Id: Id7c777f021ee77fb47d11c2613c2e89f52397a98

6 years agoAdd 'report' command to collect and analyze fuzzing results 09/144709/4
Dmitriy Nikiforov [Thu, 17 Aug 2017 12:27:59 +0000 (15:27 +0300)]
Add 'report' command to collect and analyze fuzzing results

Change-Id: Ibf7e0013156e784c9b121bacb8e91bd6e6630ae3

6 years agoReduce niceness of the fuzzing process 42/145442/2
Dmitriy Nikiforov [Mon, 21 Aug 2017 16:25:58 +0000 (19:25 +0300)]
Reduce niceness of the fuzzing process

Change-Id: Id40ba50795ddd7408e7c3e7b747f3b3b729b1634

6 years agoFuzzing target for metadata-extractor package 45/144145/5
Vitaliy Cherepanov [Mon, 31 Jul 2017 11:58:36 +0000 (14:58 +0300)]
Fuzzing target for metadata-extractor package

Fuzzed functions:
* metadata_extractor_create
* metadata_extractor_set_path
* metadata_extractor_get_metadata
* metadata_extractor_get_frame_at_time

Change-Id: Iab367874ac6551d40df54fc529824694cf85dde6
Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
6 years agoFix the LD_PRELOAD path to libasan in the 'run' command 55/144955/2
Dmitriy Nikiforov [Fri, 18 Aug 2017 12:17:35 +0000 (15:17 +0300)]
Fix the LD_PRELOAD path to libasan in the 'run' command

Now it uses libasan.so from the system /usr/lib[64] directory.

Change-Id: I9f13f0674bca61258bf0983fad68b0b0a344e756

6 years agoAdd '-detect_leaks=0' libFuzzer option to tpk/wgt-manifest-handlers 55/144755/3
Dmitriy Nikiforov [Thu, 17 Aug 2017 15:27:02 +0000 (18:27 +0300)]
Add '-detect_leaks=0' libFuzzer option to tpk/wgt-manifest-handlers

This is workaround for leak in libxml2 preventing the fuzzing of target
packages.

Change-Id: Idffe2f88f9d936c7b76065fffed9d64026097443

6 years agoRemove unneeded '--root' options from 'run' and 'publish' commands 33/144733/3
Dmitriy Nikiforov [Thu, 17 Aug 2017 14:32:26 +0000 (17:32 +0300)]
Remove unneeded '--root' options from 'run' and 'publish' commands

Change-Id: I79475191643f8d3e46bbcf1c94c1dec00cf7ac55

6 years agoFix shellcheck warnings in infra/commands/run.sh 34/144734/3
Dmitriy Nikiforov [Thu, 17 Aug 2017 14:38:23 +0000 (17:38 +0300)]
Fix shellcheck warnings in infra/commands/run.sh

Change-Id: I07db6baa4f32ad5fb1f332945de541ce64ce946c