diff options
author | Jan Kotas <jkotas@microsoft.com> | 2016-02-21 06:11:54 -0800 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2016-02-21 06:11:54 -0800 |
commit | dec83bd64d40fcff76e14f5700b8fb69413e4057 (patch) | |
tree | 1af51c391a1fe5d5658af7582c8086f90c6defde /src/pal | |
parent | a8e10c51b050917606b755b1f11f2a3dd9436dcf (diff) | |
parent | 4c389ad3e373cf4bb6ae643e8a91b7104eb6c39a (diff) | |
download | coreclr-dec83bd64d40fcff76e14f5700b8fb69413e4057.tar.gz coreclr-dec83bd64d40fcff76e14f5700b8fb69413e4057.tar.bz2 coreclr-dec83bd64d40fcff76e14f5700b8fb69413e4057.zip |
Merge pull request #3285 from krytarowski/netbsd-support-54
Fix test issue on NetBSD: Walk-around getrusage(2) implementation nits
Diffstat (limited to 'src/pal')
-rw-r--r-- | src/pal/tests/palsuite/threading/GetProcessTimes/test2/test2.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/pal/tests/palsuite/threading/GetProcessTimes/test2/test2.c b/src/pal/tests/palsuite/threading/GetProcessTimes/test2/test2.c index e2e7411b63..687facc584 100644 --- a/src/pal/tests/palsuite/threading/GetProcessTimes/test2/test2.c +++ b/src/pal/tests/palsuite/threading/GetProcessTimes/test2/test2.c @@ -25,7 +25,7 @@ int __cdecl main( int argc, char **argv ) { int i, j, k; - int total = 0; + int *total; HANDLE hProcess; FILETIME createTime; @@ -76,11 +76,16 @@ int __cdecl main( int argc, char **argv ) { for( j=0; j<1000; j++ ) { - total = j * i; + /* do kernel work to increase system usage counters */ + total = malloc(1024 * 1024); + + *total = j * i; for( k=0; k<1000; k++ ) { - total += k + i; + *total += k + i; } + + free(total); } } |