Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/tcmalloc/chromium/src/tests/profiler_unittest.sh

Issue 576001: Merged third_party/tcmalloc/vendor/src(google-perftools r87) into... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Removed the unnecessary printf and ASSERT(0) Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/bin/sh 1 #!/bin/sh
2 2
3 # Copyright (c) 2005, Google Inc. 3 # Copyright (c) 2005, Google Inc.
4 # All rights reserved. 4 # All rights reserved.
5 # 5 #
6 # Redistribution and use in source and binary forms, with or without 6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions are 7 # modification, are permitted provided that the following conditions are
8 # met: 8 # met:
9 # 9 #
10 # * Redistributions of source code must retain the above copyright 10 # * Redistributions of source code must retain the above copyright
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 "$PROFILER1" 50 1 "$TMPDIR/p12" || RegisterFailure 234 "$PROFILER1" 50 1 "$TMPDIR/p12" || RegisterFailure
235 "$PPROF" $PPROF_FLAGS "$PROFILER1_REALNAME" "$TMPDIR/p12" --raw \ 235 "$PPROF" $PPROF_FLAGS "$PROFILER1_REALNAME" "$TMPDIR/p12" --raw \
236 >"$TMPDIR/p13" 2>/dev/null || RegisterFailure 236 >"$TMPDIR/p13" 2>/dev/null || RegisterFailure
237 VerifyIdentical p12 "$PROFILER1_REALNAME" p13 "" || RegisterFailure 237 VerifyIdentical p12 "$PROFILER1_REALNAME" p13 "" || RegisterFailure
238 238
239 "$PROFILER3" 5 2 "$TMPDIR/p14" || RegisterFailure 239 "$PROFILER3" 5 2 "$TMPDIR/p14" || RegisterFailure
240 "$PPROF" $PPROF_FLAGS "$PROFILER3_REALNAME" "$TMPDIR/p14" --raw \ 240 "$PPROF" $PPROF_FLAGS "$PROFILER3_REALNAME" "$TMPDIR/p14" --raw \
241 >"$TMPDIR/p15" 2>/dev/null || RegisterFailure 241 >"$TMPDIR/p15" 2>/dev/null || RegisterFailure
242 VerifyIdentical p14 "$PROFILER3_REALNAME" p15 "" || RegisterFailure 242 VerifyIdentical p14 "$PROFILER3_REALNAME" p15 "" || RegisterFailure
243 243
244 # Test using ITIMER_REAL instead of ITIMER_PROF.
245 env CPUPROFILE_REALTIME=1 "$PROFILER3" 5 2 "$TMPDIR/p16" || RegisterFailure
246 env CPUPROFILE_REALTIME=1 "$PROFILER3" 10 2 "$TMPDIR/p17" || RegisterFailure
247 VerifySimilar p16 "$PROFILER3_REALNAME" p17 "$PROFILER3_REALNAME" 2
248
249
244 # Make sure that when we have a process with a fork, the profiles don't 250 # Make sure that when we have a process with a fork, the profiles don't
245 # clobber each other 251 # clobber each other
246 CPUPROFILE="$TMPDIR/p6" "$PROFILER1" 1 -2 || RegisterFailure 252 CPUPROFILE="$TMPDIR/pfork" "$PROFILER1" 1 -2 || RegisterFailure
247 n=`ls $TMPDIR/p6* | wc -l` 253 n=`ls $TMPDIR/pfork* | wc -l`
248 if [ $n != 3 ]; then 254 if [ $n != 3 ]; then
249 echo "FORK test FAILED: expected 3 profiles (for main + 2 children), found $n" 255 echo "FORK test FAILED: expected 3 profiles (for main + 2 children), found $n"
250 num_failures=`expr $num_failures + 1` 256 num_failures=`expr $num_failures + 1`
251 fi 257 fi
252 258
253 rm -rf "$TMPDIR" # clean up 259 rm -rf "$TMPDIR" # clean up
254 260
255 echo "Tests finished with $num_failures failures" 261 echo "Tests finished with $num_failures failures"
256 exit $num_failures 262 exit $num_failures
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698