public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Trevor Woerner <twoerner@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Bruce Ashfield <bruce.ashfield@gmail.com>,
	Mark Hatle <mark.hatle@kernel.crashing.org>
Subject: [PATCH v9 3/5] selftest/cases/wic.py: remove test_sparse_copy
Date: Fri,  3 Apr 2026 14:35:39 -0400	[thread overview]
Message-ID: <20260403183541.2631883-4-twoerner@gmail.com> (raw)
In-Reply-To: <20260403183541.2631883-1-twoerner@gmail.com>

Delete the wic.Wic2.test_sparse_copy test since it tests code that is
internal to wic itself. Once wic is removed from oe-core it will not be
possible to test this function from this layer.

NOTE: this patch is in preparation for removing wic from oe-core
      the wic oe-selftests work fine with this patch being added now

Reviewed-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Reviewed-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
changes in v9:
- in previous patchsets this was known as patch 9/9
  "oe-selftest/cases/wic.py: oe-selftest -r wic.Wic2 -> PASS"
- previously this patch also included many modifications to the wic
  oe-selftests to add a "--vars <envfile>" option; those are no longer
  needed since wic will use bitbake to get variables if bitbake is
  available on the PATH

changes in v8:
- (skipped, the only patch in v8 was to upstream the sector-size cmdline
  option)

changes in v7:
- none

changes in v6:
- removed extraopts options that specify sector-size values for dos and
  ext* partition types

changes in v5:
- rebase with master
- re-split up into multiple, smaller patches
- now that the sector-size re-implementation is ahead of this patch,
  various wic subcommands (ls, cp, rm) no longer need a --vars file
- combine qemu and non-qemu patches together (were separate patches)

v4: skipped to align/combine with other patch set

changes in v3:
- squashed into 1 large commit

changes in v2:
- none
---
 meta/lib/oeqa/selftest/cases/wic.py | 28 ----------------------------
 1 file changed, 28 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index 791d265a5ee7..4e94f4d39abd 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -1894,34 +1894,6 @@ INITRAMFS_IMAGE = "core-image-initramfs-boot"
         self.remove_config(config)
         self.assertEqual(1, len(glob(os.path.join(self.resultdir, "sdimage-bootpart-*direct"))))
 
-    def test_sparse_copy(self):
-        """Test sparse_copy with FIEMAP and SEEK_HOLE filemap APIs"""
-        libpath = os.path.join(self.td['COREBASE'], 'scripts', 'lib', 'wic')
-        sys.path.insert(0, libpath)
-        from  filemap import FilemapFiemap, FilemapSeek, sparse_copy, ErrorNotSupp
-        with NamedTemporaryFile("w", suffix=".wic-sparse") as sparse:
-            src_name = sparse.name
-            src_size = 1024 * 10
-            sparse.truncate(src_size)
-            # write one byte to the file
-            with open(src_name, 'r+b') as sfile:
-                sfile.seek(1024 * 4)
-                sfile.write(b'\x00')
-            dest = sparse.name + '.out'
-            # copy src file to dest using different filemap APIs
-            for api in (FilemapFiemap, FilemapSeek, None):
-                if os.path.exists(dest):
-                    os.unlink(dest)
-                try:
-                    sparse_copy(sparse.name, dest, api=api)
-                except ErrorNotSupp:
-                    continue # skip unsupported API
-                dest_stat = os.stat(dest)
-                self.assertEqual(dest_stat.st_size, src_size)
-                # 8 blocks is 4K (physical sector size)
-                self.assertEqual(dest_stat.st_blocks, 8)
-            os.unlink(dest)
-
     def test_mkfs_extraopts(self):
         """Test wks option --mkfs-extraopts for empty and not empty partitions"""
         img = 'core-image-minimal'
-- 
2.51.0



  parent reply	other threads:[~2026-04-03 18:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-03 18:35 [PATCH v9 0/5] standalone wic Trevor Woerner
2026-04-03 18:35 ` [PATCH v9 1/5] wic: add recipe Trevor Woerner
2026-04-07 15:48   ` [OE-core] " Yoann Congal
2026-04-03 18:35 ` [PATCH v9 2/5] oe-selftest/cases/wic.py: update WicTestCase Trevor Woerner
2026-04-03 18:35 ` Trevor Woerner [this message]
2026-04-03 18:35 ` [PATCH v9 4/5] wic: move canned *wks files Trevor Woerner
2026-04-03 21:13   ` [OE-core] " Richard Purdie
2026-04-03 22:23     ` Trevor Woerner
2026-04-04  7:27       ` Richard Purdie
2026-04-04 15:46         ` Trevor Woerner
2026-04-04 18:19           ` Trevor Woerner
2026-04-04 18:36           ` Richard Purdie
2026-04-04 20:38             ` Trevor Woerner
2026-04-05  9:17               ` Richard Purdie
2026-04-05 12:04                 ` Trevor Woerner
2026-04-05 14:16                   ` Richard Purdie
2026-04-05 15:22                     ` Trevor Woerner
     [not found]   ` <18A2F52EC877AF22.657799@lists.openembedded.org>
2026-04-03 21:37     ` Richard Purdie
2026-04-03 18:35 ` [PATCH v9 5/5] wic: remove to standalone repository Trevor Woerner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260403183541.2631883-4-twoerner@gmail.com \
    --to=twoerner@gmail.com \
    --cc=bruce.ashfield@gmail.com \
    --cc=mark.hatle@kernel.crashing.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox