<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 22, 2020 at 6:53 PM Viresh Kumar <<a href="mailto:viresh.kumar@linaro.org">viresh.kumar@linaro.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail_default" style="font-size:small">...</span><br>
diff --git a/testcases/kernel/syscalls/futex/futex_wake04.c b/testcases/kernel/syscalls/futex/futex_wake04.c<br>
index f92bda53f6c7..edbb9c644c57 100644<br>
--- a/testcases/kernel/syscalls/futex/futex_wake04.c<br>
+++ b/testcases/kernel/syscalls/futex/futex_wake04.c<br>
<span class="gmail_default" style="font-size:small">...</span><br>
<br>
static void wakeup_thread2(void)<br>
{<br>
+ struct test_variants *tv = &variants[tst_variant];<br>
void *addr;<br>
int hpsz, pgsz, res;<br>
pthread_t th1, th2;<br>
<br>
hpsz = read_hugepagesize();<br>
- tst_resm(TINFO, "Hugepagesize %i", hpsz);<br>
+ tst_res(TINFO, "Hugepagesize %i", hpsz);<br>
<br>
/*allocate some shared memory*/<br>
addr = mmap(NULL, hpsz, PROT_WRITE | PROT_READ,<br>
MAP_SHARED | MAP_ANONYMOUS | MAP_HUGETLB, -1, 0);<br>
<br>
if (addr == MAP_FAILED) {<br>
- if (errno == ENOMEM) {<br>
- tst_brkm(TCONF, NULL,<br>
- "Cannot allocate hugepage, memory too fragmented?");<br>
- }<br>
+ if (errno == ENOMEM)<br>
+ tst_res(TCONF, "Cannot allocate hugepage, memory too fragmented?");<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">Here we can use tst_brk(TCONF, ...), otherwise, the if condition will out of action for ENOMEM.</div></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
- tst_brkm(<span class="gmail_default" style="font-size:small"></span>TBROK | TERRNO, NULL, "Cannot allocate hugepage");<br>
+ tst_res(TFAIL | TERRNO, "Cannot allocate hugepage");<br>
+ return;<br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">tst_brk(<span class="gmail_default"></span>TBROK | TERRNO, ...)</div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>