File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed
testcases/kernel/syscalls/sbrk Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -19,21 +19,8 @@ static long increment = INC;
1919
2020static void run (void )
2121{
22- TESTPTR (sbrk (increment ));
23-
24- if (TST_RET_PTR != (void * )-1 ) {
25- tst_res (TFAIL , "sbrk(%ld) unexpectedly passed and returned %p, "
26- "expected (void *)-1 with errno=%d" ,
27- increment , TST_RET_PTR , ENOMEM );
28- return ;
29- }
30-
31- if (TST_ERR == ENOMEM )
32- tst_res (TPASS | TTERRNO , "sbrk(%ld) failed as expected" , increment );
33- else
34- tst_res (TFAIL | TTERRNO , "sbrk(%ld) failed but unexpected errno, "
35- "expected errno=%d - %s" ,
36- increment , ENOMEM , strerror (ENOMEM ));
22+ TST_EXP_FAIL_PTR_VOID (sbrk (increment ), ENOMEM ,
23+ "sbrk(%ld) returned %p" , increment , TST_RET_PTR );
3724}
3825
3926static void setup (void )
You can’t perform that action at this time.
0 commit comments