message: trim trailing whitespace and use writelines replace write
diff: @@ -753,8 +753,7 @@ def test_specified_prefetch(
  tmp_file = tmp_path / "prefetch.txt"
  with open(tmp_file, "w") as f:
  - for d in prefetching_files:
  - f.write(os.path.join("/", d) + "\n")
  + f.writelines(os.path.join("/", d) + '\n' for d in prefetching_files)
  print(os.path.abspath(tmp_file))
  rafs = NydusDaemon(nydus_anchor, nydus_scratch_image, rafs_conf)
  