diff --git a/test/elf/warn-once.sh b/test/elf/warn-once.sh index 325c4fc35e..5f7c7bcf42 100755 --- a/test/elf/warn-once.sh +++ b/test/elf/warn-once.sh @@ -10,21 +10,19 @@ mold="$(pwd)/mold" t=out/test/elf/$testname mkdir -p $t -cat <& $t/log1 -$CC -B. -o $t/exe $t/a.o $t/b.o -Wl,--warn-unresolved-symbols,--warn-once >& $t/log2 +$CC -B. -o $t/exe $t/a.o $t/b.o -Wl,--warn-unresolved-symbols,--warn-once >& $t/log -[ "$(grep 'undefined symbol:.* foo$' $t/log1 | wc -l)" = 2 ] -[ "$(grep 'undefined symbol:.* foo$' $t/log2 | wc -l)" = 1 ] +[ "$(grep 'undefined symbol:.* foo$' $t/log | wc -l)" = 1 ] echo OK