* [PATCH] Fix twice-multifile.sh
@ 2021-03-02 10:10 Tom de Vries
2021-03-03 23:21 ` Mark Wielaard
0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2021-03-02 10:10 UTC (permalink / raw)
To: dwz, jakub, mark
Hi,
After "Clean up temporary file in hardlink mode", test-case twice-multifile.sh
started failing.
The test-case first dwz-compresses files 1 and 2 in single-file mode.
Then it attempts a dwz -m 3 1 2.
This results in a res.res value of 1 (processed, unchanged) for both files.
This causes the files not to be counted as a success in main, and multifile
mode optimization is skipped.
Fix this by handling res.res == 1 in main.
Any comments?
Thanks,
- Tom
Fix twice-multifile.sh
2021-03-02 Tom de Vries <tdevries@suse.de>
* dwz.c (main): Handle res.res == 1.
---
dwz.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/dwz.c b/dwz.c
index 96f292d..af1c5af 100644
--- a/dwz.c
+++ b/dwz.c
@@ -16809,10 +16809,10 @@ main (int argc, char *argv[])
thisret = dwz (file, NULL, &resa[i - optind],
hardlinks ? resa : NULL, &argv[optind]);
}
- else if (resa[i - optind].res == 0)
- successcount++;
else if (thisret == 1)
ret = 1;
+ else if (resa[i - optind].res >= 0)
+ successcount++;
if (hardlink
&& resa[i - optind].res >= 0
&& resa[i - optind].nlink > 1)
@@ -16851,8 +16851,7 @@ main (int argc, char *argv[])
multifile_mode = MULTIFILE_MODE_FI;
/* Don't process again files that couldn't
be processed successfully. */
- if (resa[i - optind].res == -1
- || resa[i - optind].res == 1)
+ if (resa[i - optind].res == -1)
continue;
for (cu = alt_first_cu; cu; cu = cu->cu_next)
alt_clear_dups (cu->cu_die);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix twice-multifile.sh
2021-03-02 10:10 [PATCH] Fix twice-multifile.sh Tom de Vries
@ 2021-03-03 23:21 ` Mark Wielaard
0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2021-03-03 23:21 UTC (permalink / raw)
To: Tom de Vries; +Cc: dwz, jakub
Hi Tom,
On Tue, Mar 02, 2021 at 11:10:43AM +0100, Tom de Vries wrote:
> After "Clean up temporary file in hardlink mode", test-case twice-multifile.sh
> started failing.
>
> The test-case first dwz-compresses files 1 and 2 in single-file mode.
> Then it attempts a dwz -m 3 1 2.
>
> This results in a res.res value of 1 (processed, unchanged) for both files.
>
> This causes the files not to be counted as a success in main, and multifile
> mode optimization is skipped.
>
> Fix this by handling res.res == 1 in main.
OK, so now we are OK with either files that are changed and unchanged,
as long as they didn't actually fail to be processed. This looks
good. But as I said in the previous patch I would like to commit this
and the last patch together so we don't have failing testcases
inbetween.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-03 23:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-02 10:10 [PATCH] Fix twice-multifile.sh Tom de Vries
2021-03-03 23:21 ` Mark Wielaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).