public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Have TearDownExpect extend Expect; use.
@ 2008-01-25 21:24 cagney
  0 siblings, 0 replies; only message in thread
From: cagney @ 2008-01-25 21:24 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  f175568bca99954e9f1554945a194e65224e1954 (commit)
      from  d8f8d2c80c6c1cc2ebc414a4d52a07b3941fd616 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit f175568bca99954e9f1554945a194e65224e1954
Author: Andrew Cagney <cagney@redhat.com>
Date:   Fri Jan 25 16:23:33 2008 -0500

    Have TearDownExpect extend Expect; use.
    
    frysk-core/frysk/bindir/ChangeLog
    2008-01-25  Andrew Cagney  <cagney@redhat.com>
    
    	* TestLib.java: Delete.
    	* TestFauxv.java: Replace Expect with TearDownExpect.
    	* TestFdebuginfo.java: Ditto.
    	* TestFtrace.java: Ditto.
    	* TestFStep.java: Ditto.
    	* TestFexe.java: Ditto.
    	* TestFmaps.java: Ditto.
    	* TestFstack.java: Ditto.
    	* TestFcatch.java: Ditto.
    
    frysk-core/frysk/hpd/ChangeLog
    2008-01-25  Andrew Cagney  <cagney@redhat.com>
    
    	* TestLib.java: Replace Expect with TearDownExpect.
    	* TestSysRoot.java: Ditto.
    	(expect): Delete.
    	(tearDown()): Delete.
    	* HpdTestbed.java: Extend TearDownExpect instead of Expect.
    
    frysk-sys/frysk/testbed/ChangeLog
    2008-01-25  Andrew Cagney  <cagney@redhat.com>
    
    	* TearDownExpect.java: Extend Expect.
    	* TestTearDownExpect.java: Update.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/bindir/ChangeLog               |   10 +++
 frysk-core/frysk/bindir/TestFStep.java          |   26 ++++-----
 frysk-core/frysk/bindir/TestFauxv.java          |   10 +--
 frysk-core/frysk/bindir/TestFcatch.java         |    5 +-
 frysk-core/frysk/bindir/TestFcore.java          |   19 +++---
 frysk-core/frysk/bindir/TestFdebuginfo.java     |   11 ++--
 frysk-core/frysk/bindir/TestFexe.java           |    5 +-
 frysk-core/frysk/bindir/TestFhd.java            |   11 ++--
 frysk-core/frysk/bindir/TestFmaps.java          |   10 +--
 frysk-core/frysk/bindir/TestFstack.java         |   37 ++++++------
 frysk-core/frysk/bindir/TestFtrace.java         |   13 ++--
 frysk-core/frysk/bindir/TestLib.java            |   68 -----------------------
 frysk-core/frysk/hpd/ChangeLog                  |    6 ++
 frysk-core/frysk/hpd/HpdTestbed.java            |   12 +---
 frysk-core/frysk/hpd/TestLib.java               |   15 +----
 frysk-core/frysk/hpd/TestSysRoot.java           |   10 +---
 frysk-sys/frysk/testbed/ChangeLog               |    3 +
 frysk-sys/frysk/testbed/TearDownExpect.java     |   23 ++++++--
 frysk-sys/frysk/testbed/TestTearDownExpect.java |   11 +---
 19 files changed, 121 insertions(+), 184 deletions(-)
 delete mode 100644 frysk-core/frysk/bindir/TestLib.java

First 500 lines of diff:
diff --git a/frysk-core/frysk/bindir/ChangeLog b/frysk-core/frysk/bindir/ChangeLog
index c951672..dd4b497 100644
--- a/frysk-core/frysk/bindir/ChangeLog
+++ b/frysk-core/frysk/bindir/ChangeLog
@@ -1,5 +1,15 @@
 2008-01-25  Andrew Cagney  <cagney@redhat.com>
 
+	* TestLib.java: Delete.
+	* TestFauxv.java: Replace Expect with TearDownExpect.
+	* TestFdebuginfo.java: Ditto.
+	* TestFtrace.java: Ditto.
+	* TestFStep.java: Ditto.
+	* TestFexe.java: Ditto.
+	* TestFmaps.java: Ditto.
+	* TestFstack.java: Ditto.
+	* TestFcatch.java: Ditto.
+
 	* fstep.java: Update to match
 	TaskObserver.Terminated.updateTerminated(Task,Signal,int).
 
diff --git a/frysk-core/frysk/bindir/TestFStep.java b/frysk-core/frysk/bindir/TestFStep.java
index bde2a24..ac09e27 100644
--- a/frysk-core/frysk/bindir/TestFStep.java
+++ b/frysk-core/frysk/bindir/TestFStep.java
@@ -41,8 +41,10 @@
 package frysk.bindir;
 
 import frysk.Config;
-import frysk.expunit.*;
 import lib.dwfl.*;
+import frysk.expunit.Regex;
+import frysk.testbed.TestLib;
+import frysk.testbed.TearDownExpect;
 
 public class TestFStep extends TestLib {
   // Makes sure that fstep at least comes across the entry point of the
@@ -50,27 +52,23 @@ public class TestFStep extends TestLib {
   public void testFirstStep() throws Exception
   {
     Elf e = new Elf("/bin/true", ElfCommand.ELF_C_READ);
-    try
-      {
+    try {
 	ElfEHeader h = e.getEHeader();
 	final String entryAddress = "0x" + Long.toHexString(h.entry);
 
 	String command = Config.getBinFile("fstep").getAbsolutePath();
 	String argument = "/bin/true";
-	Expect expect = new Expect(new String[] { command, argument });
-	try
-	  {
+	TearDownExpect expect = new TearDownExpect(new String[] {
+		command, argument
+	    });
+	try {
 	    Regex regex = new Regex("^\\[\\d+\\]\t" + entryAddress + "\t");
 	    expect.expect(regex);
-	  }
-	finally
-	  {
+	} finally {
 	    expect.close();
-	  }
-      }
-    finally
-      {
+	}
+    } finally {
 	e.close();
-      }
+    }
   }
 }
diff --git a/frysk-core/frysk/bindir/TestFauxv.java b/frysk-core/frysk/bindir/TestFauxv.java
index a8d1030..98e3812 100644
--- a/frysk-core/frysk/bindir/TestFauxv.java
+++ b/frysk-core/frysk/bindir/TestFauxv.java
@@ -39,27 +39,25 @@
 
 package frysk.bindir;
 
-import frysk.expunit.Expect;
 import frysk.Config;
 import java.io.File;
 import frysk.testbed.TearDownExpect;
+import frysk.testbed.TestLib;
 
 public class TestFauxv extends TestLib {
     
-    private Expect fauxv(File coreFile) {
+    private TearDownExpect fauxv(File coreFile) {
 	String[] argv = new String[2];
 	int argc = 0;
 	argv[argc++] = Config.getBinFile("fauxv").getAbsolutePath();
 	argv[argc++] = coreFile.getAbsolutePath();
-	Expect e = new Expect(argv);
-	TearDownExpect.add(e);
-	return e;
+	return new TearDownExpect(argv);
     }
     
     // Basic sniff test, are we getting output that looks like a auuv?
     // getAuxv is tested in the frysk-core/proc namespace/
     public void testAuxvCore() {
-	Expect e  = fauxv(Config.getPkgDataFile("test-core-x86"));
+	TearDownExpect e = fauxv(Config.getPkgDataFile("test-core-x86"));
 	
 	e.expect("AT_SYSINFO \\(SYSINFO\\) : 6464512");
 	e.expect("AT_SYSINFO_EHDR \\(SYSINFO EHDR\\) : 0x62a000");
diff --git a/frysk-core/frysk/bindir/TestFcatch.java b/frysk-core/frysk/bindir/TestFcatch.java
index d95e779..1602173 100644
--- a/frysk-core/frysk/bindir/TestFcatch.java
+++ b/frysk-core/frysk/bindir/TestFcatch.java
@@ -41,11 +41,12 @@
 package frysk.bindir;
 
 import frysk.Config;
-import frysk.expunit.Expect;
+import frysk.testbed.TearDownExpect;
+import frysk.testbed.TestLib;
 
 public class TestFcatch extends TestLib {
     public void testBackTrace() {
-	e = new Expect(new String[] {
+	TearDownExpect e = new TearDownExpect(new String[] {
 		Config.getBinFile("fcatch").getAbsolutePath(),
 		Config.getPkgLibFile("funit-stackframe").getAbsolutePath()
 	    });
diff --git a/frysk-core/frysk/bindir/TestFcore.java b/frysk-core/frysk/bindir/TestFcore.java
index 8cec521..b01f149 100644
--- a/frysk-core/frysk/bindir/TestFcore.java
+++ b/frysk-core/frysk/bindir/TestFcore.java
@@ -39,17 +39,18 @@
 
 package frysk.bindir;
 
-import frysk.expunit.Expect;
+import frysk.testbed.TearDownExpect;
+import frysk.testbed.TestLib;
 import frysk.Config;
 
 public class TestFcore extends TestLib {
     public void testNoArguments() {
-	e = new Expect(Config.getBinFile("fcore"));
+	TearDownExpect e = new TearDownExpect(Config.getBinFile("fcore"));
 	e.expect("Error: No pid provided.");      
     }
 
     public void testBadArguments () {
-	e = new Expect(new String[] {
+	TearDownExpect e = new TearDownExpect(new String[] {
 		Config.getBinFile("fcore").getAbsolutePath (),
 		"this is a bad argument"
 	    });
@@ -57,7 +58,7 @@ public class TestFcore extends TestLib {
     }
 
     public void testBadConsoleParameter () {
-	e = new Expect(new String[] {
+	TearDownExpect e = new TearDownExpect(new String[] {
 		Config.getBinFile("fcore").getAbsolutePath (),
 		"-console", "frysk=SILLY",
 		"1"
@@ -66,7 +67,7 @@ public class TestFcore extends TestLib {
     }
 
     public void testBadLogParameter () {
-	e = new Expect(new String[] {
+	TearDownExpect e = new TearDownExpect(new String[] {
 		Config.getBinFile("fcore").getAbsolutePath (),
 		"-log", "frysk=SILLY",
 		"1"
@@ -75,7 +76,7 @@ public class TestFcore extends TestLib {
     }
 
     public void testGoodConsoleBadLogParameter () {
-	e = new Expect(new String[] {
+	TearDownExpect e = new TearDownExpect(new String[] {
 		Config.getBinFile("fcore").getAbsolutePath (),
 		"-console", "frysk=FINE",
 		"-log", "frysk=SILLY",
@@ -85,7 +86,7 @@ public class TestFcore extends TestLib {
     }
 
     public void testBadConsoleBadLogParameter () {
-	e = new Expect(new String[] {
+	TearDownExpect e = new TearDownExpect(new String[] {
 		Config.getBinFile("fcore").getAbsolutePath (),
 		"-console", "frysk=SILLY",
 		"-log", "frysk=SILLY",
@@ -95,7 +96,7 @@ public class TestFcore extends TestLib {
     }
 
     public void testBadConsoleGoodLogParameter () {
-	e = new Expect(new String[] {
+	TearDownExpect e = new TearDownExpect(new String[] {
 		Config.getBinFile("fcore").getAbsolutePath (),
 		"-console", "frysk=SILLY",
 		"-log", "frysk=FINE",
@@ -105,7 +106,7 @@ public class TestFcore extends TestLib {
     }
 
     public void testInvalidArgument () {
-	e = new Expect(new String[] {
+	TearDownExpect e = new TearDownExpect(new String[] {
 		Config.getBinFile("fcore").getAbsolutePath (),
 		"-z",
 		"1"
diff --git a/frysk-core/frysk/bindir/TestFdebuginfo.java b/frysk-core/frysk/bindir/TestFdebuginfo.java
index 3dccc0e..2421a63 100644
--- a/frysk-core/frysk/bindir/TestFdebuginfo.java
+++ b/frysk-core/frysk/bindir/TestFdebuginfo.java
@@ -40,7 +40,8 @@
 package frysk.bindir;
 
 import frysk.Config;
-import frysk.expunit.Expect;
+import frysk.testbed.TearDownExpect;
+import frysk.testbed.TestLib;
 import frysk.proc.Task;
 import frysk.testbed.SlaveOffspring;
 
@@ -56,7 +57,7 @@ public class TestFdebuginfo extends TestLib {
         // Create an unattached child process.
 	SlaveOffspring child = SlaveOffspring.createChild();
 	Task task = child.findTaskUsingRefresh(true);
-	e = new Expect(new String[] {
+	TearDownExpect e = new TearDownExpect(new String[] {
 		Config.getBinFile("fdebuginfo").getAbsolutePath(),
 		""+task.getProc().getPid() 
 	    });
@@ -65,14 +66,14 @@ public class TestFdebuginfo extends TestLib {
     }
     
     public void testNoArguments() {
-        e = new Expect(new String[] { 
+        TearDownExpect e = new TearDownExpect(new String[] { 
 		Config.getBinFile("fdebuginfo").getAbsolutePath ()
 	    });
         e.expect("Error: No pid provided.");      
     }    
 
     public void testBadArguments() {
-	e = new Expect(new String[] {
+	TearDownExpect e = new TearDownExpect(new String[] {
 		Config.getBinFile("fdebuginfo").getAbsolutePath (),
 		"this is a bad argument"
 	    });
@@ -80,7 +81,7 @@ public class TestFdebuginfo extends TestLib {
     }
     
     public void testInvalidArgument() {
-	e = new Expect (new String[] {
+	TearDownExpect e = new TearDownExpect(new String[] {
 		Config.getBinFile("fdebuginfo").getAbsolutePath (),
 		"-z",
 		"1"
diff --git a/frysk-core/frysk/bindir/TestFexe.java b/frysk-core/frysk/bindir/TestFexe.java
index d29324f..53b6f77 100644
--- a/frysk-core/frysk/bindir/TestFexe.java
+++ b/frysk-core/frysk/bindir/TestFexe.java
@@ -39,14 +39,15 @@
 
 package frysk.bindir;
 
-import frysk.expunit.Expect;
+import frysk.testbed.TearDownExpect;
+import frysk.testbed.TestLib;
 import frysk.Config;
 import java.io.File;
 
 public class TestFexe extends TestLib {
     public void testExeOfPid() {
 	File fexe = Config.getBinFile("fexe");
-	e = new Expect(fexe.getAbsolutePath () + " $$");
+	TearDownExpect e = new TearDownExpect(fexe.getAbsolutePath () + " $$");
 	e.expect(fexe + "\r\n");
     }
 }
diff --git a/frysk-core/frysk/bindir/TestFhd.java b/frysk-core/frysk/bindir/TestFhd.java
index 1b02a95..c5c32ae 100755
--- a/frysk-core/frysk/bindir/TestFhd.java
+++ b/frysk-core/frysk/bindir/TestFhd.java
@@ -40,7 +40,8 @@
 package frysk.bindir;
 
 import frysk.Config;
-import frysk.expunit.Expect;
+import frysk.testbed.TestLib;
+import frysk.testbed.TearDownExpect;
 
 /**
  * This performs a "sniff" test of Fstack, confirming basic
@@ -53,8 +54,8 @@ public class TestFhd extends TestLib {
     private final String prompt = "\\(fhpd\\) ";
 
     public void testHpdPid () {
-	child = new Expect(Config.getPkgLibFile("hpd-c"));
-	e = new Expect(new String[] { 
+	TearDownExpect child = new TearDownExpect(Config.getPkgLibFile("hpd-c"));
+	TearDownExpect e = new TearDownExpect(new String[] { 
 		Config.getBinFile("fhpd").getPath(), 
 		child.getPid().toString() 
 	    });
@@ -62,7 +63,7 @@ public class TestFhd extends TestLib {
     }
   
     public void testHpdCommand () {
-	e = new Expect(new String[] { 
+	TearDownExpect e = new TearDownExpect(new String[] { 
 		Config.getBinFile("fhpd").getPath(), 
 		Config.getPkgLibFile("hpd-c").getPath() 
 	    });
@@ -70,7 +71,7 @@ public class TestFhd extends TestLib {
     }
   
     public void testHpdCore ()  {
-	e = new Expect(new String[] {
+	TearDownExpect e = new TearDownExpect(new String[] {
 		Config.getBinFile("fhpd").getPath(),
 		Config.getPkgDataFile("test-core-x86").getPath(),
 		"-noexe"
diff --git a/frysk-core/frysk/bindir/TestFmaps.java b/frysk-core/frysk/bindir/TestFmaps.java
index 64f540f..eed8a41 100644
--- a/frysk-core/frysk/bindir/TestFmaps.java
+++ b/frysk-core/frysk/bindir/TestFmaps.java
@@ -39,11 +39,11 @@
 
 package frysk.bindir;
 
-import frysk.expunit.Expect;
 import frysk.Config;
 import java.io.File;
 import frysk.testbed.TearDownExpect;
 import frysk.testbed.CorefileFactory;
+import frysk.testbed.TestLib;
 
 public class TestFmaps extends TestLib {
   
@@ -52,7 +52,7 @@ public class TestFmaps extends TestLib {
      * problems with Linux's bone-head COREFILE format storing only
      * the first 50 characters of the executable.
      */
-    private Expect fmaps(String program, String[] args) {
+    private TearDownExpect fmaps(String program, String[] args) {
 	File coreExe = Config.getPkgLibFile(program);
 	File coreFile = CorefileFactory.constructCoreAtSignal(coreExe);
 	String[] argv = new String[args.length + 3];
@@ -63,15 +63,13 @@ public class TestFmaps extends TestLib {
 	for (int i = 0; i < args.length; i++) {
 	    argv[argc + i] = args[i];
 	}
-	Expect e = new Expect(argv);
-	TearDownExpect.add(e);
-	return e;
+	return new TearDownExpect(argv);
     }
     
     // Basic sniff test, are we getting output that looks like a map?
     // getMaps is tested in the frysk-core/proc namespalce
     public void testExeOfPid() {
-	Expect e = fmaps("funit-stack-outlined", new String[0]);
+	TearDownExpect e = fmaps("funit-stack-outlined", new String[0]);
 	e.expect("funit-stack-outlined");
 	
     }
diff --git a/frysk-core/frysk/bindir/TestFstack.java b/frysk-core/frysk/bindir/TestFstack.java
index 2c2789c..0c1e284 100644
--- a/frysk-core/frysk/bindir/TestFstack.java
+++ b/frysk-core/frysk/bindir/TestFstack.java
@@ -42,7 +42,6 @@ package frysk.bindir;
 import java.io.File;
 
 import frysk.Config;
-import frysk.expunit.Expect;
 import frysk.testbed.CorefileFactory;
 import frysk.testbed.TearDownExpect;
 import frysk.testbed.TestLib;
@@ -52,15 +51,13 @@ import frysk.testbed.TestLib;
  * functionality.
  */
 
-public class TestFstack
-    extends TestLib
-{
+public class TestFstack extends TestLib {
     /**
      * Start FSTACK with both a core file and an executable; avoids
      * problems with Linux's bone-head COREFILE format storing only
      * the first 50 characters of the executable.
      */
-    private Expect fstack(String program, String[] args) {
+    private TearDownExpect fstack(String program, String[] args) {
 	File coreExe = Config.getPkgLibFile(program);
 	File coreFile = CorefileFactory.constructCoreAtSignal(coreExe);
 	String[] argv = new String[args.length + 3];
@@ -71,19 +68,17 @@ public class TestFstack
 	for (int i = 0; i < args.length; i++) {
 	    argv[argc + i] = args[i];
 	}
-	Expect e = new Expect(argv);
-	TearDownExpect.add(e);
-	return e;
+	return new TearDownExpect(argv);
     }
 
     public void testBackTrace () {
-	Expect e = fstack("funit-stack-outlined", new String[0]);
+	TearDownExpect e = fstack("funit-stack-outlined", new String[0]);
 	// Just look for main.
 	e.expect ("main");
     }
     
     public void testBackTraceWithParams () {
-	Expect e = fstack("funit-stack-outlined",
+	TearDownExpect e = fstack("funit-stack-outlined",
 			  new String[] { "-print", "params" });
         e.expect("\\#0 .* third\\(int arg3.*\\)");
         e.expect("\\#1 .* second\\(int arg2.*\\)");
@@ -92,8 +87,8 @@ public class TestFstack
     }
 
     public void testBackTraceWithScopes () {
-	Expect e = fstack("funit-stack-outlined",
-			  new String[] { "--print", "scopes" });
+	TearDownExpect e = fstack("funit-stack-outlined",
+				  new String[] { "--print", "scopes" });
 	e.expect("\\#0 .* third\\(\\)");
         e.expect("int var3");
 	e.expect("\\#1 .* second\\(\\)");
@@ -105,8 +100,8 @@ public class TestFstack
     }
 
     public void testBackTraceWithFullpath () {
-	Expect e = fstack("funit-stack-outlined",
-			  new String[] { "--print", "fullpath" });
+	TearDownExpect e = fstack("funit-stack-outlined",
+				  new String[] { "--print", "fullpath" });
         e.expect (Config.getRootSrcDir()
 		  + ".*"
 		  + "funit-stack-outlined"
@@ -114,7 +109,8 @@ public class TestFstack
     }
 
     public void testBackTraceWithDashA () {
-	Expect e = fstack("funit-stack-outlined", new String[] { "-a" });
+	TearDownExpect e = fstack("funit-stack-outlined",
+				  new String[] { "-a" });
 	e.expect("\\#0 .* in third\\(int arg3\\)"
 		 + ".*" + Config.getRootSrcDir()
 		 + ".*" + "funit-stack-outlined" + "\\.c#" 
@@ -123,7 +119,8 @@ public class TestFstack
     }
 
     public void testBackTraceWithDashC () {
-	Expect e = fstack("funit-stack-outlined", new String[] { "-c" });
+	TearDownExpect e = fstack("funit-stack-outlined",
+				  new String[] { "-c" });
 	e.expect("\\#0 .* in third\\(int arg3\\)"
 		 + ".*" + Config.getRootSrcDir()
 		 + ".*" + "funit-stack-outlined" + "\\.c#");
@@ -131,7 +128,8 @@ public class TestFstack
   }
 
     public void testBackTraceWithDashV () {
-	Expect e = fstack("funit-stack-inlined", new String[] { "-v", "-a" });
+	TearDownExpect e = fstack("funit-stack-inlined",
+				  new String[] { "-v", "-a" });
         e.expect("\\#0 .*third[^\\r\\n]*\\[inline\\]");
 	e.expect("\\#1 .*second[^\\r\\n]*\\[inline\\]");
 	e.expect("\\#2 .*first[^\\r\\n]*\\[inline\\]");
@@ -140,7 +138,7 @@ public class TestFstack
 
     public void testBackTraceWithDashN () {
 	
-	Expect e = fstack("funit-long-stack", new String[]{"-n","5"});
+	TearDownExpect e = fstack("funit-long-stack", new String[]{"-n","5"});
 	e.expect("\\#0 .*crash[^\\r\\n]*");
 	e.expect("\\#1 [^\r\n]*first[^\\r\\n]*");
 	e.expect("\\#2 [^\r\n]*first[^\\r\\n]*");
@@ -165,7 +163,8 @@ public class TestFstack
     
     public void testBackTraceWithDashNDashA () {
 	
-	Expect e = fstack("funit-long-stack", new String[]{"-n","5", "-a"});
+	TearDownExpect e = fstack("funit-long-stack",
+				  new String[]{"-n","5", "-a"});
 	e.expect("\\#0 .*crash[^\\r\\n]*");
 	e.expect("\\#1 .*first[^\\r\\n]*");
 	e.expect("\\#2 .*first[^\\r\\n]*");
diff --git a/frysk-core/frysk/bindir/TestFtrace.java b/frysk-core/frysk/bindir/TestFtrace.java
index c9425e2..d887ed7 100644
--- a/frysk-core/frysk/bindir/TestFtrace.java
+++ b/frysk-core/frysk/bindir/TestFtrace.java
@@ -40,7 +40,8 @@
 package frysk.bindir;
 
 import frysk.Config;
-import frysk.expunit.Expect;
+import frysk.testbed.TearDownExpect;


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-25 21:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-25 21:24 [SCM] master: Have TearDownExpect extend Expect; use cagney

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).